mirror of
https://github.com/wkulhanek/bonob.git
synced 2025-12-22 01:43:29 +01:00
Add index.ts for subsonic
This commit is contained in:
22
src/subsonic/navidrome.ts
Normal file
22
src/subsonic/navidrome.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { ArtistSummary, Sortable } from "../music_service";
|
||||
import { artistImageURN } from "./generic";
|
||||
|
||||
export type NDArtist = {
|
||||
id: string;
|
||||
name: string;
|
||||
orderArtistName: string | undefined;
|
||||
largeImageUrl: string | undefined;
|
||||
};
|
||||
|
||||
export const artistSummaryFromNDArtist = (
|
||||
artist: NDArtist
|
||||
): ArtistSummary & Sortable => ({
|
||||
id: artist.id,
|
||||
name: artist.name,
|
||||
sortName: artist.orderArtistName || artist.name,
|
||||
image: artistImageURN({
|
||||
artistId: artist.id,
|
||||
artistImageURL: artist.largeImageUrl,
|
||||
}),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user