mas94uk / upnpTube

Cast from YouTube app to DLNA/UPNP renderers
GNU General Public License v3.0
26 stars 8 forks source link

[FYI] Took me forever #9

Open dgalli1 opened 1 year ago

dgalli1 commented 1 year ago

Sorry took me a long time to finally get around pushing my fork.

Anways here it is: https://github.com/dgalli1/ytm-mpd

In this mpd version seeking seems to work, and the playlist is more stable aswell. As i did this over 2 months ago i have no clue what i changed.

But it mostly has to do white requesting the next song once it's finished.

https://github.com/dgalli1/ytm-mpd/blob/a27715e5f9618da454f53c25f45f879e4e4b159f/renderer.js#L46

mas94uk commented 1 year ago

Thanks, I'll have a look. Is it possible to discover mpd clients (as is done for upnp devices), or do you have to know where they are? If it's possible to discover them, I could merge your mpd renderer into my project and it should work with both.

dgalli1 commented 1 year ago

Thanks, I'll have a look. Is it possible to discover mpd clients (as is done for upnp devices), or do you have to know where they are? If it's possible to discover them, I could merge your mpd renderer into my project and it should work with both.

Probably possible, but yeah the render class would have to be completely different, i will look into it.

dgalli1 commented 1 year ago

All i can see that could possibly work is scanning via mdns, and then checking if there is actually mdp listening on the port. https://www.npmjs.com/package/mdns avahi would be the preferred choice, but this will not work on Mac and Windows

As you can freely choose the mdp port and anything about it. I don't think this would make too much sense tho.

How would you feel about including a YAML config file where all the mpd host can be entered? We could also go for env variables to make integration with docker easier. (But this would be annoying on Windows again)

Btw my roadmap is something like this: Next would be a local music cache (with a http proxy that can stream the file, while it's still downloading) so that playback can start instantaneous. I try to keep it portable so that you can easily integrate it aswell.

After this I'd like to include my local music library which will match by artists and title (and maybe length). So that I can play flac versions if available.

After this I will focus on a lidarr integration to automatically download bands that I listen to a lot.