ObjectContainer only have 1 TrackObject?

Hello,



I am working on my first Plex channel which is going well so far. I am successfully pulling the info from the 3rd party but noticed something when trying to populate a list of songs to play.



I am just populating a ObjectContainer with a for loop something like:





<br />
oc = ObjectContainer()<br />
<br />
for song in songs:<br />
   oc.Add(TrackObject(ALL THE INFO HERE))<br />
<br />
return oc<br />




now... I know the TrackObject works as when I select it, it streams the music without missing a beat... the problem is it only shows one result! So I tried something else...


<br />
oc = ObjectContainer()<br />
<br />
for song in songs:<br />
   oc.Add(DirectoryObject(ONLY SONG TITLE AND A KEY))<br />
<br />
return oc<br />




The directory doesn't let me play music directly (as it shouldn't) but now all of a sudden all the songs I am expecting show up!

So my question is... Is there only allowed one track object per ObjectContainer? If so, what can I do to get around it?

Disclaimer: This is not actual code but simple versions of my code (removing the part that pulls artist name and such which I know is working).

Disregard. I found the issue…



I am working around a URL Service because I couldn’t get it to work right so I manually build my TrackObject with MediaObjects and so on… Well since the URL property of TrackObject is REQUIRED I just put a dummy URL in… it seems that kept it only showing 1 item. I put a counter and attached the number to the URL and it starts showing them all.