|
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. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
||||
|
||||
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) |
#2
|
|||
|
|||
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. |
#3
|
|||
|
|||
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. |
#4
|
|||
|
|||
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 |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
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 |