Fix server queue saving/restoring on Navidrome and OpenSubsonic (#1828)

* fix server queue saving

* fix error when attempting to restore empty queue

* queue items optional

* make playQueueByIndex optional

* fix incorrect error message
This commit is contained in:
Lyall
2026-03-12 13:41:50 +00:00
committed by GitHub
parent 16b713bc85
commit dfdac28f53
5 changed files with 32 additions and 46 deletions
+1 -1
View File
@@ -709,7 +709,7 @@ const queue = z.object({
createdAt: z.string(),
current: z.number(),
id: z.string(),
items: z.array(song),
items: z.array(song).optional(),
position: z.number(),
updatedAt: z.string(),
userId: z.string(),
+10 -8
View File
@@ -667,14 +667,16 @@ const playQueue = z.object({
});
const playQueueByIndex = z.object({
playQueueByIndex: z.object({
changed: z.string(),
changedBy: z.string(),
currentIndex: z.number().optional(),
entry: song.array().optional(),
position: z.number().optional(),
username: z.string(),
}),
playQueueByIndex: z
.object({
changed: z.string(),
changedBy: z.string(),
currentIndex: z.number().optional(),
entry: song.array().optional(),
position: z.number().optional(),
username: z.string(),
})
.optional(),
});
const internetRadioStation = z.object({