kingargyle 19 Posted August 20, 2020 Share Posted August 20, 2020 It looks like the PlaybackPositionTicks are not being updated if you use the non session Endpoint. 2020-08-19 16:41:28.805 Info HttpServer: HTTP POST http://192.168.86.162:8096/emby/Users/327d569e5b274a2fadd849006ff61293/PlayingItems/473/Progress?PositionTicks=35710000. UserAgent: okhttp/3.14.9 2020-08-19 16:41:28.820 Info HttpServer: HTTP Response 204 to 192.168.86.168. Time: 15ms. http://192.168.86.162:8096/emby/Users/327d569e5b274a2fadd849006ff61293/PlayingItems/473/Progress?PositionTicks=35710000 That correctly indicates that the PositionTicks end point successfully ran. However when you query the item after stopping in the middle of playback the UserData.playbackPositionTicks is always set to zero. I haven't yet switched to the Session API for updating the progress, as I'll have some work to do to make sure I have a session id when the user starts playing. Is the session Id automatically generated, or is it something I create and pass along to the system when playback starts? Link to comment Share on other sites More sharing options...
Luke 37019 Posted August 20, 2020 Share Posted August 20, 2020 Hi, What did you send when playback stopped? That could be why it's getting reset to 0. Link to comment Share on other sites More sharing options...
kingargyle 19 Posted August 20, 2020 Author Share Posted August 20, 2020 I send the following: usersService.stopPlaying(headerMap(), userId!!, itemId) Which corresponds to: @DELETE("/emby/Users/{userId}/PlayingItems/{itemId}") fun stopPlaying( @HeaderMap headerMap: Map<String, String>, @Path("userId") userId: String, @Path("itemId") itemId: String, @Query("MediaSourceId") mediaSourceId: String? = null ): Call<Void> The mediaSourceId is the only thing I don't send. The start playing item is similar. This is tied into the ExoPlayer stop and start playing listeners. The only time I actually reset the progress is when the video has been completely watched or at least 95% watched. Link to comment Share on other sites More sharing options...
Solution ebr 14904 Posted August 20, 2020 Solution Share Posted August 20, 2020 I don't see any positionticks in your stop call... Link to comment Share on other sites More sharing options...
kingargyle 19 Posted August 20, 2020 Author Share Posted August 20, 2020 4 minutes ago, ebr said: I don't see any positionticks in your stop call... I can try adding those to the call, but the documentation for that end point says that the PositionTicks are optional. http://swagger.emby.media/?staticview=true#/PlaystateService/deleteUsersByUseridPlayingitemsById Before I had upgrade to the 4.3.x server, this worked as expected, if it is now required, I can make sure I pass the info to the end point. Link to comment Share on other sites More sharing options...
ebr 14904 Posted August 20, 2020 Share Posted August 20, 2020 Just now, kingargyle said: says that the PositionTicks are optional. They are optional. If not provided, the call will still work and the value will be defaulted to 0. Link to comment Share on other sites More sharing options...
kingargyle 19 Posted August 20, 2020 Author Share Posted August 20, 2020 Just now, ebr said: They are optional. If not provided, the call will still work and the value will be defaulted to 0. Okay, so the last part might need to be added to the documentation. Thanks. I'll do an update to that call later today. Link to comment Share on other sites More sharing options...
ebr 14904 Posted August 20, 2020 Share Posted August 20, 2020 2 minutes ago, kingargyle said: Okay, so the last part might need to be added to the documentation. Thanks. I'll do an update to that call later today. That is how any optional parameter in an API works. If not supplied, a default is used. Link to comment Share on other sites More sharing options...
kingargyle 19 Posted August 20, 2020 Author Share Posted August 20, 2020 Thanks, adding the PositionTicks to the stopPlaying request seems to have fixed it. 1 Link to comment Share on other sites More sharing options...
Luke 37019 Posted August 20, 2020 Share Posted August 20, 2020 Thanks for the feedback. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now