Can't renter viewing a VideoClipObject

In a channel project I'm working on, and I also tested this on the YouTube and Khan Plex channels:
When you click through to view an actual video in the Plex Media Manager, then use the back arrow to move up one level, then click the play button again, you are asked if you want to resume or restart, but when you make a selection, you do not go back to the player. You are instead transferred (after a long wait) to the website for the video at either YouTube or Khan respectively.  On my channel project, it turns into a file download of the stream instead of returning to the player.
This only happens when using the URL Service, not when coded directly (using key and rating_key; not url).
 
Is this by design?  Or an I making a mistake in my URL service (ServiceCode.pys)?
The non-URL Service VCO (bottom of __init__.py file) is configured very similarly to the URL version in ServiceCode.pys.
See:  https://github.com/wtw2/VLC_Channel
Thanks.

This sounds like an issue in Plex/Web to me.  Channels aren't supposed to be able to "resume" where you left off on anything (it's not in the channel framework) and if the Plex App (i.e. Plex/Web) you're testing on is asking that it's an issue with that particular Plex App.  I don't think you've done anything wrong in this case.  Also worth noting is that Plex/Web is probably not a good choice in terms of a Plex App to test things with, you will likely run into a lot of issues there that aren't issues for other Plex Apps.  There are currently quite a few known problems with channels and plex.tv/web in particular so I would advise you to do your primary testing with another Plex App if possible.  You may end up chasing down and working around a lot of things that you really don't need to.

One comment though in terms of your code, I see that you're importing quite a lot of local libs there -- and a lot of them (or at least the same functionality) are things that are already included in the framework such as re, datetime, time, demjson, urllib ... for compatibility purposes working across different devices it's generally best to stick to the framework provided solutions for as much as possible.

Hey!  Thanks for the info.

I assume that by Plex/Web you mean what shows up in the browser as: http://127.0.0.1:32400/web/index.html#!/dashboard

Yes, I didn't think that this problem might be a Plex/Web issue.  I'll have to try it on the Roku.

What are the other Plex Apps?

I am new at this and I only know of the Plex Media Manager (Plex/Web) and the Roku, which is my target platform.

As far as "import"s go, I believe that I received errors when they were not imported.

Should they not be necessary at all?

Am I invoking their methods incorrectly?

What do I need to do to "stick to the framework"?

BTW: This is my first Python project.

I will try to make these changes if I can figure it out.

Follow up comments are greatly appreciated.

Thanks again.

Yes the local Plex/Web is what you are talking about.

There are a bunch of different Plex Apps, besides the ones you know about there's Plex Home Theater (for Windows, OSX and I think there's even a Linux version), Plex for iOS, Android (phones, tablets, Google TV), Windows phone, I think there's also a native Windows 8 client too and probably others that I've missed.  That's one of the reasons why it's so important to not use any imports that you don't have to.  The channel framework provides a lot of those functions for you (usually you have to call them a little differently).

If you haven't looked already check out the Channel docs here:  http://dev.plexapp.com/docs/

For example instead of re there's a Regex functionality in the framework, instead of datetime there's a lot of DateTime functions (you can find all of these in those channel docs).  Also looking at other channels is super helpful for these types of functions as well, the docs aren't always 100% up to date.

For Plex downloads go here and check out all the different stuff listed:  https://plex.tv/downloads

Thanks for the pointers.

I started removing the special "import"s that I can.

I cannot find the Regex functionality in the Framework docs.

I use re.search (many times) and re.split (once).

Do you know if there are Framework alternatives for these?

Thanks.

Also, I use urllib for urlopen.

The problem I have is the Framework's HTTP.Request method does not allow a username:password to be passed in the url in plain text.

like => http://:password@127.0.0.1:5555/requests/status.xml

VLC requires this for its web interface (a Lua login; no username).

Any suggestions to accomplish this?

Thanks.

I figured out the regex interface enough to eliminate the import of "re".

I was creating the Regex() patterns.  I missed that those assignments now have methods, so I should use those names instead of "re. ...".

I am still not completely OOP savvy.

Sorry.

No worries, keep digging around and you'll figure out things, that's the best way to do this sort of thing, to look at other channels.

Thanks again.

I tried the original issue on the Roku.  I can re-enter a video, backing out one level and then back in, repeatedly with the same result each time.

As you stated, there is no resume feature that appears there.  It always starts at the beginning.

It must be a Plex/Web issue/feature.

Issue is resolved.

RE #6 above:

for URL Basic Authentication

HTTP.SetPassword(['http://']+'top level url'+[':'+'port'], 'username', 'password')

What is in [ ] is optional.

If a port will be used in the HTTP.Request() call, it is required in the HTTP.SetPassword.

BTW:

HTTP.CacheTime = CACHE_1HOUR # in seconds
 When using HTTP.Request(), this value sets the time for how long it will take before the
   request is considered expired and a new request will be needed.
   If there is an HTTP.Request() in a method/subroutine, that method will not get called again
   during the cache period.  This can stop MainMenu() from running during this period.

See:  https://forums.plex.tv/topic/100405-failurebug-cant-re-enter-video-clip-playback/#entry591133

The issue is related to the local Plex web app (Version 1.x).  The internet web app is version 2.  Plex will replace the local one supplied with PMS when V 2 is acceptable.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.