Spotify: Difference between revisions

Klinger (talk | contribs)
Sentence explaining Spotify added. Category:Application
Norude (talk | contribs)
Spotifyd: updated stale information about spotifyd
 
(6 intermediate revisions by 5 users not shown)
Line 1: Line 1:
== Spotify ==
{{tip/unfree}}
Spotify is a commercial music streaming service. Its usable on the Spotify website and via desktop applications.


[https://spotify.com Spotify] is a commercial music streaming service.


{{note|Spotify is [[FAQ/unfree|unfree]], its license prohibits distribution. See the [[FAQ/unfree]] page to install unfree software.}}
== Installation ==
 
=== Installation ===


To install the standard Spotify desktop application, add to system packages:
To install the standard Spotify desktop application, add to system packages:
Line 13: Line 11:
   ];
   ];


=== Local discovery ===
== Local discovery ==
To sync local tracks from your filesystem with mobile devices in the same network, you need to open port 57621 by adding the following line to your configuration.nix:
To sync local tracks from your filesystem with mobile devices in the same network, you need to open port 57621 by adding the following line to your configuration.nix:
<syntaxhighlight lang=nix>
<syntaxhighlight lang=nix>
Line 22: Line 20:
networking.firewall.allowedUDPPorts = [ 5353 ];</syntaxhighlight>
networking.firewall.allowedUDPPorts = [ 5353 ];</syntaxhighlight>


=== spotifyd ===
== Spotifyd ==
The alternative client [https://github.com/Spotifyd/spotifyd spotifyd] is available as a package, [https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/audio/spotifyd.nix nixos module], and [https://github.com/nix-community/home-manager/blob/master/modules/services/spotifyd.nix home-manager module].
The alternative client [https://github.com/Spotifyd/spotifyd spotifyd] is available as a package, [https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/audio/spotifyd.nix nixos module], and [https://github.com/nix-community/home-manager/blob/master/modules/services/spotifyd.nix home-manager module].


spotifyd must have your credentials when it starts, otherwise it will not be able to authenticate with Spotify, and will not show up as a device. If installing spotifyd as a package, give it credentials when starting, e.g.:
spotifyd can either act as a spotify-connect device and the local LAN without the need to authenticate.<ref>https://docs.spotifyd.rs/configuration/auth.html#discovery-on-lan</ref> It can also run through a manual login using oauth<ref>https://docs.spotifyd.rs/configuration/auth.html#discovery-on-lan</ref> If installing spotifyd as a package or as a systemd service via home-manager, give it oauth credentials using:  
 
spotifyd auth


spotifyd --username <USER> --password <PASS>
The authentication codes are stored in the cache directory for spotifyd.


If installing spotifyd as a systemd service via home-manager, you can supply your credentials via options. Example home-manager config:
spotifyd connects to spotify as a spotify-connect device. It offers no controls of its own, but can be controlled via [https://github.com/altdesktop/playerctl playerctl]  or [https://github.com/LargeModGames/spotatui spotatui].


  services.spotifyd = {
=== Troubleshooting ===
    enable = true;
    settings =
      {
        global = {
          username = "Alex";
          password = "foo";
        };
      }
    ;
  }


spotifyd connects to spotify as a spotify-connect device. It offers no controls of its own, but can be controlled via [https://github.com/altdesktop/playerctl playerctl]  or [https://github.com/Rigellute/spotify-tui spotify-tui].
If you get: <code>libcurl-gnutls.so.4: no version information</code>, clear your Spotify cache: <code>rm -rf ~/.cache/spotify</code>


[[Category:Application]]
[[Category:Applications]]