justinemter / pseudo-channel

This is a python based cli-app using the python-plex-api to control a plex-client and act like a real TV channel with show scheduling, commercial breaks, movie nights, etc. "Home-Brewed TV Channel(s) for Hackers"
GNU General Public License v3.0
130 stars 18 forks source link

Error playing media due to using section name instead of user library name #64

Closed MoRBiD-MaNGLeR closed 6 years ago

MoRBiD-MaNGLeR commented 6 years ago

Pseudo Channel won't work for Movies and TV Shows unless this is set in pseudo_config.py and the same library names are in PLEX. I can't specify custom names:

plexLibraries = { "TV Shows" : ["TV Shows"], "Movies" : ["Movies"], "Commercials" : ["Commercials"], }

When I do specify custom names, like this...

plexLibraries = { "TV Shows" : ["TV-Heroes"], "Movies" : ["Mov-Musicals"], "Commercials" : ["Commercials"], }

...then the schedule will generate (although it won't display the HTML background if that video is not found), but the media play will result in an error, like this one:

Output showing library and media-play errors: +++++ Queueing up 'The Rocky Horror Picture Show - A Preservation' to play right away.

Starting Media: 'The Rocky Horror Picture Show - A Preservation'
Media Offset: '3248' seconds.

(4, 1510667465, 0, u'The Rocky Horror Picture Show - A Preservation', 0, 0, u'', 6236288, u'04:57:00 AM', u'1900-01-01 06:40:56.288000', u'everyday', u'Movies', u'/library/metadata/16261') None Invalid library section: Movies

There was an error trying to play the media.

+++++ Currently Playing: The Rocky Horror Picture Show - A Preservation +++++ Html refresh flag: 1

It appears that the code is calling the section name rather than the user library name, for example: movie = self.PLEX.library.section(mediaType).get(mediaTitle)

MoRBiD

justinemter commented 6 years ago

This seems to be now working on the "custom-section-name" branch. Making note of it here so we can close this when all's confirmed to be working.