SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Studio
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-07-2011, 03:39 PM
evilpenguin's Avatar
evilpenguin evilpenguin is offline
SageTVaholic
 
Join Date: Aug 2003
Location: Seattle, WA
Posts: 3,696
Get Array Slice in studio?

I'm trying to sort a large list of media and then just slice it down to the first 10 elements. What's an easy way to do that in Studio?
__________________
Clients: 1xHD200 Connected to 50" TH-50PZ750U Plasma
Server : Shuttle SFF SSH55J2 w/ Win7 Home, SageTV v7, Core i3 540, 2GB RAM, 30GB SSD for OS, 1.5TB+2x1TB WDGP for Recordings, BluRay, 2xHDHR, 1xFirewire
SageTV : PlayOn, SJQ, MediaShrink, Comskip, Jetty, Web Client, BMT


Having a problem? Don't forget to include a log! (Instructions for: PlayOn For SageTV v1.5, MediaShrink)
Reply With Quote
  #2  
Old 01-07-2011, 04:18 PM
razrsharpe razrsharpe is offline
Sage Icon
 
Join Date: Sep 2008
Location: Boston, MA
Posts: 2,111
arraycopy should work (note haven't tried it but i used something similar to add elements to an array)

System_arraycopy(sourceArray, 0, destinationArray,0,10)

I'm sure that's not the best or most efficient way to do it but that's where i would start....
__________________
Server 2003 r2 32bit, SageTV9 (finally!)
2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast)
2x HD300, 1x SageClient (Win10 Test/Development)
Check out TVExplorer

Last edited by razrsharpe; 01-07-2011 at 04:23 PM.
Reply With Quote
  #3  
Old 01-07-2011, 04:21 PM
jaminben jaminben is offline
Sage Icon
 
Join Date: Sep 2007
Location: Norwich, UK
Posts: 1,754
Send a message via MSN to jaminben
You could try something like CreateArray() and use GetElement() ten times within that array.


Code:
SortedFiles = YourMediaFiles
  FirstTen = CreateArray(GetElement(SortedFiles, 0), GetElement(SortedFiles, 1) etc....)
    Table
__________________
Server - Win7 64bit, 2.4Ghz Intel Core 2 Duo, TBS 6284 PCI-E Quad DVB-T2 Tuner, 3 x HD200 & 1 x HD300 extenders

Last edited by jaminben; 01-07-2011 at 04:25 PM.
Reply With Quote
  #4  
Old 01-07-2011, 04:23 PM
razrsharpe razrsharpe is offline
Sage Icon
 
Join Date: Sep 2008
Location: Boston, MA
Posts: 2,111
After a bit more googling and thinking there must be a better way... it looks like copyOf is really what you want

newArray = java_util_Arrays_copyOf(sourceArray, 10)
__________________
Server 2003 r2 32bit, SageTV9 (finally!)
2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast)
2x HD300, 1x SageClient (Win10 Test/Development)
Check out TVExplorer
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Disk Array heffneil Hardware Support 4 09-26-2010 05:06 PM
Modify Array Question cracklepopflash SageTV Studio 1 08-21-2009 11:39 AM
building array in eclipse to pass to studio PLUCKYHD SageTV Studio 8 08-04-2009 12:08 PM
Looking for a Plug-In to Slice & Dice My Video Library rkosage SageTV Customizations 1 02-12-2007 02:18 AM
Black screen or small slice visable. stoic SageTV Software 0 02-28-2005 05:07 PM


All times are GMT -6. The time now is 06:06 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.