Jump to content

Playback Position Update


kingargyle

Recommended Posts

kingargyle

Since upgrading to the latest Emby Server (4.3.0, haven't download 4.3.1 yet).  I'm noticing some inconsistency with updating the playback position of a currently playing item.  For background I'm using the following endpoints since the 3.x days of the server:

  @POST("/emby/Users/{userId}/PlayingItems/{itemId}/Progress")
  fun progress(
    @HeaderMap headerMap: Map<String, String>,
    @Path("userId") userId: String,
    @Path("itemId") itemId: String,
    @Query("MediaSourceId") mediaSourceId: String? = null,
    @Query("PositionTicks") positionTicks: Long
  ): Call<Void>

  @POST("/emby/Users/{userId}/PlayingItems/{itemId}")
  fun startPlaying(
    @HeaderMap headerMap: Map<String, String>,
    @Path("userId") userId: String,
    @Path("itemId") itemId: String,
    @Query("MediaSourceId") mediaSourceId: String? = null
  ): Call<Void>

  @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>

This has been working in the 3.x series pretty well, however under the 4.3.x, data fetched after playback will have the resume position offset as 0, and I also notice in the dashboard that the playback session doesn't seem to be updated.  I'm getting valid response codes so it looks like the position is being sent and updated.

 

My question is, should I still be using the User Playback API, or do I need to now be using the various endpoints under the Session API for playback?   If do use the Session API, I'm assuming that UserId isn't required as it will associate the user by using the Authorization token.

 

Thanks

 

Dave

   

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...