sunnyhd / homeintouch

A home automation project using socket.io
2 stars 0 forks source link

Missing feature - arrange/save/load playlists #47

Open sunnyhd opened 12 years ago

sunnyhd commented 12 years ago

Arrange Playlists with drag and drop if possible and load and save playlists.

Music: {"method":"Playlist.Insert","id":3,"jsonrpc":"2.0","params":{"item":{"songid":124},"position":3,"playlistid":0}}

Video: {"method":"Playlist.Insert","id":8,"jsonrpc":"2.0","params":{"item":{"movieid":156},"position":0,"playlistid":1}}

Episode: {"method":"Playlist.Insert","id":7,"jsonrpc":"2.0","params":{"item":{"episodeid":38},"position":1,"playlistid":1}}

scttnlsn commented 12 years ago

I don't believe XBMC supports loading/saving playlists but we could store them ourselves (perhaps in the node-dirty database).

@sunnyhd Did you have anything in particular in mind here?

sunnyhd commented 12 years ago

Yes I havent found a json command either to store the actual playlist. To open a playlist we can use the Player.Open command if there are playlists created in xbmc itself and get the list with the files command.

{"method":"Files.GetDirectory","id":1,"jsonrpc":"2.0","params":{"sort":{"order":"ascending","ignorearticle":false,"method":"label"},"directory":"special://musicplaylists/","media":"music"}}

scttnlsn commented 12 years ago

I tried playing the special://profile/playlists/music/test.m3u playlist but it resulted in a picture player and added test.m3u to the picture playlist. Looking at the contents of the test.m3u directory, it seems as though it should be an audio player/playlist:

[ { file: 'smb://192.168.2.3/xbmc_music/50 Cent/Club_Dance music/11 P.I.M.P..mp3',
    filetype: 'file',
    label: '01. 50 Cent - P.I.M.P.',
    type: 'unknown' },
  { file: 'smb://192.168.2.3/xbmc_music/50 Cent/Club_Dance music/Magic Stick.mp3',
    filetype: 'file',
    label: '02. 50 Cent - Magic Stick',
    type: 'unknown' },
  { file: 'smb://192.168.2.3/xbmc_music/ADELE/19 (Deluxe Edition)/1-01 Daydreamer.m4a',
    filetype: 'file',
    label: '02. ADELE - Daydreamer',
    type: 'unknown' },
  { file: 'smb://192.168.2.3/xbmc_music/ADELE/19 (Deluxe Edition)/1-04 Cold Shoulder.m4a',
    filetype: 'file',
    label: '05. ADELE - Cold Shoulder',
    type: 'unknown' } ]

@sunnyhd Any idea what's going on here?

sunnyhd commented 12 years ago

Hi Scott, I tried to start the tet.m3u with the sam result and tested a XBMC web interface to start the test.m3u also with no luck. Maybe you better continue with the pictures section