Skip to content

Commit

Permalink
pull subsonic out into proper class (#217)
Browse files Browse the repository at this point in the history
  • Loading branch information
simojenki authored Feb 3, 2025
1 parent dd52c57 commit 6bc4c79
Show file tree
Hide file tree
Showing 4 changed files with 601 additions and 693 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:20-bullseye-slim as build
FROM node:20-bullseye-slim AS build

WORKDIR /bonob

Expand Down
16 changes: 10 additions & 6 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import logger from "./logger";
import {
axiosImageFetcher,
cachingImageFetcher,
Subsonic,
SubsonicMusicService,
TranscodingCustomPlayers,
NO_CUSTOM_PLAYERS
NO_CUSTOM_PLAYERS,
Subsonic
} from "./subsonic";
import { InMemoryAPITokens, sha256 } from "./api_tokens";
import { InMemoryLinkCodes } from "./link_codes";
Expand Down Expand Up @@ -40,10 +41,13 @@ const artistImageFetcher = config.subsonic.artistImageCache
? cachingImageFetcher(config.subsonic.artistImageCache, axiosImageFetcher)
: axiosImageFetcher;

const subsonic = new Subsonic(
config.subsonic.url,
customPlayers,
artistImageFetcher
const subsonic = new SubsonicMusicService(
new Subsonic(
config.subsonic.url,
customPlayers,
artistImageFetcher
),
customPlayers
);

const featureFlagAwareMusicService: MusicService = {
Expand Down
Loading

0 comments on commit 6bc4c79

Please sign in to comment.