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

Allow spotify-player to launch without an internet connection #531

Open
DOD-101 opened this issue Aug 1, 2024 · 7 comments
Open

Allow spotify-player to launch without an internet connection #531

DOD-101 opened this issue Aug 1, 2024 · 7 comments
Labels
enhancement New feature or request

Comments

@DOD-101
Copy link
Contributor

DOD-101 commented Aug 1, 2024

Is your feature already implemented in the latest master?
No.

Is your feature request related to a problem? Please describe.
When you try to launch spotify-player without an internet connection, it won't even show the UI simply printing:

Error: failed to lookup address information: Temporary failure in name resolution
Please check your internet connection.

If spotify-player is already running (at least as a daemon) it will crash when it doesn't have an internet connection anymore.

Describe the solution you'd like
Ideally, spotify-player would launch, showing you the UI and then tell you there that it requires an internet connection to play music. This would not only make developing easier, without an internet connection, but would also make it clearer to people that the app works, but requires internet to play music.

The daemon on the other hand would continue running, without playing music, when an internet connection is lost and launch, but not play any music, without an internet connection.

Describe alternatives you've considered
The daemon crashing isn't the most important thing, as one could set it up to restart, when connected to the internet again.

Additional context
Add any other context or screenshots about the feature request here.

@DOD-101 DOD-101 added the enhancement New feature or request label Aug 1, 2024
@apprehensions
Copy link
Contributor

This might be a duplicate of #333

@DOD-101
Copy link
Contributor Author

DOD-101 commented Aug 1, 2024

Not quite.

This issue isn't asking for the ability to play locally stored music, but just to be able to have the UI / daemon run without an internet connection.

Although playing local music would be more useful if you could do it offline.

@aome510
Copy link
Owner

aome510 commented Aug 1, 2024

So basically #62. I tried to think about this feature before. It was difficult because you need Spotify API to access most of the data used by the app.

Ideally, the offline mode will only operate on cached/downloaded data.

edit: nvm I misunderstood the thread. The app doesn't crash upon no internet connection. The error you show in the issue is when you launch it. If the app is running and no internet available, it keeps running. Then it will automatically recover upon network re-connection or when you trigger a restart with RestartIntegratedClient command.

@DOD-101 DOD-101 changed the title Stop spotify-player from crashing when not connected to internet Allow spotify-player to launch without an internet connection Aug 2, 2024
@DOD-101
Copy link
Contributor Author

DOD-101 commented Aug 2, 2024

The app doesn't crash upon no internet connection

Yes, only the daemon seems to crash.

The error you show in the issue is when you launch it

Yes, and I would like this error to show up in the UI (in the playback section), rather than the app exiting.

Then it will automatically recover upon network re-connection

The client does do this, but not the daemon.


I've updated the wording in the original message to hopefully make this clearer.

Potentially, this could be split into two different Issues:

  1. Client should show the error message on launch in UI, instead of printing it out.
  2. Daemon shouldn't crash when an Internet connection is lost.

@apprehensions
Copy link
Contributor

Why even allow the UI to display such a message when that's all it will do, forever?
How it is now is better, because without internet nothing can be done anyway.

@DOD-101
Copy link
Contributor Author

DOD-101 commented Aug 2, 2024

Because it would allow people working on the project to compile and run the application without an Internet connection.

Or for example, if you are working on your config, you'd be able to view your changes without an internet connection.

In addition to this, if you want to the ability to play local songs through spotify-player in the future (#333) this would be a very useful first step in supporting that.

@apprehensions
Copy link
Contributor

I agree, but keep in mind compiling the application requires fetching a significant amount of dependencies, if they're not already cached you can't build.

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

No branches or pull requests

3 participants