From f8c2ff735b2284ed7073ff442ee8f29fb431f30b Mon Sep 17 00:00:00 2001 From: jeffvli Date: Thu, 19 Sep 2024 20:39:47 -0700 Subject: [PATCH 1/3] Replace "SortName" for "Name" in Jellyfin song sort --- src/renderer/api/jellyfin.types.ts | 2 +- src/renderer/api/jellyfin/jellyfin-types.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/api/jellyfin.types.ts b/src/renderer/api/jellyfin.types.ts index dae3f8d3d..f22febbaa 100644 --- a/src/renderer/api/jellyfin.types.ts +++ b/src/renderer/api/jellyfin.types.ts @@ -574,7 +574,7 @@ export enum JFSongListSort { ARTIST = 'Artist,Album,SortName', COMMUNITY_RATING = 'CommunityRating,SortName', DURATION = 'Runtime,AlbumArtist,Album,SortName', - NAME = 'SortName,Name', + NAME = 'Name', PLAY_COUNT = 'PlayCount,SortName', RANDOM = 'Random,SortName', RECENTLY_ADDED = 'DateCreated,SortName', diff --git a/src/renderer/api/jellyfin/jellyfin-types.ts b/src/renderer/api/jellyfin/jellyfin-types.ts index 97b13de03..70b402a56 100644 --- a/src/renderer/api/jellyfin/jellyfin-types.ts +++ b/src/renderer/api/jellyfin/jellyfin-types.ts @@ -545,7 +545,7 @@ const songListSort = { ARTIST: 'Artist,Album,SortName', COMMUNITY_RATING: 'CommunityRating,SortName', DURATION: 'Runtime,AlbumArtist,Album,SortName', - NAME: 'SortName,Name', + NAME: 'Name', PLAY_COUNT: 'PlayCount,SortName', RANDOM: 'Random,SortName', RECENTLY_ADDED: 'DateCreated,SortName', From 28c12496f11028e2d7b4aada36377109f53b47d7 Mon Sep 17 00:00:00 2001 From: Jamie King Date: Fri, 20 Sep 2024 14:26:28 +0100 Subject: [PATCH 2/3] Removed references to "ElectronReact" in MacOS menu bar (#756) --- src/main/menu.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/menu.ts b/src/main/menu.ts index e5baa6860..0a2a05478 100644 --- a/src/main/menu.ts +++ b/src/main/menu.ts @@ -48,7 +48,7 @@ export default class MenuBuilder { label: 'Electron', submenu: [ { - label: 'About ElectronReact', + label: 'About Feishin', selector: 'orderFrontStandardAboutPanel:', }, { type: 'separator' }, @@ -56,7 +56,7 @@ export default class MenuBuilder { { type: 'separator' }, { accelerator: 'Command+H', - label: 'Hide ElectronReact', + label: 'Hide Feishin', selector: 'hide:', }, { From e3946a94133fe331e93b206df165ddbc4c51c51b Mon Sep 17 00:00:00 2001 From: Jeff <42182408+jeffvli@users.noreply.github.com> Date: Sun, 22 Sep 2024 18:37:13 -0700 Subject: [PATCH 3/3] Update Navidrome list sort mappings for ND v0.53.2 (#754) * Update navidrome list sort mappings * Rename ownerName to owner_name * Remove deprecated client-side sort --- src/renderer/api/navidrome.types.ts | 10 +++---- .../api/navidrome/navidrome-controller.ts | 29 ------------------- 2 files changed, 5 insertions(+), 34 deletions(-) diff --git a/src/renderer/api/navidrome.types.ts b/src/renderer/api/navidrome.types.ts index 6c4097426..35bbb9fc5 100644 --- a/src/renderer/api/navidrome.types.ts +++ b/src/renderer/api/navidrome.types.ts @@ -199,17 +199,17 @@ export type NDGenreListParams = { NDOrder; export enum NDAlbumListSort { - ALBUM_ARTIST = 'albumArtist', + ALBUM_ARTIST = 'album_artist', ARTIST = 'artist', DURATION = 'duration', NAME = 'name', - PLAY_COUNT = 'playCount', + PLAY_COUNT = 'play_count', PLAY_DATE = 'play_date', RANDOM = 'random', RATING = 'rating', RECENTLY_ADDED = 'recently_added', SONG_COUNT = 'songCount', - STARRED = 'starred', + STARRED = 'starred_at', YEAR = 'max_year', } @@ -261,7 +261,7 @@ export type NDSongListParams = { export enum NDAlbumArtistListSort { ALBUM_COUNT = 'albumCount', - FAVORITED = 'starred', + FAVORITED = 'starred_at', NAME = 'name', PLAY_COUNT = 'playCount', RATING = 'rating', @@ -353,7 +353,7 @@ export type NDPlaylistListResponse = NDPlaylist[]; export enum NDPlaylistListSort { DURATION = 'duration', NAME = 'name', - OWNER = 'ownerName', + OWNER = 'owner_name', PUBLIC = 'public', SONG_COUNT = 'songCount', UPDATED_AT = 'updatedAt', diff --git a/src/renderer/api/navidrome/navidrome-controller.ts b/src/renderer/api/navidrome/navidrome-controller.ts index bea42d987..6b2fd3530 100644 --- a/src/renderer/api/navidrome/navidrome-controller.ts +++ b/src/renderer/api/navidrome/navidrome-controller.ts @@ -50,7 +50,6 @@ import { SimilarSongsArgs, Song, MoveItemArgs, - SongListSort, } from '../types'; import { VersionInfo, getFeatures, hasFeature } from '/@/renderer/api/utils'; import { ServerFeature, ServerFeatures } from '/@/renderer/api/features-types'; @@ -286,34 +285,6 @@ const getSongList = async (args: SongListArgs): Promise => { throw new Error('Failed to get song list'); } - if ( - (query.sortBy === SongListSort.ALBUM || query.sortBy === SongListSort.ALBUM_ARTIST) && - !query.limit - ) { - const isAlbumArtist = query.sortBy === SongListSort.ALBUM_ARTIST; - - res.body.data.sort((a, b) => { - if (isAlbumArtist) { - const albumDiff = a.album.localeCompare(b.album); - if (albumDiff !== 0) { - return albumDiff; - } - } - - const discDiff = a.discNumber - b.discNumber; - if (discDiff !== 0) { - return discDiff; - } - - const trackDiff = a.trackNumber - b.trackNumber; - if (trackDiff !== 0) { - return trackDiff; - } - - return a.title.localeCompare(b.title); - }); - } - return { items: res.body.data.map((song) => ndNormalize.song(song, apiClientProps.server, '', query.imageSize),