mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 10:23:33 +00:00
Merge branch 'development' into related-similar-songs
This commit is contained in:
commit
132b0e173f
69 changed files with 891 additions and 565 deletions
|
|
@ -3,7 +3,7 @@ import { jfType } from '/@/renderer/api/jellyfin/jellyfin-types';
|
|||
import { initClient, initContract } from '@ts-rest/core';
|
||||
import axios, { AxiosError, AxiosResponse, isAxiosError, Method } from 'axios';
|
||||
import qs from 'qs';
|
||||
import { ServerListItem } from '/@/renderer/types';
|
||||
import { ServerListItem } from '/@/renderer/api/types';
|
||||
import omitBy from 'lodash/omitBy';
|
||||
import { z } from 'zod';
|
||||
import { authenticationFailure } from '/@/renderer/api/utils';
|
||||
|
|
|
|||
|
|
@ -61,6 +61,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(',');
|
||||
|
|
@ -959,7 +960,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,
|
||||
};
|
||||
};
|
||||
|
||||
const getSimilarSongs = async (args: SimilarSongsArgs): Promise<Song[]> => {
|
||||
|
|
|
|||
|
|
@ -10,8 +10,9 @@ import {
|
|||
Playlist,
|
||||
MusicFolder,
|
||||
Genre,
|
||||
ServerListItem,
|
||||
ServerType,
|
||||
} from '/@/renderer/api/types';
|
||||
import { ServerListItem, ServerType } from '/@/renderer/types';
|
||||
|
||||
const getStreamUrl = (args: {
|
||||
container?: string;
|
||||
|
|
|
|||
|
|
@ -675,6 +675,10 @@ const similarSongs = pagination.extend({
|
|||
Items: z.array(song),
|
||||
});
|
||||
|
||||
export enum JellyfinExtensions {
|
||||
SONG_LYRICS = 'songLyrics',
|
||||
}
|
||||
|
||||
export const jfType = {
|
||||
_enum: {
|
||||
albumArtistList: albumArtistListSort,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue