Allow specifying songs in playlist creation URL#159
Allow specifying songs in playlist creation URL#159xhochy wants to merge 1 commit intotomahawk-player:masterfrom
Conversation
|
I think generally I'm fine with this. I'm just wondering if it wouldn't be more elegant to pass in artists & tracks in json as one encoded url parameter. Thoughts, anyone? |
|
It's a question of command line length. Considering that there's sometimes a limit of 64k characters even the above format maybe a bit too large. For example base64 encoded JSON would be even larger, which would drop support for larger playlists. |
|
Tbh I don't like that scheme too much, I'd rather see something like: tomahawk://playlist/new/?title=Awesome&track[0][artist]=Bloc+Party&track[0][title]=Flux see: http://stackoverflow.com/questions/7206978/how-to-pass-an-array-via-get-in-php or even shorter: title[0]=Flux&artist[0]=Bloc+Party |
|
Accoring to @xhochy this https://bugs.tomahawk-player.org/browse/TWK-1268 makes it unusable currently, needs to be fixed before this can/should be merged... |
Example usage:
tomahawk 'tomahawk://playlist/new/?title=Awesome&track_0_artist=Bloc+Party&track_0_title=Flux&track_1_artist=Vampire+Weekend&track_1_title=A+Punk'