mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-15 04:11:47 +00:00
fix duplicate notification
This commit is contained in:
@ -64,7 +64,6 @@ module.exports = (win, options, refreshMenu) => [
|
|||||||
{
|
{
|
||||||
label: "Choose download folder",
|
label: "Choose download folder",
|
||||||
click: () => {
|
click: () => {
|
||||||
|
|
||||||
let result = dialog.showOpenDialogSync({
|
let result = dialog.showOpenDialogSync({
|
||||||
properties: ["openDirectory", "createDirectory"],
|
properties: ["openDirectory", "createDirectory"],
|
||||||
defaultPath: getFolder(options.downloadFolder),
|
defaultPath: getFolder(options.downloadFolder),
|
||||||
|
|||||||
@ -31,7 +31,7 @@ module.exports = (win, options) => {
|
|||||||
win.on("ready-to-show", () => {
|
win.on("ready-to-show", () => {
|
||||||
// Register the callback for new song information
|
// Register the callback for new song information
|
||||||
registerCallback(songInfo => {
|
registerCallback(songInfo => {
|
||||||
// If song is playing send notification
|
// If song is playing && title isn't the same as last one - send notification
|
||||||
if (!songInfo.isPaused && songInfo.title !== oldTitle) {
|
if (!songInfo.isPaused && songInfo.title !== oldTitle) {
|
||||||
oldTitle = songInfo.title;
|
oldTitle = songInfo.title;
|
||||||
// Close the old notification
|
// Close the old notification
|
||||||
|
|||||||
Reference in New Issue
Block a user