yomguy / DeeFuzzer

Light and instant media streaming client for web radios and TVs written in Python
https://github.com/yomguy/DeeFuzzer
GNU General Public License v3.0
141 stars 31 forks source link

What is the best way to call playlist.py to regenerate a new playlist.m3u? #82

Closed ChoiZ closed 5 years ago

ChoiZ commented 8 years ago

I write a little playlist scheduler and I want to call this playlist generator on startup and when the playlist end to generate a new one.

@yomguy What is the best way to call my playlist generator?

Thanks in advance ;)

yomguy commented 8 years ago

I guess you could trigger your external app in the get_playlist() method using os.system(...) and adding an option in the config to give the app start command ? https://github.com/yomguy/DeeFuzzer/blob/master/deefuzzer/station.py#L403

If this app returns a m3u file, then it may be read by the same method as in this part: https://github.com/yomguy/DeeFuzzer/blob/master/deefuzzer/station.py#L421

If not, your app should return the playlist to the stdout which can be read by os.system.

ChoiZ commented 8 years ago

Is it possible to load a playlist (m3u) and the last element of this playlist is another playlist to load?

playlist1.m3u content:

artist - title.mp3 other songs … playlist2.m3u

playlist2.m3u content:

artist2 - title2.mp3 other songs … playlist1.m3u

2nd question: Is it possible to reload playlist without restarting deefuzzer?

yomguy commented 5 years ago

Hi @ChoiZ Hope you are well ! I am afraid I have missed your questions 3 years ago! :(

  1. DeeFuzzer is not capable of launching a playlist in a playlist yet..
  2. Currently the playlist is reloaded only if a new track is added to the media directory. But it should be definitely interesting to be able to do it in other contexts! I will add this feature to 0.8.