Open nathandraper opened 4 years ago
Hi @nathandraper !
Thanks for suggesting new features. This is always appreciated.
I think it would be a useful addition, perhaps, it could be an additional command-line switch, that could be applied more generically. This could be useful not only for spotify, but the other services as well.
I'll think in more detail about a possible way to implement this and I will post here the information in case you want to work on this.
@nathandraper
Sorry for the long wait. I've just remembered that #514 is probably the same feature request.
@nathandraper
I think it would perhaps be good to have a 'global' option (see https://docs.tizonia.org/manual/global.html) that could be applied in conjunction with any service:
E.g.:
$ tizonia --spotify-artist 'queen' --report-only
This would report the contents of the play queue but without going on to loading the plugin pipeline for playback. I.e. I'm assuming here that adding --report-only
to a tizonia command-line would mean the play queue contents are reported on the terminal, and the execution of the program is terminated at that point.
The player command-line argument parsing is done in this class. Adding another 'global' switch is fairly straightforward: https://github.com/tizonia/tizonia-openmax-il/blob/master/player/src/tizprogramopts.hpp
Perhaps the biggest difficulty is finding the location of the various state machines where to put check for the existence of the --report-only
flag.
I think this could be a possible location for that check: https://github.com/tizonia/tizonia-openmax-il/blob/dd0e306e1904ff433d740db9f1d92806dc4e49ac/player/src/services/tizservicegraphfsm.hpp#L469
This is the state machine shared by google play music, plex, and soundcloud. The other services have their own individual state machines. So it would be necessary to modify them all.
The modifications to the state machine might not be complicated at all. I'll try to work out an example and post it here.
@nathandraper, feel free to ask any question here. Or use the Gitter chat if you feel like it.
I've been enjoying using this program so far! Being able to just type a single command and play something is extremely convenient. One thing I'd like to implement is the ability to do things like just get a formatted list of albums by an artist. Something like
tizonia --spotify-see-discography arg
or something. This would be useful when I'm sitting there trying to remember the name of something. Right now it appears that--spotify-artist
will print this information, but you can't do it without actually starting playback.Would this be a feature that we'd like to add? I can work on this.