Hello there everyone! I am currently having a little bit of trouble getting the Home Movies library working in PlexConnect!
One of the main issues I am currently having that I believe is unrelated to this is that I am running PlexConnect on a VPS that is not on the same local network as the PMS. It gives me an "Unauthorized" Error whenever I attempt to use it so it is useless to connect locally. I can however connect using my Plex.tv account, so I do that then just go to "Shared Libraries" and everything works fine. I do believe its not an error that I need to worry about and so I am not doing anything about it.
04:32:35 PlexAPI: No Response from Plex Media Server
04:32:35 PlexAPI: We failed to reach a server. Reason: Unauthorized
The main error that I am having an issue with is that whenever I attempt to access the "Home Movies" section it gives me the error below. I am not sure what I can do about it so I knew to post it here. I am on the latest commit.
04:29:48 DNSServer: Source: ('(Apple TV IP Address)', 56475)
04:29:48 DNSServer: Domain: trailers.apple.com
04:29:48 DNSServer: ***intercept request
04:29:48 DNSServer: -> DNS response: (VPS IP Address)
04:29:48 WebServer: serving .xml: /library/sections/21
04:29:48 WebServer: serving .xml: /library/sections/21/recentlyAdded
04:29:48 WebServer: File Not Found:
Traceback (most recent call last):
File "/root/PlexConnect/WebServer.py", line 229, in do_GET
XML = XMLConverter.XML_PMS2aTV(PMSaddress, self.path + query, options)
File "/root/PlexConnect/XMLConverter.py", line 381, in XML_PMS2aTV
aTVTree = etree.parse(sys.path[0]+'/assets/templates/'+XMLtemplate)
File "", line 62, in parse
File "", line 26, in parse
IOError: [Errno 21] Is a directory: '/root/PlexConnect/assets/templates/'
Here is a full log of the issue as well as a partial log of where the DNS request started to be received. The full log is also in the Gist. I have removed the three IP addresses.
PS: Not sure, why we check for string "Premium_Music" here, too, as it should have been covered with line 346 already?
Because when I added commit f9d8d30 Quick fix to get Premium Music section to work... I didn't know at that time weather or not the Premium Music sections would need there own set of templates. Turns out they didn't.... But hey if it makes you happy go ahead and change it.
The used scanner is not known, and there is not real defaulting to a section type/template directory for such a case...
Are you able to modify XMLConverter.py, line 343, as shown? Please give it a try and report back -
339 elif cmd.find('Scanner') != -1:
340 dprint(__name__, 1, "Found Scanner.")
341 if cmd.find('Series') != -1: dir = 'TVShow'
342 elif cmd.find('Movie') != -1: dir = 'Movie'
343 elif cmd.find('Video') != -1 or cmd.find('Personal_Media') != -1: dir = 'HomeVideo'
344 elif cmd.find('Premium_Music') != -1: dir = 'Music'
345 elif cmd.find('Photo') != -1: dir = 'Photo'
346 elif cmd.find('Music') != -1 or cmd.find('iTunes') != -1: dir ='Music'
347 cmd = 'NavigationBar'
PS: Not sure, why we check for string "Premium_Music" here, too, as it should have been covered with line 346 already?
I will edit the file and try it now then post my results as an edit to this post.
EDIT: Changing Line 343 to the updated one you provided fixes the issue that I was seeing! I do however get another issue. If I browse by folder in there it works fine, but when I press the menu button it gives the "Trailers is not Available" error. Not a huge deal so I wouldn't worry about looking into it but your fix works! Must have just been an unknown scanner needing to be added. I have submitted a pull request with the fixed code. It can be found here: https://github.com/iBaa/PlexConnect/pull/347
>>but when I press the menu button it gives the "Trailers is not Available" error.
Menu button as in "one step back"?
Roidy, do you have an idea, why this would result in "Trailers not Available"?
Yes, upon entering a tiered folder and browsing the video it gives me that error when I attempt to go one step back. If you would like a full log I can provide as well.
This is the error it produces. Very similar to the one mentioned in the original post.
20:53:38 WebServer: File Not Found:
Traceback (most recent call last):
File "/root/PlexConnect/WebServer.py", line 229, in do_GET
XML = XMLConverter.XML_PMS2aTV(PMSaddress, self.path + query, options)
File "/root/PlexConnect/XMLConverter.py", line 381, in XML_PMS2aTV
aTVTree = etree.parse(sys.path[0]+'/assets/templates/'+XMLtemplate)
File "", line 62, in parse
File "", line 26, in parse
IOError: [Errno 21] Is a directory: '/root/PlexConnect/assets/templates/'