mirror of
https://github.com/Mastermindzh/tidal-hifi.git
synced 2025-08-05 12:26:41 +02:00
added functionality to favorite a song. fixes #323
This commit is contained in:
@@ -40,6 +40,9 @@ export const startExpress = (mainWindow: BrowserWindow) => {
|
||||
|
||||
if (settingsStore.get(settings.playBackControl)) {
|
||||
expressApp.get("/play", (req, res) => handleGlobalEvent(res, globalEvents.play));
|
||||
expressApp.post("/favorite/toggle", (req, res) =>
|
||||
handleGlobalEvent(res, globalEvents.toggleFavorite)
|
||||
);
|
||||
expressApp.get("/pause", (req, res) => handleGlobalEvent(res, globalEvents.pause));
|
||||
expressApp.get("/next", (req, res) => handleGlobalEvent(res, globalEvents.next));
|
||||
expressApp.get("/previous", (req, res) => handleGlobalEvent(res, globalEvents.previous));
|
||||
|
@@ -11,6 +11,7 @@ export const mediaInfo = {
|
||||
current: "",
|
||||
duration: "",
|
||||
image: "tidal-hifi-icon",
|
||||
favorite: false,
|
||||
};
|
||||
|
||||
export const updateMediaInfo = (arg: MediaInfo) => {
|
||||
@@ -23,6 +24,7 @@ export const updateMediaInfo = (arg: MediaInfo) => {
|
||||
mediaInfo.current = propOrDefault(arg.current);
|
||||
mediaInfo.duration = propOrDefault(arg.duration);
|
||||
mediaInfo.image = propOrDefault(arg.image);
|
||||
mediaInfo.favorite = arg.favorite;
|
||||
};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user