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

fix: add spotify launcher arguments into config #51

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

windx-foobar
Copy link

I need to remove Spotify updates. I can't set this in the file configuration. I have to modify the .desktop file and pass it the --skip-update argument. I thought it might be useful to add these options to the configuration file.

I need to remove Spotify updates. I can't set this in the file configuration. I have to modify the .desktop file and pass it the `--skip-update` argument. I thought it might be useful to add these options to the configuration file.
@kllmanu
Copy link

kllmanu commented Sep 26, 2024

@windx-foobar I've set the config in /etc/spotify-launcher.conf and in ~/.config/spotify/spotify-launcher.conf but it has no effect, it still tries to update.

[spotify]
## Pass extra arguments to the spotify executable
## You can test this with `spotify-launcher -v --skip-update --no-exec`
#extra_arguments = []
## On HiDPI displays spotify doesn't pick up the scale factor automatically
#extra_arguments = ["--force-device-scale-factor=2.0"]
## On wayland you might need
extra_arguments = ["--enable-features=UseOzonePlatform", "--ozone-platform=wayland", "--skip-update"]
## How often to try to resume the download until giving up (0 for unlimited)
#download_attempts = 5

@windx-foobar
Copy link
Author

@windx-foobar I've set the config in /etc/spotify-launcher.conf and in ~/.config/spotify/spotify-launcher.conf but it has no effect, it still tries to update.

[spotify]
## Pass extra arguments to the spotify executable
## You can test this with `spotify-launcher -v --skip-update --no-exec`
#extra_arguments = []
## On HiDPI displays spotify doesn't pick up the scale factor automatically
#extra_arguments = ["--force-device-scale-factor=2.0"]
## On wayland you might need
extra_arguments = ["--enable-features=UseOzonePlatform", "--ozone-platform=wayland", "--skip-update"]
## How often to try to resume the download until giving up (0 for unlimited)
#download_attempts = 5

Hi!
Please see it README
Need add [launcher] section :)

@kllmanu
Copy link

kllmanu commented Sep 26, 2024

@windx-foobar Ah sorry my fault, didn't check out your code. 🙈

@BCSharp
Copy link

BCSharp commented Nov 5, 2024

This patch is very useful, thanks for proposing it. It would be great if you could also add support for option keyring. The default location of the keyring is in /usr/share/... which is not user-writable. I am using spotify-launcher on a system without root privileges and have to pass --keyring=${XDG_DATA_HOME}/spotify-launcher/keyring.pgp on every invocation. It would be very helpful to be able to put it in ${XDG_CONFIG_HOME}/spotify-launcher.conf and be done with it.

@windx-foobar
Copy link
Author

windx-foobar commented Nov 5, 2024

Hi!

It would be great if you could also add support for option keyring

@BCSharp Added :)

@BCSharp
Copy link

BCSharp commented Nov 7, 2024

Thanks, works for me! 👌

However, since this is a PR for a pull into the maintainer's repository, I have a few observations relevant for wider usability. The way how it is implemented now, the keyring value in the config file (if not empty) overrides the value provided with parameter --keyring on the command line. This is not intuitive. Most (if not all) tools use the convention that command line parameters and options have a higher precedence over (override) any values from config files, which in turn have a higher precedence over (override) built-in defaults. I doubt the maintainer will be ready to merge this PR as it is now.

@windx-foobar
Copy link
Author

Thanks, works for me! 👌

However, since this is a PR for a pull into the maintainer's repository, I have a few observations relevant for wider usability. The way how it is implemented now, the keyring value in the config file (if not empty) overrides the value provided with parameter --keyring on the command line. This is not intuitive. Most (if not all) tools use the convention that command line parameters and options have a higher precedence over (override) any values from config files, which in turn have a higher precedence over (override) built-in defaults. I doubt the maintainer will be ready to merge this PR as it is now.

Hmm. Thanks. I repair it soon...

1. passing parameter
2. config file
3. default value
@windx-foobar
Copy link
Author

Thanks, works for me! 👌

However, since this is a PR for a pull into the maintainer's repository, I have a few observations relevant for wider usability. The way how it is implemented now, the keyring value in the config file (if not empty) overrides the value provided with parameter --keyring on the command line. This is not intuitive. Most (if not all) tools use the convention that command line parameters and options have a higher precedence over (override) any values from config files, which in turn have a higher precedence over (override) built-in defaults. I doubt the maintainer will be ready to merge this PR as it is now.

Done it :)

@lavrentev18
Copy link

need to approve this pr

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

Successfully merging this pull request may close these issues.

4 participants