Jump to content

Running Emby on Apple TV 3


Recommended Posts

Posted (edited)

How do I get all the items in the TV collection for example, the friendlyname not the actual directory name?

 

Got it to request virtual folders, not yet parsed it:

 

17:13:14 PlexAPI: xargs: {'X-Plex-Token': 'gJQ25gK2hTJqY8DJmtf8', 'X-Plex-Platform': 'iOS', 'X-Plex-Model': '3,1', 'X-Plex-Client-Platform': 'iOS', 'X-Plex-Client-Identifier': 'DY5xxxxxxxxx', 'X-Plex-Device': 'AppleTV', 'X-Plex-Product': 'PlexConnect', 'X-Plex-Platform-Version': '6.0.2', 'X-Plex-Version': '0.3.1+'}
17:13:14 PlexAPI: ====== received PMS-XML ======
  <ns0:VirtualFolderInfo>
    <ns0:CollectionType>movies</ns0:CollectionType>
    <ns0:Locations>
      <ns1:string>Q:\VIDs\Movies</ns1:string>
 
    </ns0:Locations>
    <ns0:Name>Movies</ns0:Name>
  </ns0:VirtualFolderInfo>
  <ns0:VirtualFolderInfo>
    <ns0:CollectionType>tvshows</ns0:CollectionType>
    <ns0:Locations>
      <ns1:string>Q:\TV</ns1:string>
    </ns0:Locations>
    <ns0:Name>TV</ns0:Name>
  </ns0:VirtualFolderInfo>
  <ns0:VirtualFolderInfo>
    <ns0:CollectionType xsi:nil="true" />
    <ns0:Locations>
      <ns1:string>Q:\VIDs\MMA\UFC</ns1:string>
    </ns0:Locations>
    <ns0:Name>UFC</ns0:Name>
  </ns0:VirtualFolderInfo>
</ns0:ArrayOfVirtualFolderInfo>
 
17:13:14 PlexAPI: ====== PMS-XML finished ======
 
Will continue on this after UFC tonight. :)
Edited by BC101
  • Like 2
Cheesegeezer
Posted

@@BC101 hats off to you fella, i'm very impressed with how far you've gone with this. Please dont give up!

 

Well done and keep up the great work :D

  • Like 2
Posted

problem is the XML that MediaBrowser3 outputs is not compatible with the ElementTree python library im using :\

e.x.

  <ns0:VirtualFolderInfo>
    <ns0:CollectionType>movies</ns0:CollectionType>
    <ns0:Locations>
      <ns1:string>Q:\VIDs\Movies</ns1:string>
      <ns1:string>Q:\VIDs\Standup</ns1:string>
    </ns0:Locations>
    <ns0:Name>Movies</ns0:Name>
  </ns0:VirtualFolderInfo>
  <ns0:VirtualFolderInfo>
    <ns0:CollectionType>tvshows</ns0:CollectionType>
    <ns0:Locations>
      <ns1:string>Q:\TV</ns1:string>
    </ns0:Locations>
    <ns0:Name>TV</ns0:Name>
  </ns0:VirtualFolderInfo>
  <ns0:VirtualFolderInfo>
    <ns0:CollectionType xsi:nil="true" />
    <ns0:Locations>
      <ns1:string>Q:\VIDs\MMA\UFC</ns1:string>
    </ns0:Locations>
    <ns0:Name>UFC</ns0:Name>
  </ns0:VirtualFolderInfo>
</ns0:ArrayOfVirtualFolderInfo>

 

 

 

>>> t2 = ET.ElementTree(file='t2.txt')
>>> t2.getroot()
<Element '{http://schemas.datacontract.org/2004/07/MediaBrowser.Model.Entities}ArrayOfVirtualFolderInfo' at 0x0000000002B53870>
>>> s2 = t2.getroot()
 

If i make the XML more standard it works:

consider fake xml:

<?xml version="1.0"?>
<ArrayOfVirtualFolderInfo>
</ArrayOfVirtualFolderInfo>
 
>>> tree = ET.ElementTree(file='t.txt')
>>> r2 = tree.getroot()
>>> print r2.tag
ArrayOfVirtualFolderInfo
>>> print r2.attrib
{}
>>> 
 
So now i find a way to make it work
Posted

i think its a bug that the xmlconverter is adding extraneous information, need to hunt that down because natively ns0: / ns1: shouldnt be in the xml output.

Posted

Got it. So how do i get the Collection of, for example, TV Shows using xml? I couldn't find the xml url

Posted

I think I found it, parse Items.xml (call /mediabrowser/Users/$userid/Items.xml )

 

>>> for elem in t2.iter():
blah = str(elem.tag)
if (blah.endswith("}Name")) or (blah.endswith("}Id")):
print elem.tag, elem.text
 
 
 
Now to enumerate TV folder, id a4cce7c32133d8344de10518e19ce2ef to show all 40 subfolders (which are the shows themselves)?
Posted

oh i see, need to specify parentid in the Items.xml place i was already at...

Posted

if you're doing folder navigation, then you never really know what anything is. it could be just a folder.

Posted

im trying to find best way to enumerate a Collection

Posted (edited)

Made progress enumerating my TV directory and it displaying in a list. I think will have to limit it because my 40 folders took a while to render.

 

Believe! http://www.youtube.com/watch?v=kxT4Ufis4ns

Edited by BC101
  • Like 2
Posted (edited)

Got a Grid view (7 per row) working (demo shows it for Movies).

New YouTube video demo'ing that is on its way!

 

Thanks for the words of encouragement and support so far. Great community.

Edited by BC101
Posted

It's 2014, MB3 should be competing with Plex (and NetFlix to a degree :)  on the Apple TV by now... here's my progress enumerating Libraries, browsing to Movies, going to a grid view pulling all content from MB3:

http://www.youtube.com/watch?v=hwgvZjxQWVc

  • Like 5
MongooseMan
Posted
me4uty6u.jpg
Cheesegeezer
Posted

I've subscribed, mate you are doing great!!

Posted

We will be supporting separate srt sub stream soon (ish) will that help you out?

Posted (edited)

We will be supporting separate srt sub stream soon (ish) will that help you out?

How? Do you have example API calls or something for that?

 

I'll be experimenting with that js code to implement subtitles outside of MB3. Will be interesting to see how that goes.

 

https://code.google.com/p/hdweb/source/browse/ATV/ce/media.js has some subtitle code in it as well that might be useful

Edited by BC101
Posted

Ya there are no api calls yet but it is in the list so I would hold off with subs for now if you can.

Posted

I hope i can download the srt via the api. i do see GET /Videos/{Id}/Subtitle/{Index} in swagger UI now.

  • Like 1
Posted

yes that can be used to download external subtitle files

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...