gdi3d / mute-spotify-ads-mac-osx

Mute Mac (osx) computer audio when Spotify plays an AD
https://gdi3d.github.io/mute-spotify-ads-mac-osx/
MIT License
120 stars 16 forks source link

still earring ads #5

Closed hsl1 closed 3 years ago

hsl1 commented 3 years ago

hi I have Mac 10.13.6 high Sierra but I'm still earring ads I'm running this command sh ~/MuteSpotifyAds/NoAdsSpotify.sh on terminal but it shows this

its showing this, what I'm doing wrong Last login: Sun Nov 29 16:47:37 on ttys000 Hugos-MBP:~ hugo$ sh ~/MuteSpotifyAds/NoAdsSpotify.sh

Spotify Ads will be silenced while this program is running!. This program was downloaded from https://gdi3d.github.io/mute-spotify-ads-mac-osx/ (check for documentation here) If you are using HDMI speakers please run this command like this: sh ~/MuteSpotifyAds/NoAdsSpotify.sh hdmi

If the program is not working properly please open an issue at: https://github.com/gdi3d/mute-spotify-ads-mac-osx/issues/new

Press control+c to close this program or close the terminal window

Unused argument: none Too many arguments to 'stream' verb log: usage: log stream [ --system | --process (pid|process) ] [ --level default|info|debug][ --predicate ] [ --source ][ --style (syslog|json|compact) ][ --color (auto|always|none) ] [ --timeout [m|h|d] ][ --type activity|log|trace ]

Usage: Stream stream activities, log data or trace messages from a given process or the system. By default, the command assumes system-wide streaming.
Specifying a process id with the --process option will narrow the results.

Examples:

log stream --level=info log stream --predicate examples: --predicate 'eventMessage contains "my message"' --predicate 'eventType == logEvent and messageType == info' --predicate 'processImagePath endswith "d"' --predicate 'not processImagePath contains[c] "some spammer"' --predicate 'processID < 100' --predicate 'senderImagePath beginswith "my sender"' --predicate 'eventType == logEvent and subsystem contains "com.example.my_subsystem"'

Hugos-MBP:~ hugo$

hsl1 commented 3 years ago

it should show a line in red when its blocking an green when is playing music. Do I need to update this script or it auto updates every time?

gdi3d commented 3 years ago

It seems like I'm using a parameter that's not available high Sierra. I will check it out a release a new version for it. I might ask you to check a few things in the process.

thanks for reporting ;)

hsl1 commented 3 years ago

do I need to update after you release a fix or its checks for the version when run the command sh ~/MuteSpotifyAds/NoAdsSpotify.sh. ?

because I have checked the code and it has an auto update feature built in

thanks for the fast support

gdi3d commented 3 years ago

Can you try the following command on the terminal app

log stream --process="mediaremoted" --type="log" --color="none" --style="compact"

If you see no errors after running that command, proceed to play any song in Spotify for a few seconds. You should see a lot of information being shown in the terminal.

After that hit control+c to abort the process and proceed to close the terminal window.

PD: The app will detect the new version and ask you if you want to update or not. If you choose yes it will update automatically.

hsl1 commented 3 years ago

but should I run this command and after open Spotify or while Spotify is running?

gdi3d commented 3 years ago

First run the command and verify that no errors appears after running it. If that's the case you can proceed to open Spotify and play a song for a few seconds to verify that information is being shown in the terminal

hsl1 commented 3 years ago

it does not show any error, after opening Spotify it outputs this: MacBook-Pro:~ hugo$ log stream --process="mediaremoted" --type="log" --color="none" --style="compact" Filtering the log data using "process BEGINSWITH[cd] "mediaremoted"" Timestamp Ty Process[PID:TID] 2020-11-29 18:32:35.606 Df mediaremoted[51:6313] [com.apple.amp.mediaremote:MediaRemote] Client with pid 949 opened connection. 2020-11-29 18:32:35.606 Df mediaremoted[51:6313] [com.apple.amp.mediaremote:MediaRemote] Adding client <MRDMediaRemoteClient 0x7f8cf643aeb0, bundleIdentifier = com.spotify.client, pid = 949> 2020-11-29 18:32:35.607 Df mediaremoted[51:26d] [com.apple.amp.mediaremote:MediaRemote] [MRDNowPlayingOriginClient] Creating MRDNowPlayingClient for path origin-Hugos-MacBook-Pro.local-1280262988/client-com.spotify.client-949/player-(null) 2020-11-29 18:32:35.607 Df mediaremoted[51:26d] [com.apple.amp.mediaremote:MediaRemote] [MRDNowPlayingClient] Initializing bundleIdentifier to com.spotify.client for path origin-Hugos-MacBook-Pro.local-1280262988/client-com.spotify.client-949/player-(null) 2020-11-29 18:32:35.608 Df mediaremoted[51:26d] [com.apple.amp.mediaremote:MediaRemote] [MRDNowPlayingClient] Initializing displayName to Spotify for path origin-Hugos-MacBook-Pro.local-1280262988/client-com.spotify.client-949/player-(null) 2020-11-29 18:32:35.608 Df mediaremoted[51:26d] [com.apple.amp.mediaremote:MediaRemote] [MRDNowPlayingClient] Creating MRDNowPlayingPlayerClient for path origin-Hugos-MacBook-Pro.local-1280262988/client-com.spotify.client-949 (Spotify)/player-MediaRemote-DefaultPlayer 2020-11-29 18:32:35.608 Df mediaremoted[51:26d] [com.apple.amp.mediaremote:MediaRemote] [MRDNowPlayingOriginClient] Reloaded now playing app from datasource: <_MRNowPlayingClientProtobuf: 0x7f8cf643b380> { processIdentifier = 0; } 2020-11-29 18:32:35.894 Df mediaremoted[51:26d] [com.apple.amp.mediaremote:MediaRemote] [MRDOSXNowPlayingDataSource] nowPlayingApp changed from (null) to com.spotify.client-949 2020-11-29 18:32:35.894 Df mediaremoted[51:26d] [com.apple.amp.mediaremote:MediaRemote] [MRDNowPlayingOriginClient] Reloaded now playing app from datasource: <_MRNowPlayingClientProtobuf: 0x7f8cf650f570> { bundleIdentifier = "com.spotify.client"; processIdentifier = 949; } 2020-11-29 18:32:35.894 Df mediaremoted[51:26d] [com.apple.amp.mediaremote:MediaRemote] [MRDNowPlayingOriginClient] Setting client <_MRNowPlayingClientProtobuf: 0x7f8cf651c690> { bundleIdentifier = "com.spotify.client"; displayName = Spotify; processIdentifier = 949; processUserIdentifier = 501; } as inferred now playing client. 2020-11-29 18:32:35.895 Df mediaremoted[51:26d] [com.apple.amp.mediaremote:MediaRemote] [MRDNowPlayingOriginClient] ActiveNowPlayingClient changed from (null) to origin-Hugos-MacBook-Pro.local-1280262988/client-com.spotify.client-949 (Spotify)/player-MediaRemote-DefaultPlayer 2020-11-29 18:32:35.895 Df mediaremoted[51:26d] [com.apple.amp.mediaremote:MediaRemote] Added com.spotify.client-949 as possible now playing application. 2020-11-29 18:32:35.896 Df mediaremoted[51:659f] [com.apple.amp.mediaremote:MediaRemote] Posted Active Now Playing Notification kMRMediaRemoteNowPlayingApplicationDidChangeNotification for path origin-Hugos-MacBook-Pro.local-1280262988/client-com.spotify.client-949 (Spotify)/player-MediaRemote-DefaultPlayer 2020-11-29 18:32:35.897 Df mediaremoted[51:659f] [com.apple.amp.mediaremote:MediaRemote] Posted Active Now Playing Notification kMRNowPlayingPlaybackQueueChangedNotification for path origin-Hugos-MacBook-Pro.local-1280262988/client-com.spotify.client-949 (Spotify)/player-MediaRemote-DefaultPlayer 2020-11-29 18:32:35.897 Df mediaremoted[51:26d] [com.apple.amp.mediaremote:MediaRemote] [MRDNowPlayingPlayerClient] Client at path "origin-Hugos-MacBook-Pro.local-1280262988/client-com.spotify.client-949 (Spotify)/player-MediaRemote-DefaultPlayer" is setting SupportedCommands 2020-11-29 18:32:35.898 Df mediaremoted[51:659f] [com.apple.amp.mediaremote:MediaRemote] Posted Active Now Playing Notification kMRMediaRemoteSupportedCommandsDidChangeNotification for path origin-Hugos-MacBook-Pro.local-1280262988/client-com.spotify.client-949 (Spotify)/player-MediaRemote-DefaultPlayer 2020-11-29 18:32:35.898 Df mediaremoted[51:659f] [com.apple.amp.mediaremote:MediaRemote] Posted Active Now Playing Notification kMRMediaRemoteNowPlayingApplicationPlaybackStateDidChangeNotification for path origin-Hugos-MacBook-Pro.local-1280262988/client-com.spotify.client-949 (Spotify)/player-MediaRemote-DefaultPlayer 2020-11-29 18:32:35.899 Df mediaremoted[51:659f] [com.apple.amp.mediaremote:MediaRemote] Posted Active Now Playing Notification kMRMediaRemoteNowPlayingInfoDidChangeNotification for path origin-Hugos-MacBook-Pro.local-1280262988/client-com.spotify.client-949 (Spotify)/player-MediaRemote-DefaultPlayer 2020-11-29 18:32:35.900 Df mediaremoted[51:659f] [com.apple.amp.mediaremote:MediaRemote] Posted Active Now Playing Notification kMRMediaRemoteNowPlayingApplicationIsPlayingDidChangeNotification for path origin-Hugos-MacBook-Pro.local-1280262988/client-com.spotify.client-949 (Spotify)/player-MediaRemote-DefaultPlayer 2020-11-29 18:32:35.900 Df mediaremoted[51:659f] [com.apple.amp.mediaremote:MediaRemote] Posted Active Now Playing Notification kMRMediaRemoteSupportedCommandsDidChangeNotification for path origin-Hugos-MacBook-Pro.local-1280262988/client-com.spotify.client-949 (Spotify)/player-MediaRemote-DefaultPlayer 2020-11-29 18:32:36.748 Df mediaremoted[51:26d] [com.apple.amp.mediaremote:MediaRemote] [MRDNowPlayingPlayerClient] Client at path origin-Hugos-MacBook-Pro.local-1280262988/client-com.spotify.client-949 (Spotify)/player-MediaRemote-DefaultPlayer setting playback state from Unknown to Paused 2020-11-29 18:32:36.749 Df mediaremoted[51:26d] [com.apple.amp.mediaremote:MediaRemote] [MRDNowPlayingPlayerClient] Client at path "origin-Hugos-MacBook-Pro.local-1280262988/client-com.spotify.client-949 (Spotify)/player-MediaRemote-DefaultPlayer" is setting SupportedCommands 2020-11-29 18:32:36.750 Df mediaremoted[51:6313] [com.apple.amp.mediaremote:MediaRemote] Posted Active Now Playing Notification kMRMediaRemoteSupportedCommandsDidChangeNotification for path origin-Hugos-MacBook-Pro.local-1280262988/client-com.spotify.client-949 (Spotify)/player-MediaRemote-DefaultPlayer 2020-11-29 18:32:36.779 Df mediaremoted[51:26d] [com.apple.amp.mediaremote:MediaRemote] [MRDNowPlayingPlayerClient] Client at path "origin-Hugos-MacBook-Pro.local-1280262988/client-com.spotify.client-949 (Spotify)/player-MediaRemote-DefaultPlayer" is setting SupportedCommands 2020-11-29 18:32:36.780 Df mediaremoted[51:659f] [com.apple.amp.mediaremote:MediaRemote] Posted Active Now Playing Notification kMRMediaRemoteSupportedCommandsDidChangeNotification for path origin-Hugos-MacBook-Pro.local-1280262988/client-com.spotify.client-949 (Spotify)/player-MediaRemote-DefaultPlayer 2020-11-29 18:32:37.277 Df mediaremoted[51:26d] [com.apple.amp.mediaremote:MediaRemote] [MRDNowPlayingPlayerClient] Client at path origin-Hugos-MacBook-Pro.local-1280262988/client-com.spotify.client-949 (Spotify)/player-MediaRemote-DefaultPlayer is setting playbackQueue <_MRPlaybackQueueProtobuf: 0x7f8cf6708310> { contentItem = ( { identifier = "51FBB2B0-F7AE-45EB-8D69-5E89C9E95B1D"; metadata = { "__playbackRate" = 0; albumName = "Hoji N'ka ta Rola"; artworkAvailable = 0; "custom: calculatedElapsedTime" = "00:03:40 (220.166000)"; "custom: delta" = "00:00:00 (0.009594)"; "custom: remainingTime" = "00:-3:-40 (-220.166000)"; discNumber = 0; duration = "00:00:00 (0.000000)"; elapsedTime = "00:03:40 (220.166000)"; elapsedTimeTimestamp = "2020-11-29 18:32:37 +0000"; mediaSubType = 0; mediaType = 1; nowPlayingInfo = { kMRMediaRemoteNowPlayingInfoContentIte 2020-11-29 18:32:37.278 Df mediaremoted[51:659f] [com.apple.amp.mediaremote:MediaRemote] Posted Active Now Playing Notification kMRNowPlayingPlaybackQueueChangedNotification for path origin-Hugos-MacBook-Pro.local-1280262988/client-com.spotify.client-949 (Spotify)/player-MediaRemote-DefaultPlayer 2020-11-29 18:32:37.278 Df mediaremoted[51:659f] [com.apple.amp.mediaremote:MediaRemote] Posted Active Now Playing Notification kMRMediaRemoteNowPlayingInfoDidChangeNotification for path origin-Hugos-MacBook-Pro.local-1280262988/client-com.spotify.client-949 (Spotify)/player-MediaRemote-DefaultPlayer 2020-11-29 18:32:38.065 Df mediaremoted[51:26d] [com.apple.amp.mediaremote:MediaRemote] [MRDNowPlayingPlayerClient] Client at path origin-Hugos-MacBook-Pro.local-1280262988/client-com.spotify.client-949 (Spotify)/player-MediaRemote-DefaultPlayer is setting playbackQueue <_MRPlaybackQueueProtobuf: 0x7f8cf66107c0> { contentItem = ( { identifier = "EE1E0778-B9E5-45E6-A164-F48FCE7A21BF"; metadata = { "__playbackRate" = 0; albumName = "Hoji N'ka ta Rola"; artworkAvailable = 0; "custom: calculatedElapsedTime" = "00:03:40 (220.166000)"; "custom: delta" = "00:00:00 (0.002695)"; "custom: remainingTime" = "00:00:16 (16.834000)"; discNumber = 1; duration = "00:03:57 (237.000000)"; elapsedTime = "00:03:40 (220.166000)"; elapsedTimeTimestamp = "2020-11-29 18:32:38 +0000"; mediaSubType = 0; mediaType = 1; nowPlayingInfo = { kMRMediaRemoteNowPlayingInfoContentItem 2020-11-29 18:32:38.067 Df mediaremoted[51:659f] [com.apple.amp.mediaremote:MediaRemote] Posted Active Now Playing Notification kMRNowPlayingPlaybackQueueChangedNotification for path origin-Hugos-MacBook-Pro.local-1280262988/client-com.spotify.client-949 (Spotify)/player-MediaRemote-DefaultPlayer 2020-11-29 18:32:38.067 Df mediaremoted[51:659f] [com.apple.amp.mediaremote:MediaRemote] Posted Active Now Playing Notification kMRMediaRemoteNowPlayingInfoDidChangeNotification for path origin-Hugos-MacBook-Pro.local-1280262988/client-com.spotify.client-949 (Spotify)/player-MediaRemote-DefaultPlayer 2020-11-29 18:32:46.459 Df mediaremoted[51:26d] [com.apple.amp.mediaremote:MediaRemote] [MRDNowPlayingPlayerClient] Client at path origin-Hugos-MacBook-Pro.local-1280262988/client-com.spotify.client-949 (Spotify)/player-MediaRemote-DefaultPlayer setting playback state from Paused to Playing 2020-11-29 18:32:46.464 Df mediaremoted[51:669b] [com.apple.amp.mediaremote:MediaRemote] Posted Active Now Playing Notification kMRMediaRemoteNowPlayingApplicationPlaybackStateDidChangeNotification for path origin-Hugos-MacBook-Pro.local-1280262988/client-com.spotify.client-949 (Spotify)/player-MediaRemote-DefaultPlayer

gdi3d commented 3 years ago

Great, that worked!. I'll update it now. It might take a few minutes to detect the changes due to cache issues, but you can always uninstall and reinstall if you want to.

I'll let you know when the update is ready so you can test it.

hsl1 commented 3 years ago

I don't understand will you release a new version? did you have a command to force to update?

I think you should put on green letters program is running fine at the end because I can't figure if its running fine just put it before this:

Press control+c to close this program or close the terminal window its very useful to fast understand if its everything ok

gdi3d commented 3 years ago

Done, you can either:

  1. Uninstall and reinstall following the instruction at https://gdi3d.github.io/mute-spotify-ads-mac-osx/
  2. Run the sh ~/MuteSpotifyAds/NoAdsSpotify.sh command again and accept to update it when asked. Again, it can take a few minutes to detect the changes so you might have to run it a few times before it detects the new version.

I'll keep the issue open until you confirm that's running properly.

hsl1 commented 3 years ago

but the program will tell that there in an update available ? while running...

gdi3d commented 3 years ago

No, you have to close it and running it again. To close just hit control+c and run the command again using sh ~/MuteSpotifyAds/NoAdsSpotify.sh

hsl1 commented 3 years ago

ok I have update but I think you should add a green line to info that the program is running fine before the line press ctrl C to exit...

gdi3d commented 3 years ago

Yeap, it need better notifications. Thanks for contributing πŸ˜€

Please let me know if everything goes ok so I can close the issue

hsl1 commented 3 years ago

but the ad are in minimum level (still ear in low volume )not muted I've seen here Ad found! Your volume will be set all the way down now!

is this normal?

hsl1 commented 3 years ago

you should but in green line if the program is running fine but it not like my case a red line

hsl1 commented 3 years ago

I see 2 times the line Song is playing πŸ˜€πŸ•ΊπŸ’ƒ. Audio back to normal after changing the music or on the first time. Is normal?

But is working fine but its not muted is sets the volume of ads to minimum level

gdi3d commented 3 years ago

Yes the volume gets turn down to almost 0. I had to change it from mute to almost zero because after a while Spotify stopped playing songs if Ads are muted. I'm still trying to figure it if it was random or what. But I've been using the script on daily basis and works fine.

About the messages appearing twice, that is correct, but don't worry about it, is just a notification. The same happens when the audio gets turn down.

hsl1 commented 3 years ago

ok is working fine. so can close but you should get a green line saying everything is running fine and if not get an yellow line like my case.

gdi3d commented 3 years ago

Great to hear that!. Thanks for helping out!