Split software arch desc for easier manintenance. Many fixes related to next video playing and remote playback
This commit is contained in:
@@ -28,7 +28,13 @@ export type SyncOperation =
|
||||
| "unmark_favorite"
|
||||
| "update_progress"
|
||||
| "report_playback_start"
|
||||
| "report_playback_stopped";
|
||||
| "report_playback_stopped"
|
||||
| "playlist_create"
|
||||
| "playlist_delete"
|
||||
| "playlist_rename"
|
||||
| "playlist_add_items"
|
||||
| "playlist_remove_items"
|
||||
| "playlist_reorder_item";
|
||||
|
||||
/**
|
||||
* Simplified sync service - handles offline mutation queueing
|
||||
@@ -164,6 +170,32 @@ class SyncService {
|
||||
return deleted;
|
||||
}
|
||||
|
||||
// ===== Playlist sync operations =====
|
||||
|
||||
async queuePlaylistCreate(playlistId: string, name: string, itemIds: string[]): Promise<number> {
|
||||
return this.queueMutation("playlist_create", playlistId, { name, itemIds });
|
||||
}
|
||||
|
||||
async queuePlaylistDelete(playlistId: string): Promise<number> {
|
||||
return this.queueMutation("playlist_delete", playlistId);
|
||||
}
|
||||
|
||||
async queuePlaylistRename(playlistId: string, name: string): Promise<number> {
|
||||
return this.queueMutation("playlist_rename", playlistId, { name });
|
||||
}
|
||||
|
||||
async queuePlaylistAddItems(playlistId: string, itemIds: string[]): Promise<number> {
|
||||
return this.queueMutation("playlist_add_items", playlistId, { itemIds });
|
||||
}
|
||||
|
||||
async queuePlaylistRemoveItems(playlistId: string, entryIds: string[]): Promise<number> {
|
||||
return this.queueMutation("playlist_remove_items", playlistId, { entryIds });
|
||||
}
|
||||
|
||||
async queuePlaylistReorderItem(playlistId: string, itemId: string, newIndex: number): Promise<number> {
|
||||
return this.queueMutation("playlist_reorder_item", playlistId, { itemId, newIndex });
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear all sync operations for the current user (called during logout)
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user