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

soundcloud:// doesn't work in 0.21.7 #528

Closed
vglfr opened this Issue Apr 6, 2019 · 5 comments

Comments

Projects
None yet
3 participants
@vglfr
Copy link

commented Apr 6, 2019

Downgrading to 0.21.5 fixes problem.

Command:

% mpc load "soundcloud://url/vglfr/likes"
loading: soundcloud://url/vglfr/likes
mpd error: Unsupported URI scheme

Log:

client: [1] opened from 127.0.0.1:58102
client: [1] process command list
client: process command "load "soundcloud://url/vglfr/likes""
exception: Unsupported URI scheme
client: command returned 2
client: [1] process command list returned 2
client: [1] closed

mpd -V:

Music Player Daemon 0.21.7 (0.21.7)

Copyright 2003-2007 Warren Dukes <warren.dukes@gmail.com>
Copyright 2008-2018 Max Kellermann <max.kellermann@gmail.com>
This is free software; see the source for copying conditions.  There is NO
warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Database plugins:
 simple proxy upnp

Storage plugins:
 local smbclient udisks nfs curl

Neighbor plugins:
 smbclient upnp udisks

Decoders plugins:
 [mad] mp3 mp2
 [mpg123] mp3
 [vorbis] ogg oga
 [oggflac] ogg oga
 [flac] flac
 [opus] opus ogg oga
 [sndfile] wav aiff aif au snd paf iff svx sf voc w64 pvf xi htk caf sd2
 [audiofile] wav au aiff aif
 [dsdiff] dff
 [dsf] dsf
 [hybrid_dsd] m4a
 [faad] aac
 [mpcdec] mpc
 [wavpack] wv
 [modplug] 669 amf ams dbm dfm dsm far it med mdl mod mtm mt2 okt s3m stm ult umx xm
 [mikmod] amf dsm far gdm imf it med mod mtm s3m stm stx ult uni xm
 [wildmidi] mid
 [fluidsynth] mid
 [ffmpeg] 16sv 3g2 3gp 4xm 8svx aa3 aac ac3 adx afc aif aifc aiff al alaw amr anim apc ape asf atrac au aud avi avm2 avs bap bfi c93 cak cin cmv cpk daud dct divx dts dv dvd dxa eac3 film flac flc fli fll flx flv g726 gsm gxf iss m1v m2v m2t m2ts m4a m4b m4v mad mj2 mjpeg mjpg mka mkv mlp mm mmf mov mp+ mp1 mp2 mp3 mp4 mpc mpeg mpg mpga mpp mpu mve mvi mxf nc nsv nut nuv oga ogm ogv ogx oma ogg omg opus psp pva qcp qt r3d ra ram rl2 rm rmvb roq rpl rvc shn smk snd sol son spx str swf tak tgi tgq tgv thp ts tsp tta xa xvid uv uv2 vb vid vob voc vp6 vmd wav webm wma wmv wsaud wsvga wv wve
 [gme] ay gbs gym hes kss nsf nsfe sap spc vgm vgz
 [pcm]

Filters:
 libsamplerate soxr

Tag plugins:
 id3tag

Output plugins:
 shout null fifo pipe alsa ao oss openal solaris pulse jack httpd recorder

Encoder plugins:
 null vorbis opus lame twolame wave flac

Archive plugins:
 [bz2] bz2
 [zzip] zip
 [iso] iso

Input plugins:
 file archive alsa tidal qobuz curl ffmpeg smbclient nfs mms cdio_paranoia

Playlist plugins:
 extm3u m3u pls xspf asx rss soundcloud flac cue embcue

Protocols:
 file:// alsa:// tidal:// qobuz:// http:// https:// gopher:// rtp:// rtsp:// rtmp:// rtmpt:// rtmps:// smb:// nfs:// mms:// mmsh:// mmst:// mmsu:// cdda://

Other features:
 avahi dbus udisks epoll icu inotify ipv6 systemd tcp un
@miccoli

This comment has been minimized.

Copy link
Contributor

commented Apr 7, 2019

I think this regression was introduced by b3a4583 (in fact load "soundcloud://url/vglfr/likes" works for 281461f and 44422b2).

Please give me a couple of days for investigating the problem.

@miccoli

This comment has been minimized.

Copy link
Contributor

commented Apr 7, 2019

The bug can be traced down to the use of LocateUri, e.g.

CommandResult
handle_load(Client &client, Request args, gcc_unused Response &r)
{
const auto uri = LocateUri(args.front(), &client
#ifdef ENABLE_DATABASE
, nullptr
#endif
);

In fact LocateUri recognises only the uri schemes supported by the input plugins, and not also the schemes supported by the playlist plugins.

@MaxKellermann

This comment has been minimized.

Copy link
Member

commented Apr 8, 2019

Thanks, @miccoli

@miccoli

This comment has been minimized.

Copy link
Contributor

commented Apr 8, 2019

@MaxKellermann it is me to blame for the bug...: please let me know how you think this can be fixed.

  1. revert b3a4583
  2. rewrite b3a4583 without LocateUri
  3. change the LocateUri API in order to (conditionally) recognise also playlist plugins schemes
  4. any other solution
@MaxKellermann

This comment has been minimized.

Copy link
Member

commented Apr 8, 2019

A quick and mostly-good approach would be to add a parameter to LocateUri() which describes the kind of URI to be produced, e.g.:

enum class LocateUriType { INPUT, STORAGE, PLAYLIST };

This chooses the verification method for absolute URIs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.