|
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
|
|||
|
|||
building array in eclipse to pass to studio
Okay I am having issues building an array and passing it through to sage.
I think the issue in in my do..while statements. I know I am setting a max of 2 elements but I am just trying to test it for now. code I am sure I am missing something again... TIA |
#2
|
||||
|
||||
I don't code for Studio and haven't used GetMediaFileMetadata, but it looks like you're expecting it to return a string that consists of a set of tags that are separated by semicolons.
Assuming that, you're making it harder for yourself than it needs to be Try this. Code:
String [] tagArray = null; String mediaTags = MediaFileAPI.GetMediaFileMetadata(mediaObject, "MediaTags"); if (mediaTags != null) { tagArray = mediaTags.split(";"); } return tagArray;
__________________
Server: Intel Core i5 760 Quad, Gigabyte GA-H57M-USB3, 4GB RAM, Gigabyte GeForce 210, 120GB SSD (OS), 1TB SATA, HD HomeRun. Extender: STP-HD300, Harmony 550 Remote, Netgear MCA1001 Ethernet over Coax. SageTV: SageTV Server 7.1.8 on Ubuntu Linux 11.04, SageTV Placeshifter for Mac 6.6.2, SageTV Client 7.0.15 for Windows, Linux Placeshifter 7.1.8 on Server and Client, Java 1.6. Plugins: Jetty, Nielm's Web Server, Mobile Web Interface. |
#3
|
|||
|
|||
WOW talk about a helping hand they are actually they are seperated by ;;
so is there are call to get between ; and ; ? if not I will change the format maybe. |
#4
|
|||
|
|||
can I just call split (";*;") ?
edited:that seems to works thanks 100% i still would like to know if I had my do while statements correct? Last edited by PLUCKYHD; 07-30-2009 at 02:50 PM. |
#5
|
||||
|
||||
They'd work, and (well I guess I am) not to critique coding style, but I'd use a for loop:
Code:
for ( int i = 0; i < 2, i++){ TagArray[i] = amediatag; System.out.println("stuff") ... } |
#6
|
|||
|
|||
Quote:
|
#7
|
||||
|
||||
Quote:
I rarely find the need to use a do/while loop. for and while loops can usually handle whatever I need.
__________________
Server: Intel Core i5 760 Quad, Gigabyte GA-H57M-USB3, 4GB RAM, Gigabyte GeForce 210, 120GB SSD (OS), 1TB SATA, HD HomeRun. Extender: STP-HD300, Harmony 550 Remote, Netgear MCA1001 Ethernet over Coax. SageTV: SageTV Server 7.1.8 on Ubuntu Linux 11.04, SageTV Placeshifter for Mac 6.6.2, SageTV Client 7.0.15 for Windows, Linux Placeshifter 7.1.8 on Server and Client, Java 1.6. Plugins: Jetty, Nielm's Web Server, Mobile Web Interface. |
#8
|
|||
|
|||
Okay dumb question is a String[] basically and array of strings?
|
#9
|
||||
|
||||
That's exactly what it is
If you're interested in learning more about Java, Sun's tutorial is a good reference. Start with a few of the basic topics, you won't need a lot of the advanced ones. And the Collections topic would help explain some of the concepts with arrays, lists, etc. And as always feel free to keep asking questions here
__________________
Server: Intel Core i5 760 Quad, Gigabyte GA-H57M-USB3, 4GB RAM, Gigabyte GeForce 210, 120GB SSD (OS), 1TB SATA, HD HomeRun. Extender: STP-HD300, Harmony 550 Remote, Netgear MCA1001 Ethernet over Coax. SageTV: SageTV Server 7.1.8 on Ubuntu Linux 11.04, SageTV Placeshifter for Mac 6.6.2, SageTV Client 7.0.15 for Windows, Linux Placeshifter 7.1.8 on Server and Client, Java 1.6. Plugins: Jetty, Nielm's Web Server, Mobile Web Interface. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help with removeall in eclipse | PLUCKYHD | SageTV Studio | 3 | 07-29-2009 10:50 AM |
My Frakking array went south | trini0 | The SageTV Community | 0 | 04-03-2008 04:45 PM |
AC3 filter...to pass thru or no pass thru | rwc | SageTV Software | 2 | 04-01-2008 07:54 AM |
Building arrays of arrays in Studio | evilpenguin | SageTV Studio | 2 | 02-15-2007 11:58 AM |
aaaaaaaaaaaagh! Disk array corrupt. | sleonard | SageTV Software | 41 | 12-23-2004 12:35 PM |