PhotoAlbumObject/PhotoObject not reading pictures stored on server

plugin-dev

#1

The way I have my channel setup is to read the the comics I have saved on the server instead of pulling them from a website everytime the channel needs to show the image. I used working code from another channel to get an understanding of exactly what I need to write so I don't think it's the code but it's been a while since I wrote anything with Python so I guess it's possible.

When I try viewing the pages from the web interface I just get a black screen.
When I try viewing the pages from the media player I get a black screen and then it says "There was a problem playing this item".
When I try viewing the pages from the android app I get a default picture icon.
When I try viewing the pages from the xbox app I just get a black screen.

Source Code: http://www.github.com/xeclutch/PhantomComic.bundle


#2

If I had to guess, I'd say the channel code's not allowed to access the local file system.

But better yet, check the server log files. Or try opening http://your_plex_server_address:32400/photos/phantomcomic in a web browser. If there's an error occurring, it'll be printed there.

Note: if you see Unauthorized error in your browser, consult this page.


#3

@czukowski said:
If I had to guess, I'd say the channel code's not allowed to access the local file system.

But better yet, check the server log files. Or try opening http://your_plex_server_address:32400/photos/phantomcomic in a web browser. If there's an error occurring, it'll be printed there.

Note: if you see Unauthorized error in your browser, consult this page.

Thanks for that but even inside of my own network I'm unable to access that page. One of my goals in writing this plugin was to also allow all of my friends, who I'm already sharing libraries with, are able to access the comics. Is there no way that I can make that happen?


#4

Updated the github source, not sure why the previous commits never got pushed by it's updated with the current code now.


#5

@Joshe343
It's not about your own network, what I meant was, it is likely, that the channel code is not allowed to call os.listdir and some other os methods, although I may be mistaken about this. The channels are run in a sandbox that is rather restrictive, much is just forbidden. You need to take a look at the error message from Plex server logs. If you're unable to figure out what that error message means, post it here.


#6

Couldn't be the case because I'm able to read text files and get a list of the folder names using os functions. It's just using the ObjectContainer and PhotoObject that doesn't work. When I pass the path of the pictures on the machine through the url parameter it doesn't work.


#7

Just tested to see if it would work with images located outside of the server and it worked fine. Maybe it just doesn't like the file path and it wants a network URL. My roommate had the idea of passing the file path as a localhost URL but I've got no idea how to form that URL.


#8

Is there any oportunity to have the capability to views/browse CBZ (ZIP) , CBR (RAR) and CB7 (7ZIP) comics book extensions ?
That would be great to read online comics from personal server ;-)