Jump to content

Reliable way to identify a single playback session via API?


Recommended Posts

Cr8iveLosr
Posted

Similar to Tautulli, I'm building analytics using the Emby API and I'm running into an issue with playback tracking.

During normal playback the client sends repeated updates like:

  • /Sessions/Playing/Progress

  • /Sessions/Playing/Stopped

  • /Users/{UserId}/PlayedItems/{Id}

Because progress updates are sent frequently (and during pause/seek), a single viewing session generates many events. If you track these directly it looks like multiple plays for the same item.

What I'm trying to determine is:

What is the correct/official way to identify a single playback session using the API?

For example:

  • Is there a recommended session lifecycle to follow?

  • Is there an API endpoint that exposes completed playback sessions?

  • Or is the only reliable method reading the PlaybackActivity table in library.db?

If there isn't currently an API solution, is there a recommended approach for analytics tools that need accurate play/session history without direct database access?

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