Iris icon indicating copy to clipboard operation
Iris copied to clipboard

Libspotify deprecated; what next? Spotify is connected but wont play music

Open Marshalldog opened this issue 2 years ago • 5 comments

Iris version

newest

Operating system(s) affected

  • [ ] Windows
  • [ ] MacOS
  • [ ] iOS
  • [ ] Android
  • [X] Linux
  • [ ] Other

Browser(s) affected

  • [ ] Firefox
  • [ ] Chrome
  • [ ] Edge
  • [ ] Other

What happened?

Iris says its connected to spotify but won't play songs every time I press play on a song I got "Mopidy: Failed to add some tracks" Screenshot 2022-05-21 150949 Screenshot 2022-05-21 150925

here's my config

# For further information about options in this file see:
#   https://docs.mopidy.com/
#
# The initial commented out values reflect the defaults as of:
#   Mopidy 3.0.2
#   Mopidy-File 3.0.2
#   Mopidy-HTTP 3.0.2
#   Mopidy-M3U 3.0.2
#   Mopidy-MPD 3.0.0
#   Mopidy-SoftwareMixer 3.0.2
#   Mopidy-Spotify 4.0.1
#   Mopidy-Stream 3.0.2
#
# Available options and defaults might have changed since then,
# run `mopidy config` to see the current effective config and
# `mopidy --version` to check the current version.

[core]
#cache_dir = $XDG_CACHE_DIR/mopidy
#config_dir = $XDG_CONFIG_DIR/mopidy
#data_dir = $XDG_DATA_DIR/mopidy
#max_tracklist_length = 10000
#restore_state = false

[logging]
#verbosity = 0
#format = %(levelname)-8s %(asctime)s [%(process)d:%(threadName)s] %(name)s\n  %(message)s
#color = true
#config_file =

[audio]
#mixer = software
#mixer_volume = 
output = alsasink 
#buffer_time = 

[proxy]
#scheme = 
#hostname = 
#port = 
#username = 
#password = 

[file]
#enabled = true
#media_dirs = 
#  $XDG_MUSIC_DIR|Music
#  ~/|Home
#excluded_file_extensions = 
#  .directory
#  .html
#  .jpeg
#  .jpg
#  .log
#  .nfo
#  .pdf
#  .png
#  .txt
#  .zip
#show_dotfiles = false
#follow_symlinks = false
#metadata_timeout = 1000

[http]
enabled = true
hostname = 0.0.0.0
port = 6680
zeroconf = Mopidy HTTP server on $hostname
allowed_origins = 
csrf_protection = true
default_app = mopidy

[m3u]
#enabled = true
#base_dir = $XDG_MUSIC_DIR
#default_encoding = latin-1
#default_extension = .m3u8
#playlists_dir =

[softwaremixer]
#enabled = true

[stream]
#enabled = true
#protocols = 
#  http
#  https
#  mms
#  rtmp
#  rtmps
#  rtsp
#metadata_blacklist = 
#timeout = 5000

[spotify]
#enabled = true
username = ######
password = ##### 
client_id = ######
client_secret = ######
#bitrate = 160
#volume_normalization = true
#private_session = false
#timeout = 10
#allow_cache = true
#allow_network = true
#allow_playlists = true
#search_album_count = 20
#search_artist_count = 10
#search_track_count = 50
#toplist_countries = 

[mpd]
#enabled = true
hostname = :: 
port = 6600
#password = 
#max_connections = 20
#connection_timeout = 60
#zeroconf = Mopidy MPD server on $hostname
#command_blacklist = 
#  listall
#  listallinfo
#default_playlist_scheme = m3u


[mopify]
enabled = true
debug = false

(note running two identical versions on 2 pi zeros) I installed mopidy on a clone of the device and But I get this: Screenshot 2022-05-21 145149

note : ignore

#   Mopidy 3.0.2
#   Mopidy-File 3.0.2
#   Mopidy-HTTP 3.0.2
#   Mopidy-M3U 3.0.2
#   Mopidy-MPD 3.0.0
#   Mopidy-SoftwareMixer 3.0.2
#   Mopidy-Spotify 4.0.1
#   Mopidy-Stream 3.0.2

that was because I copied and pasted

Logs

No response

Marshalldog avatar May 21 '22 05:05 Marshalldog

Hello,

I have the same problem et I have found the bad new : libspotify (used by mopidy used by Iris) has been blocked by Spotify since the 16th may. No plan B.

https://developer.spotify.com/community/news/2022/04/12/libspotify-sunset/

What are the options now ? Spotify put Web Playback SDK as alternative but I understand that the features and the technology are different.

@jaeb : You have made a great job during these last years. I am very sorry for that Spotify decision. Have you a lead to continue Iris development ?

ericroussille avatar May 21 '22 06:05 ericroussille

That is correct; Mopidy-Spotify will no longer be able to play audio until there is a replacement for the yanked libspotify dependency. You can read more about it here: https://github.com/mopidy/mopidy-spotify/issues/110

The music need not stop though. The core principle to Iris is to be provider-agnostic, meaning you can pull all of your music from all of your sources into the one UI. Iris is not bound to Spotify.

I have personally been a predominantly-Spotify user but now I am looking towards Youtube Music instead. As such I am finally motivated to increase Iris' capabilities to better handle curated playlists from sources other than Spotify.

I have been working on this over the last week, and this is my primary development focus. This is a significant project so will take time for it to be production-ready. Support would be most appreciated.

For the brave, you can see this coming together on https://github.com/jaedb/Iris/pull/843, where it supports both Tidal and Youtube Music 'mood' and 'genre' based curated playlists.

Support in Iris for Spotify will stay as-is (despite being unable to play Spotify assets), in the hopes that the team working on the Mopidy-Spotify project can find a new solution.

jaedb avatar May 21 '22 06:05 jaedb

@jaedb @ericroussille will there be an update to mopidy-spotify to fix this? and are there any good alternatives to mopidy that can use Spotify and can connect to snapcast?

Marshalldog avatar May 21 '22 06:05 Marshalldog

I have personally been a predominantly-Spotify user but now I am looking towards Youtube Music instead. As such I am finally motivated to increase Iris' capabilities to better handle curated playlists from sources other than Spotify.

Yesterday I tried mopidy-youtube with Iris, unsuccessfully. I found many problems and wasn't able to add playlists. Uninstalled.

Thank you James for all your great efforts!

fmarzocca avatar May 21 '22 08:05 fmarzocca

will there be an update to mopidy-spotify to fix this?

They are working frantically to migrate to the new gst-plugin-spotify (which uses Librespot under the hood), but it may take a bit of time because packaging and distributing a heavyweight guy like Librespot for multiple architectures can be tricky.

In the meantime, I have cancelled my Spotify subscription for good (too much is too much, they have been messing up the developer experience for more than a decade) and moved to Tidal. mopidy-tidal isn't as mature as mopidy-spotify yet, but we're working on it - and if enough people move over it may eventually get more traction and development.

and are there any good alternatives to mopidy that can use Spotify and can connect to snapcast?

I don't know of any other alternatives to get Spotify+Snapcast to work together, but you can run some Librespot-based implementation on your device to get it to appear as a Spotify Connect entry in an official app/client. Some solutions:

  • Raspotify
  • Librespot alone
  • Platypush+Librespot (i.e. backend.spotify integration). It provides some nice automation hooks, a simple web interface to control playback and other Spotify Connect devices, but it doesn't come with all the bells and whistles of mopidy

Another solution, if you really need snapcast, may be to use the gst-plugin-spotify plugin to play music and build your own Gst pipeline that pushes the stream to your Snapcast server.

blacklight avatar May 24 '22 20:05 blacklight

There's now a working version of mopidy-spotify that works with gst-plugin-spotify. It seems to work OK!

https://gitlab.com/svanrossem/mopidy-container/-/blob/main/Dockerfile#L70-73

johnhamelink avatar Nov 24 '22 00:11 johnhamelink

The current release of Iris now uses the in-progress work of Mopidy-Spotify. This means we are back up and running with a functional Spotify integration. There are some limitations (most notably you cannot seek) but for the most part all is working relatively well.

Please keep your expectations in check (the source branch is, after all called gstspotifysrc-hack) and thoroughly observe your server logs before posting any issues on this or the Mopidy-Spotify repositories.

jaedb avatar Feb 19 '23 06:02 jaedb

To be clear, this version isn't even merged, let alone released. While I do want to find and fix any bugs in it (or something like it), I'm providing absolutely zero user-level support for this version of Mopidy-Spotify. I'll try my best with high-quality bug reports that I can reproduce in isolation of Iris/Docker. We'll see how this works out!

kingosticks avatar Feb 19 '23 08:02 kingosticks