mirror of
https://github.com/wkulhanek/bonob.git
synced 2025-12-21 17:33:29 +01:00
Query albums by genre
This commit is contained in:
23
src/smapi.ts
23
src/smapi.ts
@@ -6,7 +6,12 @@ import path from "path";
|
||||
import logger from "./logger";
|
||||
|
||||
import { LinkCodes } from "./link_codes";
|
||||
import { AlbumSummary, MusicLibrary, MusicService, slice2 } from "./music_service";
|
||||
import {
|
||||
AlbumSummary,
|
||||
MusicLibrary,
|
||||
MusicService,
|
||||
slice2,
|
||||
} from "./music_service";
|
||||
|
||||
export const LOGIN_ROUTE = "/login";
|
||||
export const SOAP_PATH = "/ws/sonos";
|
||||
@@ -250,14 +255,14 @@ function bindSmapiSoapServiceToExpress(
|
||||
total: result.total,
|
||||
})
|
||||
);
|
||||
case "albums":
|
||||
return await musicLibrary.albums(paging).then((result) =>
|
||||
getMetadataResult({
|
||||
mediaCollection: result.results.map(album),
|
||||
index: paging._index,
|
||||
total: result.total,
|
||||
})
|
||||
);
|
||||
case "albums":
|
||||
return await musicLibrary.albums(paging).then((result) =>
|
||||
getMetadataResult({
|
||||
mediaCollection: result.results.map(album),
|
||||
index: paging._index,
|
||||
total: result.total,
|
||||
})
|
||||
);
|
||||
case "artist":
|
||||
return await musicLibrary
|
||||
.artist(typeId!)
|
||||
|
||||
Reference in New Issue
Block a user