Closed marius851000 closed 4 years ago
Thanks for the PR :heart:. I see some problems with your approach though. Is it reliable to base it on youtube-dl's playlist feature? I cannot find a way to determine if a playlist is actually a channel. This will lead to inconsistent data, because the playlist could contain videos from channels not tracked by ytcc.
Peertube actually has RSS feeds per channel. An implementation using these feeds will be more reliable, faster and better integrated. I use RSS feeds for the youtube channels already. When I find some time, I will look into this further and implement something.
Btw. please do not use subprocess to execute youtube-dl! Instead, use its Python API directly (see core.py)
Normally, if you subscribe to a playlist rather than a channel, it should consider the playlist as a channel, and that may be an interesing feature (the only problem is that playlist are not always sorted by publication date). Also, it may need to have some change, as the peertube implementation I made for youtube-dl allow to download all the video metadata in one single json request. (/api/v1/channel/channelname/videos).
This will be available in v2. I used the youtube-dl's playlist feature similar to your idea here. It required a rewrite of most modules to keep updating efficient and also the notion of channels has been replaced by playlists, which required a new database schema.
youtube-dl has an option to list video in playlist (including channel). I've used this ability (limiting it to 10 result) to be able to follow non-youtube channel. There are however multiple problem:
I've done this because I want an easy way to follow peertube channel (will just need to integrate peertube channel to youtube-dl).