Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RasPlex 1.8.0 not saving play status in PMS 1.15.3.876 #631

Open
trumpy81 opened this issue Apr 5, 2019 · 27 comments
Open

RasPlex 1.8.0 not saving play status in PMS 1.15.3.876 #631

trumpy81 opened this issue Apr 5, 2019 · 27 comments

Comments

@trumpy81
Copy link

trumpy81 commented Apr 5, 2019

After watching a TV Show or Movie, if playback is stopped at any point, instead of saving the play state, Plex will immediately revert to an unplayed state.

I have verified that the play state is saved correctly when using Plex/Web, but not when using RasPlex on the RPi2 or 3.

The problem started with PMS version 1.15.2.793, so I guess something has changed in PMS?

RPi model: RPi 2 or RPi 3B (not plus)
RasPlex: 1.8.0 default skin
PMS: PlexMediaServer-1.15.3.876-ad6e39743 on Synology or Windows 10
Network: WiFi

@trumpy81
Copy link
Author

trumpy81 commented Apr 9, 2019

For some strange unknown reason, this has miraculously started working.

Beats me why it was not working. I can only imagine there was some kind of network issue preventing things from communicating correctly.

@trumpy81 trumpy81 closed this as completed Apr 9, 2019
@trumpy81 trumpy81 reopened this Apr 9, 2019
@trumpy81
Copy link
Author

trumpy81 commented Apr 9, 2019

Seems that I was premature. The issue has re-emerged.

Again, it is no longer saving the play state of of any video.

@Guy0me
Copy link

Guy0me commented Apr 12, 2019

Hello i have the same issue on RPi3 since the version 1.15.3 of Plex Media Server, TV Show or Movie, or anything else.. if playback is stopped at any point, instead of saving the play state its start from the beginning.
I do the same action on a plex apps on Hisense TV there is no issue.

@ArnieLister
Copy link

I'm experiencing the same problem since server updated to 1.15.3.876. Confirmed on 3 pi's (2 RPi3 and 1 RPi2) each with separate RasPlex installations. PMP embedded for Pi (2.31 nightly build) does not have this issue, strongly indicates an incompatibility has been introduced specific to RasPlex.

@dalehamel
Copy link
Member

I have noticed this issue specifically with transcoded content.

With content that can be played back natively on the raspberry pi, this issue doesn't seem to occur.

PMP embedded for Pi (2.31 nightly build) does not have this issue, strongly indicates an incompatibility has been introduced specific to RasPlex.

PMP is a newer codebase, and may have newer handling for such errors with transcoding.

Has anyone noticed this issue with native playback? Eg, you don't see a transcoding window? Do you still experience the issue after restarting the plex server process, and rebooting the raspberry pi?

@ArnieLister
Copy link

This topic has been more widely discussed for OpenPHT here with responses from Plex employees:

https://forums.plex.tv/t/lasts-2-versions-broke-save-resume-opht/396505

Plex are laying the fault with long standing bugs with OpenPHT (and therefore RasPlex) reporting play progress incorrectly to the server. Latest PMS updates have become less tolerant of these bugs in an effort to improve resume performance in other apps. AFAIK OpenPHT isn't being developed anymore, so this could be a serious nail in its coffin.

@dalehamel
Copy link
Member

@ArnieLister I’ll take a look when I have the chance. I haven’t seen the issue with non-transcoded content, even on the latest server version.

If the bugs are well defined I’m sure it can be patched, but I can’t fix what I can’t reproduce

@ArnieLister
Copy link

@dalehamel I can confirm that I get the problem when playing non-transcoded original quality direct-play content. RasPlex is still far nicer and way more responsive UI experience than PMP embedded, but this is a show stopper for me.

@dalehamel
Copy link
Member

I can confirm I can reproduce this.

I’ll look into what code needs to be changed, but if you’re aware of any forum posts that describe the API issue it would make it easier to fix

@ArnieLister
Copy link

This comment by plex employee gbooker02 refers to an OPHT bug in the resume process:

https://forums.plex.tv/t/lasts-2-versions-broke-save-resume-opht/396505/4

@paul-bsc
Copy link

Seeing the same behavior my side. Really wish I could help to try and revive this. RasPlex is by and far the best Plex client.

The following two commits could at least maybe provide some clues?

This one seems to touch most of the resume process: RasPlex/OpenPHT@6791924

This one specifically looks at transcoding resume:
RasPlex/OpenPHT@916f34a

This file seems to be the best lead given the comment made on the Plex forum: https://github.com/RasPlex/OpenPHT/blob/60b75e1ab50495e28b76c8f2959fba3f409bcb8b/xbmc/utils/SaveFileStateJob.h

But for the life of me I can't find any solid reference to the API changes in PMS - probably just not looking in the right places.

@dalehamel
Copy link
Member

Thank you, these links are helpful.

I will also look at plex media player to compare what it’s source code does differently for saving. Although it uses different frameworks (I believe it’s Qt instead of Boost), it should clearly show the proper client behaviour.

I recently updated my own server and started experiencing this issue as well. Since it is annoying me directly I have my own motivations to fix it ;)

I’m coming up on having a month off for the first time in ages, no promises but this is on my list of things to do (as well as getting a 3B+ build out).

@paul-bsc
Copy link

Excellent! I'm also happy to try and get the dev build process working on my side to help where I can, but judging from comments on other issues raised it looks like it may be tricky at this stage. I will make time in the next few weeks to see if I can get that working locally.

@paul-bsc
Copy link

This looks like the correct commit to reference in PMP.

@dalehamel
Copy link
Member

The corresponding code in openpht appears to live in https://github.com/RasPlex/OpenPHT/blob/openpht-1.9/plex/Client/PlexTimelineManager.cpp

@dalehamel
Copy link
Member

There appear to be a number of lovely log statements peppered throughout the relevant code here.

If someone has a moment, it would be helpful to see the logs of it failing to update the play progress. I imagine it will give some helpful clues.

@paul-bsc if what you indicated, then they just added an api to distinguish between "stopped" and "finished/canceled". If that's the case, the change might be trivial to support.

@dalehamel
Copy link
Member

https://github.com/RasPlex/OpenPHT/blob/openpht-1.9/plex/Client/PlexTimelineManager.cpp#L251-L255

https://github.com/RasPlex/OpenPHT/blob/60b75e1ab50495e28b76c8f2959fba3f409bcb8b/plex/PlexTypes.h#L69-L74

That enum probably needs to be updated to match https://github.com/plexinc/plex-media-player/blob/304f4da215f2c050e9618b94c18c0ef55a6cc962/src/player/PlayerComponent.h#L130-L137 and https://github.com/RasPlex/OpenPHT/blob/60b75e1ab50495e28b76c8f2959fba3f409bcb8b/plex/PlexUtils.cpp#L783-L800 to get the string representation.

This is what is used to build HTTP request that is sent to the plex server. Those changes to reflect the changes in play states made and expected upstream are certainly needed. From my read of that PR, they ignore the "stopped" state, so setting this to "cancelled" would likely get the desired behavior to work again quite quickly.

beyond that, additional handling to ensure that finish and canceled are handled appropriately is probably also needed.

@dalehamel
Copy link
Member

Started working on RasPlex/OpenPHT#315 to address this issue

@snix47
Copy link

snix47 commented May 19, 2019

I have the same problem, rasplex does not save play status since I upgraded plex server to latest version.

@dalehamel
Copy link
Member

dalehamel commented May 19, 2019

Plex folks have said they’ll be fixing it (server side) out of courtesy, and it’ll be when the next release they cut is out.

I tried the latest server version as of May 15 and it’s not yet landed in that.

The plex forum post describes the API issue nicely, so I can update my patch accordingly.

Have a build that might fix it but not yet tested.

@wurlyfan
Copy link

wurlyfan commented Jun 8, 2019

I have same problem, and have switched to PMP embedded for Pi as a temporary solution. Keen to get back to RasPlex, though, as soon as this is issue is resolved.

@lochstar
Copy link

lochstar commented Jun 8, 2019

Beta PMS version 1.15.8.1198 landed yesterday.

Certain clients (third party Samsung and OpenPHT) would fail to resume video.

@wurlyfan
Copy link

I can't see this latest version - does it address the play status issue for RasPlex?

@dalehamel
Copy link
Member

Yes I can confirm the server release mentioned (in the beta channel, available to plex pass holders for now, generally available at a later date I believe) fixes the issue for me.

I still intend to finish the PR i mentioned earlier that should update the API, allowing rasplex to work with any server version without needing this special quirk handling.

In the meantime, the updated server is confirmed to work around this issue for rasplex.

@Guy0me
Copy link

Guy0me commented Jun 11, 2019

So now what do we have to do to get it working ?
an update is it previewed on Rasplex automatically on server side or should it be an update on client side ? i mean on the raspberry directly ?
Thanks in advance.

@lochstar
Copy link

@Guy0me Automatically on the server side. Hopefully @dalehamel will have a Rasplex update soon that will prevent it coming up again in the future.

@dalehamel
Copy link
Member

I've been able to confirm that the fix that Plex released to their server resolves this issue for now.

I intend to get to this in order to be compliant with the new API, but it's a higher priority to get the latest LibreELEC pulled in, as that will be what brings support for #630 and #635, and will allow for continued support of RasPlex on future versions of the Raspberry Pi.

Hopefully the patched server is generally available already or will be soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants