Looking for a developer to make an app

When you look at a season, like:

<MediaContainer size="1" allowSync="1" identifier="com.plexapp.plugins.library" librarySectionID="2" librarySectionTitle="Old TV Shows" librarySectionUUID="94102838-a992-411c-b237-cedaf41e26f0" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1531739939">
<Directory ratingKey="5687" key="/library/metadata/5687/children" parentRatingKey="5638" guid="com.plexapp.agents.thetvdb://268592/1?lang=en" librarySectionTitle="Old TV Shows" librarySectionID="2" librarySectionKey="/library/sections/2" type="season" title="Season 1" parentKey="/library/metadata/5638" parentTitle="The 100" summary="" index="1" parentIndex="1" thumb="/library/metadata/5687/thumb/1532246173" art="/library/metadata/5638/art/1532247429" parentThumb="/library/metadata/5638/thumb/1532247429" parentTheme="/library/metadata/5638/theme/1532247429" leafCount="13" viewedLeafCount="0" addedAt="1532246025" updatedAt="1532246173">
<Extras size="0"> </Extras>
</Directory>
</MediaContainer>

Then it’s the thumb entry

1 Like

And adding…

To grap all seasons for a library, use like:

http://IPOfPMS:32400/library/sections/X/all?type=3

Again, please use paging when doing so !!!

1 Like

And the same goes for shows and episodes :wink:

1 Like

library item and key (X in your URLs)

The need for the plex token is annoying when i got access to all files without it, just missing which poster was selected… Any way to get or not need the plex token?

1 Like

If it’s a plugin, then skip the token, since auto authenticated :wink:

In fact, it’s a security issue to have this as a plugin, since the token then get’s logged !

1 Like

And bedtime here now, so you are on your own for a while :sleeping:

1 Like

Thanks a lot dane22, despite maintaining hama and the absolute series scanner i am not that knowledgeable about Plex inner workings.

  ### Plex Library XML ###
  PLEX_LIBRARY, PLEX_LIBRARY_URL = {}, "http://127.0.0.1:32400/library/sections/"    # Allow to get the library name to get a log per library https://support.plex.tv/hc/en-us/articles/204059436-Finding-your-account-token-X-Plex-Token
  try:
    library_xml = etree.fromstring(urllib2.urlopen(PLEX_LIBRARY_URL).read())
    for library in library_xml.iterchildren('Directory'):
      for path in library.iterchildren('Location'):
        PLEX_LIBRARY[path.get("path")] = library.get("title")
        Log.Info( path.get("path") + " = " + library.get("title") )
  except Exception as e:  Log.Info("Exception: '{}'".format(e))
  Log.Info('PLEX_LIBRARY: {}'.format(PLEX_LIBRARY))

Exception: ‘HTTP Error 401: Unauthorized’
:confused:

1 Like

@ZeroQI

This is due to the fact, that you are not using the framework to call the loopback

Got a GitHub link?

1 Like

@dane22 https://github.com/ZeroQI/LME.bundle
Managed to load xmls without token, as you predicted, thanks a lot. Will have to change HAMA code as i did it wrong there too :stuck_out_tongue:
Would you have an example of paging with xml by any chance?

2 Likes

https://github.com/ukdtom/ExportTools.bundle/blob/master/Contents/Code/init.py#L589

Look for the params X-Plex-Container-Start and X-Plex-Container-Size

1 Like

So, if the poster is in the “thumb” entry, is the background/fanart found in the “art” entry?

That is correct :wink:

Look at me!! I could be a developer now!!:rofl:

1 Like

@ZeroQI

I see you are making lots of progress here, and use ExportTools as a template, which is good.

Do note though, that if dumping a large library, you need to run it in a thread, due to timeouts of the framework

https://github.com/ukdtom/ExportTools.bundle/blob/master/Contents/Code/init.py#L330

Much better thanks to your advice, @Dane22

Series (w/ season folders), movies, collections support so far

  • need to add Thread, Artist and Album support,
  • need to add collection import but export ok (apart summary for now)
1 Like

@dane22 Have a look at the code, export working, collection summary restoration ok but struggle with collection poster and fanart restoration though… Any idea on how to achieve that? … https://github.com/pkkid/python-plexapi/issues/179 and https://github.com/defract/TMDB-Collection-Data-Retriever/blob/master/collection_updater.py indicate how to upload an url but not a local file. will add to UAS hama, lambda, youtube-agent shortly

Use Chrome in debug mode (F12) with the Web-Client, replicate, and then in debug mode you can see what calls needs to be made

@ZeroQI has done it! Look here

[REL] Lambda (Local Assets-Metadata Double Agent) for Plex Metadata export

I love the idea for the project. I just recently moved to a new Plex instance, but I’m keeping the other up to try and find any locked fields I made in the old server.

Would there be a way to export only locked fields to a central folder?

Look up Export tools