mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 10:23:33 +00:00
Normalize server feature set
This commit is contained in:
parent
dae2f9bd0a
commit
f1f6ccfd02
9 changed files with 63 additions and 30 deletions
|
|
@ -59,6 +59,7 @@ import packageJson from '../../../../package.json';
|
|||
import { z } from 'zod';
|
||||
import { JFSongListSort, JFSortOrder } from '/@/renderer/api/jellyfin.types';
|
||||
import isElectron from 'is-electron';
|
||||
import { ServerFeatures } from '/@/renderer/api/features.types';
|
||||
|
||||
const formatCommaDelimitedString = (value: string[]) => {
|
||||
return value.join(',');
|
||||
|
|
@ -957,7 +958,16 @@ const getServerInfo = async (args: ServerInfoArgs): Promise<ServerInfo> => {
|
|||
throw new Error('Failed to get server info');
|
||||
}
|
||||
|
||||
return { id: apiClientProps.server?.id, version: res.body.Version };
|
||||
const features: ServerFeatures = {
|
||||
smartPlaylists: false,
|
||||
songLyrics: true,
|
||||
};
|
||||
|
||||
return {
|
||||
features,
|
||||
id: apiClientProps.server?.id,
|
||||
version: res.body.Version,
|
||||
};
|
||||
};
|
||||
|
||||
export const jfController = {
|
||||
|
|
|
|||
|
|
@ -665,6 +665,10 @@ const serverInfo = z.object({
|
|||
Version: z.string(),
|
||||
});
|
||||
|
||||
export enum JellyfinExtensions {
|
||||
SONG_LYRICS = 'songLyrics',
|
||||
}
|
||||
|
||||
export const jfType = {
|
||||
_enum: {
|
||||
albumArtistList: albumArtistListSort,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue