|
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
|
|||
|
|||
Working with Arrays
OK, I'm probably missing something obvious here, but I just got started playing with Studio.
I'm trying to load all songs by an artist into a playlist, and start playing that playlist, just by pressing the Play button when the artist is selected. I don't want any intermediate selection screens/windows. Obviously, I call GetAllMusicForArtist, which returns the "Airings" as an array. Obviously, I want to call AddToPlaylist for each of these airings, since AddToPlaylist only accepts a single airing. Unfortunately, I'm reminded of an old cartoon, where two scientists stand in front of a large blackboard. On the left side is a hugely complex equation. On the right side is a hugely complex equation. In the middle are the words "and then a miracle occurs". I'm missing the miracle. I see the looping capability, but I don't see a way to interate through the array (determine the upper/lower bounds to control the loop, or any sort of FOR EACH type of ability), much less access individual elements of it. I'm just missing the miracle in the middle. Thanks in advance for pointing out the obvious solution, because I'm sure there is one! |
#2
|
||||
|
||||
You can use Size(<array>) to get the number of elements in the list.
To get a particular element in the list, use the GetElement(<list>, index) API call, where index is 0 for the first element. For basic loop concepts, see "Tutorial 10 – Loops" in the Studio manual + accompanying tutorial STV. There are loops using GetElement() all over the default STV -- if you do a search for "GetElement(" (w/o quotes), you will run across lots of loops... but the search could take a little while to complete. - Andy
__________________
SageTV Open Source v9 is available. - Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1. - Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus - HD Extenders: A) FAQs B) URC MX-700 remote setup Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request. |
#3
|
|||
|
|||
Thanks, Andy. I appreciate the guidance.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|