Skip to content
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

Spotify doesn't get paused, only muted (windows 10) #8

Open
boboryan opened this issue Oct 24, 2018 · 19 comments
Open

Spotify doesn't get paused, only muted (windows 10) #8

boboryan opened this issue Oct 24, 2018 · 19 comments

Comments

@boboryan
Copy link

Since a few months, even when the "Stop if muted for too long" setting is enabled, spotify won't get paused, it plays fully muted in the background. It also doesn't get paused/stopped using the pause/stop buttons in mute.fm itself.

Looks as though they might have changed something on Spotify's end, and the assigned commands (spotify:pause, spotify:stop, etc) don't work anymore. There's zero information about these commands anywhere on the internet, and there are no documented or working command line options for Spotify which do the same.

Still, I managed to make it work by changing the "spotify:stop" command to a wscript command running my custom script placed in the syswow64, which presses a key combination which calls an autohotkey script which then finally can simulate a play/pause mediabutton push on the keyboard (which wscript cannot do).

So, mute.fm does indeed send the command assigned to stop the player, but the Spotify player doesnt't respond. Foobar on the other hand responds perfectly.

@jaredsohn
Copy link
Owner

There's zero information about these commands anywhere on the internet

spotify:pause, etc. are mute.fm's 'built-in' commands. Here is spotify:pause in code:

OperationHelper.SendKey("SpotifyMainWindow", null, WM_APPCOMMAND, 0, 917504);

Basically, this means that the built-in command will be broken for all mute.fm users; replacing it with a manual command is the right approach unless I update the code.

Updating the release is a bit of work since I would have to do some digging to find a computer that runs Windows (I'm a 100% Mac user now), so using custom scripts is probably the best option.

@neilmenon
Copy link

@boboryan Is there any more information you can supply on this fix you found? Trying to fix this for my setup as well. Thanks.

@boboryan
Copy link
Author

boboryan commented Jan 24, 2020 via email

@LordDragonus
Copy link

@jaredsohn Thank you for this awesome tool!

I've fixed this small bug. The window title changed from "SpotifyMainWindow" to "Chrome_WidgetWin_0". Now it works as intended.

You can download the working exe file from here: https://upld.de/f/bAG.rar
Just replace the "mute_fm.exe" in "C:\Program Files (x86)\mute.fm" or wherever you installed it to.

@neilmenon
Copy link

@LordDragonus works like a charm, thank you very much!

@neilmenon
Copy link

@LordDragonus For me this is not working anymore on Windows 10. When I play music in chrome and Spotify fades out, Spotify does not fade back in but instead Chrome just starts playing again. Any idea how to fix this? I assume the window title changed again. Thanks!

@LordDragonus
Copy link

@neilmenon I guess Chrome is just using the same window title here. Spotify uses "Chrome_WidgetWin_0" which sounds like the Chrome Engine to me. I will try to fix this again.

@Szktel
Copy link

Szktel commented Jan 6, 2021

@LordDragonus having the same issue as neilmenon on Windows 10. Looking forward to the fix! Thank you.

@LordDragonus
Copy link

@neilmenon @Szktel Here is another fix: https://upld.de/f/bLo.rar
Just replace the "mute_fm.exe" in "C:\Program Files (x86)\mute.fm" or wherever you installed it to.

@neilmenon
Copy link

neilmenon commented Jan 13, 2021

@LordDragonus just tested and it's not pausing. Tried restarting Spotify as well. I made sure to close the already running instance of mutefm.

@LordDragonus
Copy link

@neilmenon Please close mute.fm before replacing the mute_fm.exe. Then start the mute_fm.exe file directly. It should work without any problems. I've tested it with Chrome and Firefox and only Spotify plays again, as expected.
Also check that you have enough rights to replace the mute_fm.exe and that there is no Antivir or Malware program blocking that action.

@Szktel
Copy link

Szktel commented Jan 14, 2021

@LordDragonus not working here either on my end. It's muting instead of pausing. Tried with Chrome and Edge.

@LordDragonus
Copy link

@neilmenon @Szktel I'm so sorry, yes, it doesn't pause spotify as it can't find the right window. It was sending the keys to one of the childs. I've reworked that part to find the parent window and send the keys to this window now. Hope this version will now work as intended: https://upld.de/f/bLx.rar
Let me know please!

@neilmenon
Copy link

@LordDragonus no problem, works perfectly, thanks a ton!

@Szktel
Copy link

Szktel commented Jan 14, 2021

@LordDragonus It's working perfectly now indeed, thank you!

@BeanHax
Copy link

BeanHax commented Mar 23, 2021

@LordDragonus Thank you! This is amazing and working perfectly with Spotify. Been watching this thread for months anxiously awaiting this. Anyway we can get a similar fix for PocketCasts?

@Riztard
Copy link

Riztard commented Feb 27, 2022

I've reworked that part to find the parent window and send the keys to this window now. Hope this version will now work as intended: upld.de/f/bLx.rar Let me know please!

thankyou its working 👍

@bhavmodi
Copy link

@LordDragonus can you reupload the fix? the link seems broken.

@BernierCR
Copy link

@LordDragonus Can you contribute your changes, please? Not only is that link broken, people shouldn't have to do this at all. It should be incorporated in the official build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants