mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-02 10:53:33 +00:00
simplify remote/media session (#632)
This commit is contained in:
parent
d57b4b4b68
commit
110a1a63f0
15 changed files with 236 additions and 230 deletions
|
|
@ -60,6 +60,7 @@ import {
|
|||
import { usePlaybackType } from '/@/renderer/store/settings.store';
|
||||
import { Play, PlaybackType } from '/@/renderer/types';
|
||||
import { ItemDetailsModal } from '/@/renderer/features/item-details/components/item-details-modal';
|
||||
import { updateSong } from '/@/renderer/features/player/update-remote-song';
|
||||
import { controller } from '/@/renderer/api/controller';
|
||||
|
||||
type ContextMenuContextProps = {
|
||||
|
|
@ -89,7 +90,6 @@ const JELLYFIN_IGNORED_MENU_ITEMS: ContextMenuItemType[] = ['setRating', 'shareI
|
|||
// const SUBSONIC_IGNORED_MENU_ITEMS: ContextMenuItemType[] = [];
|
||||
|
||||
const mpvPlayer = isElectron() ? window.electron.mpvPlayer : null;
|
||||
const remote = isElectron() ? window.electron.remote : null;
|
||||
|
||||
export interface ContextMenuProviderProps {
|
||||
children: ReactNode;
|
||||
|
|
@ -643,7 +643,7 @@ export const ContextMenuProvider = ({ children }: ContextMenuProviderProps) => {
|
|||
ctx.tableApi?.redrawRows();
|
||||
|
||||
if (isCurrentSongRemoved) {
|
||||
remote?.updateSong({ song: playerData.current.song });
|
||||
updateSong(playerData.current.song);
|
||||
}
|
||||
}, [ctx.dataNodes, ctx.tableApi, playbackType, removeFromQueue]);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue