[Enhancement]: Fewer arguments required for syncing local playback sessions #2317

Open
opened 2026-04-25 00:06:04 +02:00 by adam · 1 comment
Owner

Originally created by @ameyp on GitHub (Oct 20, 2024).

Type of Enhancement

Server Backend

Describe the Feature/Enhancement

It would be great if https://api.audiobookshelf.org/#sync-local-sessions needed fewer arguments. It would be great if it didn't require a whole amount of the corresponding libraryItem's data to be sent along with the request. The backend already has all the information about the item's chapters, metadata etc., and none of those can be changed by the playback session as far as I know.

Why would this be helpful?

I'm working on an Android app for ABS, and would really love if I didn't have to pass all that information along with the request. It seems superfluous, which is why I'm not storing it locally alongside a PlaybackSession object.

Independent of my preferences, it would simplify that particular API significantly for other users too.

Future Implementation (Screenshot)

As far as I can tell, the following JSON should suffice

{
  "id": "play_c786zm3qtjz6bd5q3n",
  "userId": "root",
  "libraryId": "lib_p9wkw2i85qy9oltijt",
  "libraryItemId": "li_bufnnmp4y5o2gbbxfm",
  "episodeId": "ep_lh6ko39pumnrma3dhv",
  "mediaType": "podcast",
  "duration": 1454.18449,
  "playMethod": 0,
  "mediaPlayer": "unknown",
  "deviceInfo": {...},
  "serverVersion": "2.4.4",
  "date": "2022-11-11",
  "dayOfWeek": "Friday",
  "timeListening": 0,
  "startTime": 0,
  "currentTime": 0,
  "startedAt": 1668206493239,
  "updatedAt": 1668206493239
}

Audiobookshelf Server Version

v2.12.3

Current Implementation (Screenshot)

https://api.audiobookshelf.org/#sync-local-sessions

Originally created by @ameyp on GitHub (Oct 20, 2024). ### Type of Enhancement Server Backend ### Describe the Feature/Enhancement It would be great if https://api.audiobookshelf.org/#sync-local-sessions needed fewer arguments. It would be great if it didn't require a whole amount of the corresponding libraryItem's data to be sent along with the request. The backend already has all the information about the item's chapters, metadata etc., and none of those can be changed by the playback session as far as I know. ### Why would this be helpful? I'm working on an Android app for ABS, and would really love if I didn't have to pass all that information along with the request. It seems superfluous, which is why I'm not storing it locally alongside a PlaybackSession object. Independent of my preferences, it would simplify that particular API significantly for other users too. ### Future Implementation (Screenshot) As far as I can tell, the following JSON _should_ suffice ``` { "id": "play_c786zm3qtjz6bd5q3n", "userId": "root", "libraryId": "lib_p9wkw2i85qy9oltijt", "libraryItemId": "li_bufnnmp4y5o2gbbxfm", "episodeId": "ep_lh6ko39pumnrma3dhv", "mediaType": "podcast", "duration": 1454.18449, "playMethod": 0, "mediaPlayer": "unknown", "deviceInfo": {...}, "serverVersion": "2.4.4", "date": "2022-11-11", "dayOfWeek": "Friday", "timeListening": 0, "startTime": 0, "currentTime": 0, "startedAt": 1668206493239, "updatedAt": 1668206493239 } ``` ### Audiobookshelf Server Version v2.12.3 ### Current Implementation (Screenshot) https://api.audiobookshelf.org/#sync-local-sessions
adam added the enhancement label 2026-04-25 00:06:04 +02:00
Author
Owner

@nichwall commented on GitHub (Apr 20, 2025):

Partially handled by https://github.com/advplyr/audiobookshelf/pull/3690

@nichwall commented on GitHub (Apr 20, 2025): Partially handled by https://github.com/advplyr/audiobookshelf/pull/3690
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#2317