InputUsername/rescrobbled

Enhance documentation API key documentation

Closed this issue · 4 comments

Hi,

so I installed rescrobbled and set the Last.fm API key and secret in the config.toml file.
Upon running systemctl --user start rescrobbled.service I would get authentication failed.

So after reading the rest of the README.md it would require me to start the application in the terminal so I can enter my Last.fm credentials.

Now my question is: Do I still need the API key/secret of Last.fm since a token is obtained? See: "A long-lasting session token is then obtained, which will be used on subsequent runs instead of your username/password."

Anyways, thanks for creating this project. It helps with scrobbling in combination with ncspot!

Yes, unfortunately I believe the Last.fm API requires using API token/secret regardless of having a session, so the token/secret will need to stay in your config file. You shouldn't have to login with your username/password again though, and these aren't stored anywhere.

Does that answer your question?

Glad to hear the project is useful for you by the way 😄

Hi,

so I double-checked again: Yes, you definitely need to have both the API token/secret AND the session token to scrobble to Last.fm.

So one thing that I'd like to suggest regarding the README is to mention where the session token is stored in a separate authentication paragraph. Personally I wouldn't want to store it in ~/.config/rescrobbled/session. We could basically copy how ncspot do it here. At least the description. If you still want to go for the current directory for storing the session token, that's fine. The cache directory seems more suitable though.

Authentication
ncspot prompts for a Spotify username and password on first launch, uses this to generate an OAuth token, and stores it to disk.

The credentials are stored in ~/.cache/ncspot/librespot/credentials.json (unless the base path has been changed with the --basepath option).

Anyways, thanks for this project! I might do a PR at some point regarding the session token, but I'm still pretty new to Rust coding in general.

Have a nice day!

So one thing that I'd like to suggest regarding the README is to mention where the session token is stored in a separate authentication paragraph. Personally I wouldn't want to store it in ~/.config/rescrobbled/session. We could basically copy how ncspot do it here. At least the description.

Explaining where it's stored in the README does make sense, I agree.

If you still want to go for the current directory for storing the session token, that's fine. The cache directory seems more suitable though.

Any reason in particular for this? I'm not entirely opposed to changing it, but having everything under config simplifies things in the code. (Only config needs to be created, etc.)

Anyways, thanks for this project! I might do a PR at some point regarding the session token, but I'm still pretty new to Rust coding in general.

I'd be happy to help out if you do decide to make a PR!

The location of the session file is now in the README on the development branch.