-
Notifications
You must be signed in to change notification settings - Fork 40
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
Two issues with translations and condition construction #38
Comments
Thanks, i'll have a look at the translation issue soon. I don't know what the pulse devs were thinking when they used strings to represent the mute state. Maybe there's a way to get a boolean instead. What you are saying about the equality check would mean that your python version compiles that code to different bytecode than mine, if i'm not mistaken. Are you sure that's the exact statement that failed? Anyway, thanks for the issue report, i'll have a bit more time the coming weeks to fix some blockify issues. |
Sorry for the long wait. Regarding translations problem I think we can use the following approach:
The problem with equality check is strange. I'm quite sure that was an issue under debugger but now I cannot reproduce it so let's assume that was just my mistake. |
Hey, thanks, that could certainly work. I have to admit though, i'm not a big fan of adding options, there are too many as it is. What is the output of |
Fixed 3 issues: #36,#38, #39 New options: substring_search (boolean, set to True if you want to be able to block "Bloodhound Gang - Ivan Eth Nioj" with "Ivan". Risk for fals e positives) pacmd_muted_value (string, the localized value for "yes", needed to parse the pacmd list-sink-inputs output correctly)
Nevermind that last question about the LANG env variable. I simply added an option to blockify.ini called pacmd_muted_value. Set it to tak and let me know if it works. |
Have you tried using |
@Feltzer @thof
Right now, LC_ALL=en_US is forced internally and temporarily for pacmd calls. But if that doesn't work i could revert to an option in blockify.ini where you can specify the "yes"-value explicitly. |
Unfortunately none of these commands work, i.e. each of them returns values in Polish. |
I see. I will readd the option then. Check again in 15 minutes. |
It seems that since Pulseaudio 7.0 only two values (yes and no) are fixed for "muted" property regardless of locale. Unfortunately this change breaks blockify on my system. Therefore I think that you should disable method install_locale. |
Are you sure this is what's breaking blockify for you? If that's the case, it'd be a drag because pulseaudio 7.0 won't be available on all distributions for a while. If i were to fix your issue by assuming muted is always "yes" or "no", I'd break blockify for those with localized systems until they can upgrade to pulseaudio 7.0. A quick fix for now would be to change I'd still like some confirmation on this issue. As soon as I have that, i'm sure there's a way to fix it without breaking backward compatibility. Worst case scenario, I'll have to check the pulseaudio version. Regards P.S.: Next time, I'd prefer if you opened a new issue and simply reference this one. It has been closed for more than half a year, after all. Less confusion, more visibility. |
I just downgraded pulseaudio and libpulse to 6.0 and I can confirm what I wrote in my previous post. I think that checking PA version is not such a bad idea. Sample code that would handle this issue (initialize_pulse_unmuted_value):
|
Thanks for checking and thanks for the code snippet. Otherwise, I'll implement this tomorrow. I'm not a big fan of sketchy dependencies like checking for versions but at this point, blockify is a collection of hacks so we might as well add one more. Regards |
Should be fixed on both master and spotify-beta |
I found two issues:
is_ad = self.current_song != self.dbus.get_song_artist() + u" \u2013 " + self.dbus.get_song_title()
doesn't work. I had to change it toin order to get it to work. I don't have experience in coding in Python so I cannot explain it but this is what I found under Python debugger.
The text was updated successfully, but these errors were encountered: