mirror of
https://github.com/jeffvli/feishin.git
synced 2026-08-10 06:12:59 +02:00
re-add support for OS songLyrics v1 (#2327)
This commit is contained in:
@@ -2035,12 +2035,22 @@ export const SubsonicController: InternalControllerEndpoint = {
|
|||||||
getStructuredLyrics: async (args) => {
|
getStructuredLyrics: async (args) => {
|
||||||
const { apiClientProps, query } = args;
|
const { apiClientProps, query } = args;
|
||||||
const server = apiClientProps.server;
|
const server = apiClientProps.server;
|
||||||
|
const supportsStructuredLyrics = hasFeatureWithVersion(
|
||||||
|
server,
|
||||||
|
ServerFeature.LYRICS_MULTIPLE_STRUCTURED,
|
||||||
|
1,
|
||||||
|
);
|
||||||
|
|
||||||
const supportsEnhancedLyrics = hasFeatureWithVersion(
|
const supportsEnhancedLyrics = hasFeatureWithVersion(
|
||||||
server,
|
server,
|
||||||
ServerFeature.LYRICS_MULTIPLE_STRUCTURED,
|
ServerFeature.LYRICS_MULTIPLE_STRUCTURED,
|
||||||
2,
|
2,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (!supportsStructuredLyrics && !supportsEnhancedLyrics) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
const res = await ssApiClient(apiClientProps).getStructuredLyrics({
|
const res = await ssApiClient(apiClientProps).getStructuredLyrics({
|
||||||
query: {
|
query: {
|
||||||
enhanced: supportsEnhancedLyrics ? true : undefined,
|
enhanced: supportsEnhancedLyrics ? true : undefined,
|
||||||
|
|||||||
Reference in New Issue
Block a user