-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix inconsistent auto-muting #159
Conversation
src/main.js
Outdated
@@ -142,6 +142,7 @@ app.on("ready", async () => { | |||
store.get(settings.trayIcon) && addTray(mainWindow, { icon }) && refreshTray(); | |||
store.get(settings.api) && expressModule.run(mainWindow); | |||
store.get(settings.enableDiscord) && discordModule.initRPC(); | |||
console.log(store.get(settings.mutedArtists).find((artist) => artist === "Yes")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is there just a new random console.log here that would end up having no use for end-users nor people that use the app in general since devtools don't work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that was a mistake and I meant to remove it sorry. i'll fix that
src/preload.js
Outdated
const playing_title = window.document.querySelector(this.playing_title); | ||
|
||
if (playing_title) { | ||
const row = playing_title.closest(this.tracklist_row); | ||
if (row) { | ||
const album_name_cell = row.querySelector(this.album_name_cell); | ||
if (album_name_cell) { | ||
return album_name_cell.textContent; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like unnecessary overhead for a function that mostly already works fine the occasional glitch out when going on another album which cause the album name to change happens but it is so minor since when you switch to another album you either anyways will start playing it or immediately switch back to another playlist which will fix the album name with the next song anyways.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was occasionally causing the mute to fail, but I rearranged the other bit some so maybe i can revert that change
OK fixed whoopsie |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @vincens2005,
Seems fine now! I'll check it out later today and make a merge along with some other work I still had open.
Thanks for reviewing it as well @Mar0xy!
damn gl |
* - Fixed `cannot read property of undefined` error because of not passing mainWindow around. - vincens2005, fixed inconsistent auto muting * Fix inconsistent auto-muting (#159) * fix muting sometimes not working * fix inconsistent unmuting * fix bad code in inconsistent muting fig Co-authored-by: Cukmekerb <[email protected]>
@vincens2005 , thanks man. I made it work tonight though, 4.1.1 is out! |
Automatic muting sometimes failed, as did unmuting.
This is a fix for both those issues