Re: [SlimDevices: SqueezeCenter] Help calling playlists with spaces in the name through URL

2016-11-29 Thread caes

Roland0 wrote: 
> Curious. In the first case, LMS is able to retrieve the playlist's
> tracks, in the second, it fails. Unfortunately, there are no log outputs
> in the internal routines responsible for retrieving the tracks, so it's
> unclear where exactly it fails.
> However, since this works perfectly fine with regular playlists, I'm
> inclined to consider this a bug.
> 
> Try the following
> - play the playlist with spaces using normal means (eg. Web GUI) and
> compare the log output (esp. the name of the list)
> - if you haven't already done, test these JSON (replace
> 11:22:33:44:55:66 with you player's MAC address):
> > 
Code:

  >   > {"id":1,"method":"slim.request","params":["11:22:33:44:55:66", 
["playlist", "play", "itunesplaylist:Recently%20Added"]]}

> > 
> > 
Code:

  >   > {"id":1,"method":"slim.request","params":["11:22:33:44:55:66", 
["playlist", "play", "%22itunesplaylist:Recently%20Added%22"]]}

> > 
> > 
Code:

  >   > {"id":1,"method":"slim.request","params":["11:22:33:44:55:66", 
["playlist", "play", "%27itunesplaylist:Recently%20Added%27"]]}

> > 

Success!

This one worked:

Code:

{"id":1,"method":"slim.request","params":["11:22:33:44:55:66", ["playlist", 
"play", "itunesplaylist:Recently%20Added"]]}



I tried the others with the escaped single and double quotes just for
completeness and they both failed. I have successfully played more than
one iTunes playlist using the %20 method and JSON (but it doesn't work
via URL).

This is good enough for me to be getting on with - thanks very much for
the help! I should have mentioned I'm on LMS 7.8.0 earlier in case
anyone wonders.



caes's Profile: http://forums.slimdevices.com/member.php?userid=66305
View this thread: http://forums.slimdevices.com/showthread.php?t=106523

___
Squeezecenter mailing list
Squeezecenter@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/squeezecenter


Re: [SlimDevices: SqueezeCenter] Help calling playlists with spaces in the name through URL

2016-11-29 Thread Roland0

caes wrote: 
> 
> Working (single word playlist):
> > 
Code:

  >   > [16-11-29 11:40:27.1359] Slim::Control::Request::dump (2373) Request: 
Command [11:22:33:44:55:66->playlist play] from JSONRPC  (Dispatchable)
  > [16-11-29 11:40:27.1362] Slim::Control::Request::dump (2375)Param: 
[_item] = [itunesplaylist:SingleWord]
  > [16-11-29 11:40:27.1364] Slim::Control::Request::dump (2375)Param: 
[_title] = undef
  > [16-11-29 11:40:27.1366] Slim::Control::Request::dump (2375)Param: 
[_fadein] = undef
  > [16-11-29 11:40:27.1368] Slim::Control::Commands::playlistXitemCommand 
(1349) cmd: play, item: itunesplaylist:SingleWord, title: , fadeIn: undef
  > [16-11-29 11:40:27.1370] Slim::Control::Commands::playlistXitemCommand 
(1387) url: itunesplaylist:SingleWord
  > [16-11-29 11:40:27.4882] Slim::Control::Request::dump (2373) Request: 
Command [11:22:33:44:55:66->playlist playtracks] (Dispatchable)
  > 

> > 
> 
> Fails (two word playlist):
> > 
Code:

  >   > [16-11-29 11:28:55.0869] Slim::Control::Request::dump (2373) Request: 
Command [11:22:33:44:55:66->playlist play] from JSONRPC  (Dispatchable)
  > [16-11-29 11:28:55.0872] Slim::Control::Request::dump (2375)Param: 
[_item] = [itunesplaylist:Recently Added]
  > [16-11-29 11:28:55.0874] Slim::Control::Request::dump (2375)Param: 
[_title] = undef
  > [16-11-29 11:28:55.0876] Slim::Control::Request::dump (2375)Param: 
[_fadein] = undef
  > [16-11-29 11:28:55.0879] Slim::Control::Commands::playlistXitemCommand 
(1349) cmd: play, item: itunesplaylist:Recently Added, title: , fadeIn: undef
  > [16-11-29 11:28:55.0882] Slim::Control::Commands::playlistXitemCommand 
(1387) url: itunesplaylist:Recently Added
  > [16-11-29 11:28:55.0900] Slim::Control::Commands::playlistXitemCommand 
(1437) path: itunesplaylist:Recently Added
  > [16-11-29 11:28:55.0936] Slim::Control::Commands::playlistXitemCommand 
(1481) currentPlaylist:itunesplaylist:Recently%20Added
  > 

> > 
> 

Curious. In the first case, LMS is able to retrieve the playlist's
tracks, in the second, it fails. Unfortunately, there are no log outputs
in the internal routines responsible for retrieving the tracks, so it's
unclear where exactly it fails.
However, since this works perfectly fine with regular playlists, I'm
inclined to consider this a bug.

Try the following
- play the playlist with spaces using normal means (eg. Web GUI) and
compare the log output (esp. the name of the list)
- if you haven't already done, test these JSON (replace
11:22:33:44:55:66 with you player's MAC address):

Code:

{"id":1,"method":"slim.request","params":["11:22:33:44:55:66", ["playlist", 
"play", "itunesplaylist:Recently%20Added"]]}



Code:

{"id":1,"method":"slim.request","params":["11:22:33:44:55:66", ["playlist", 
"play", "%22itunesplaylist:Recently%20Added%22"]]}



Code:

{"id":1,"method":"slim.request","params":["11:22:33:44:55:66", ["playlist", 
"play", "%27itunesplaylist:Recently%20Added%27"]]}




[ extGUI4LMS - an alternative web interface: 'forum'
(http://forums.slimdevices.com/showthread.php?98186-Announce-Alternative-Web-Interface-(beta))
/ 'homepage' (https://www.nexus0.net/pub/sw/extgui4lms/) | 'music
visualizer'
(http://forums.slimdevices.com/showthread.php?103073-Announce-music-visualizer-for-squeezelite)
for squeezelite | 'Howto'
(http://forums.slimdevices.com/showthread.php?99648-Howto-build-a-self-contained-LMS):
build a self-contained LMS ]

Roland0's Profile: http://forums.slimdevices.com/member.php?userid=56808
View this thread: http://forums.slimdevices.com/showthread.php?t=106523

___
Squeezecenter mailing list
Squeezecenter@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/squeezecenter


Re: [SlimDevices: SqueezeCenter] Help calling playlists with spaces in the name through URL

2016-11-28 Thread Mnyb

Tried a non iTunes playlist yet ? Just to be 100% that that did not
matter. The bug need not to be in your code

'Bla Bla' or bla\ bla does not work ? I'm probably not competent enough
to have a say 




Main hifi: Touch + CIA PS +MeridianG68J MeridianHD621 MeridianG98DH 2 x
MeridianDSP5200 MeridianDSP5200HC 2 xMeridianDSP3100 +Rel Stadium 3
sub.
Bedroom/Office: Boom
Kitchen: Touch + powered Fostex PM0.4
Misc use: Radio (with battery)
iPad1 with iPengHD & SqueezePad
(spares Touch, SB3, reciever ,controller )
server HP proliant micro server N36L with ClearOS Linux

http://people.xiph.org/~xiphmont/demo/neil-young.html

Mnyb's Profile: http://forums.slimdevices.com/member.php?userid=4143
View this thread: http://forums.slimdevices.com/showthread.php?t=106523

___
Squeezecenter mailing list
Squeezecenter@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/squeezecenter


Re: [SlimDevices: SqueezeCenter] Help calling playlists with spaces in the name through URL

2016-11-28 Thread caes

Paul Webster wrote: 
> You could try a "+" (without quotes) to represent the space.

Thanks for the thought.

I just gave it a shot without success:

URLs:
http://lms:9000/status.html?p0=playlist=play=Recently+Added=11:22:33:44:55:66
http://lms:9000/status.html?p0=playlist=play=Recently+Added=11:22:33:44:55:66

And through JSON:
{"id":1,"method":"slim.request","params":["11:22:33:44:55:66",
["playlist", "play", "itunesplaylist:Recently+Added"]]}

all failed to play.



caes's Profile: http://forums.slimdevices.com/member.php?userid=66305
View this thread: http://forums.slimdevices.com/showthread.php?t=106523

___
Squeezecenter mailing list
Squeezecenter@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/squeezecenter


Re: [SlimDevices: SqueezeCenter] Help calling playlists with spaces in the name through URL

2016-11-28 Thread Paul Webster

You could try a "+" (without quotes) to represent the space.



Paul Webster
http://dabdig.blogspot.com

Paul Webster's Profile: http://forums.slimdevices.com/member.php?userid=105
View this thread: http://forums.slimdevices.com/showthread.php?t=106523

___
Squeezecenter mailing list
Squeezecenter@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/squeezecenter


Re: [SlimDevices: SqueezeCenter] Help calling playlists with spaces in the name through URL

2016-11-28 Thread caes

I did some more work this morning.

Logging: I turned on the logs you recommended and saw some more
interesting information.

Working (single word playlist):

Code:

[16-11-29 11:40:27.1359] Slim::Control::Request::dump (2373) Request: 
Command [11:22:33:44:55:66->playlist play] from JSONRPC  (Dispatchable)
  [16-11-29 11:40:27.1362] Slim::Control::Request::dump (2375)Param: 
[_item] = [itunesplaylist:SingleWord]
  [16-11-29 11:40:27.1364] Slim::Control::Request::dump (2375)Param: 
[_title] = undef
  [16-11-29 11:40:27.1366] Slim::Control::Request::dump (2375)Param: 
[_fadein] = undef
  [16-11-29 11:40:27.1368] Slim::Control::Commands::playlistXitemCommand (1349) 
cmd: play, item: itunesplaylist:SingleWord, title: , fadeIn: undef
  [16-11-29 11:40:27.1370] Slim::Control::Commands::playlistXitemCommand (1387) 
url: itunesplaylist:SingleWord
  [16-11-29 11:40:27.4882] Slim::Control::Request::dump (2373) Request: Command 
[11:22:33:44:55:66->playlist playtracks] (Dispatchable)
  [16-11-29 11:40:27.5829] Slim::Control::Request::dump (2375)Param: 
[_what] =   Ref
[16-11-29 11:40:27.5831] Slim::Control::Request::dump (2375)   
Param: [_index] = undef
[16-11-29 11:40:27.5833] Slim::Control::Request::dump (2375)   
Param: [_fadein] = undef
[16-11-29 11:40:27.5835] Slim::Control::Request::dump (2375)   
Param: [_listref] = [ARRAY(0x94abcc0)]
[16-11-29 11:40:27.5871] Slim::Control::Request::dump (2373)
Request: Command [11:22:33:44:55:66->playlist jump] (Dispatchable)
[16-11-29 11:40:27.5873] Slim::Control::Request::dump (2375)   
Param: [_index] = undef
[16-11-29 11:40:27.5875] Slim::Control::Request::dump (2375)   
Param: [_seekdata] = undef
[16-11-29 11:40:27.5876] Slim::Control::Request::dump (2375)   
Param: [_fadein] = undef
[16-11-29 11:40:27.5878] Slim::Control::Request::dump (2375)   
Param: [_noplay] = undef
[16-11-29 11:40:27.5881]
Slim::Control::Commands::playlistJumpCommand (1034) Jumping to 0
[16-11-29 11:40:27.5882]
Slim::Control::Commands::playlistJumpCommand (1047) playing 0
[16-11-29 11:40:27.6298] Slim::Control::Request::notifyFromArray
(842) (playlist open file:///xx.mp3)
[16-11-29 11:40:27.6301] Slim::Control::Request::notifyFromArray
(842) (playlist open file:///xx.mp3)
[16-11-29 11:40:27.6325] Slim::Control::Request::dump (2373)
Request: Command [11:22:33:44:55:66->playlist jump] (Done)
[16-11-29 11:40:27.6327] Slim::Control::Request::dump (2375)   
Param: [_index] = undef
[16-11-29 11:40:27.6329] Slim::Control::Request::dump (2375)   
Param: [_seekdata] = undef
[16-11-29 11:40:27.6330] Slim::Control::Request::dump (2375)   
Param: [_fadein] = undef
[16-11-29 11:40:27.6332] Slim::Control::Request::dump (2375)   
Param: [_noplay] = undef
[16-11-29 11:40:27.6334] Slim::Control::Request::executeDone (1926)
0
[16-11-29 11:40:27.6337] Slim::Control::Request::dump (2373)
Request: Command [11:22:33:44:55:66->playlist playtracks] (Done)
[16-11-29 11:40:27.6339] Slim::Control::Request::dump (2375)   
Param: [_what] =   Ref  
  [16-11-29 11:40:27.6341] Slim::Control::Request::dump (2375)   
  Param: [_index] = undef
  [16-11-29 11:40:27.6343] Slim::Control::Request::dump (2375)   
  Param: [_fadein] = undef
  [16-11-29 11:40:27.6345] Slim::Control::Request::dump (2375)   
  Param: [_listref] = [ARRAY(0x94abcc0)]
  [16-11-29 11:40:27.6346] Slim::Control::Request::dump (2409)   
  Result: [index] = [0]
  [16-11-29 11:40:27.6348] Slim::Control::Request::executeDone
  (1926) 0
  [16-11-29 11:40:27.6351] Slim::Control::Request::dump (2373)
  Request: Command [11:22:33:44:55:66->playlist play] from JSONRPC 
  (Done)
  [16-11-29 11:40:27.6353] Slim::Control::Request::dump (2375)   
  Param: [_item] = [itunesplaylist:SingleWord]
  [16-11-29 11:40:27.6354] Slim::Control::Request::dump (2375)   
  Param: [_title] = undef
  [16-11-29 11:40:27.6356] Slim::Control::Request::dump (2375)   
  Param: [_fadein] = undef
  [16-11-29 11:40:27.6358] Slim::Control::Request::executeDone
  (1926) 0
  [16-11-29 11:40:27.6364] Slim::Control::Request::notify (2036)
  Notifying playlist play



Fails (two word playlist):

Code:

[16-11-29 11:28:55.0869] Slim::Control::Request::dump (2373) 
Request: Command [11:22:33:44:55:66->playlist play] from JSONRPC  (Dispatchable)
  [16-11-29 11:28:55.0872] Slim::Control::Request::dump (2375)Param: 
[_item] = [itunesplaylist:Recently Added]
  [16-11-29 11:28:55.0874] Slim::Control::Request::dump (2375)Param: 
[_title] = undef
  [16-11-29 11:28:55.0876] Slim::Control::Request::dump (2375)Param: 
[_fadein] = undef
  [16-11-29 11:28:55.0879] 

Re: [SlimDevices: SqueezeCenter] Help calling playlists with spaces in the name through URL

2016-11-28 Thread Roland0

> 1) There's nothing obvious in the server log. I have tried setting
> various options to debug and watching, but nothing ever seems to show
> the name of the playlist or any errors. Would you happen to know which
> option would be the right one to set to debug?

(control.command) - Internal Command Execution Logging (Advanced)
(control.queries) - Control Query Logging (Advanced)
(control.stdio) - Standard I/O Command Logging (Advanced)
(network.http) - Internal HTTP Server Logging
(network.jsonrpc) - JSON-RPC API Logging
(plugin.???) - change to itunes

> 3) I could switch to JSON, but it's more complicated. What would be a
> valid JSON request for what I want to do? I've seen some in my research
> and tried a couple but didn't get it working.
> 

post to http://lms:9000/jsonrpc.js


Code:

user@host ~/tmp $ POST / 
'{"id":1,"method":"slim.request","params":["11:22:33:44:55:66", ["playlist", 
"play", "Some playlist"]]}'
  


change the 11:22... to your player's MAC address

> 4) Is there a way to query LMS to get a list of the actual playlist
> names in the Database? Presumably that's where the "itunesplaylist:"
> prefix is stored?
> 


Code:

user@host ~/tmp $ POST / '{"id":1,"method":"slim.request","params":["-", 
["playlists", 1, 999]]}'



or, if you actually want to query the DB:

Code:

sqlite> select * from tracks where content_type="ssp";




[ extGUI4LMS - an alternative web interface: 'forum'
(http://forums.slimdevices.com/showthread.php?98186-Announce-Alternative-Web-Interface-(beta))
/ 'homepage' (https://www.nexus0.net/pub/sw/extgui4lms/) | 'music
visualizer'
(http://forums.slimdevices.com/showthread.php?103073-Announce-music-visualizer-for-squeezelite)
for squeezelite | 'Howto'
(http://forums.slimdevices.com/showthread.php?99648-Howto-build-a-self-contained-LMS):
build a self-contained LMS ]

Roland0's Profile: http://forums.slimdevices.com/member.php?userid=56808
View this thread: http://forums.slimdevices.com/showthread.php?t=106523

___
Squeezecenter mailing list
Squeezecenter@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/squeezecenter


Re: [SlimDevices: SqueezeCenter] Help calling playlists with spaces in the name through URL

2016-11-27 Thread caes

Roland0 wrote: 
> not using itunes, so just general suggestions:
> - check the server logs
> - try adding quotes (#22)
> - use JSON RPC instead

Thanks for the suggestions. 

1) There's nothing obvious in the server log. I have tried setting
various options to debug and watching, but nothing ever seems to show
the name of the playlist or any errors. Would you happen to know which
option would be the right one to set to debug?

2) I tried %20 and %27 for double and single quotes, but no luck.

3) I could switch to JSON, but it's more complicated. What would be a
valid JSON request for what I want to do? I've seen some in my research
and tried a couple but didn't get it working.

4) Is there a way to query LMS to get a list of the actual playlist
names in the Database? Presumably that's where the "itunesplaylist:"
prefix is stored?

Many thanks for your help.



caes's Profile: http://forums.slimdevices.com/member.php?userid=66305
View this thread: http://forums.slimdevices.com/showthread.php?t=106523

___
Squeezecenter mailing list
Squeezecenter@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/squeezecenter