Hey,
First thing, thank you so much for such an amazing library, that's both a huge amount of work and a continuous effort to maintain after each youtube change!
Channel specific playlists and rss endpoints
I figured I'd use the channel_rss feature for the most part in my use case but I wish I could be more easily tell the difference between videos, shorts and lives. I've long used the UU prefixed whole channel playlist, but inquiring on the matter on other 3rd party clients, I not only found about the channel dedicated extra "videos", "shorts", "lives" and I'll come back to that, but also about the playlist rss endoint (eg: https://www.youtube.com/feeds/videos.xml?playlist_id=<PLAYLIST-ID>) thanks to thefranke.
There's an extra user endpoint for users (https://www.youtube.com/feeds/videos.xml?user=<USERNAME>), but it seems to basically be the very same as channel except for the id that maps to the username in the xml response.
As I wished I could use playlist_rss same as channel_rss, I've forked the repo and made the basic changes for having a working version, would you be ok with me opening a draft Pull Request ?
On the current changes I renamed src/client/response/channel_rss.rs to just rss.rs and adding a single PlaylistRss struct for the response to deserialize because they share the exact same structure (except PlaylistRss takes both its own playlistId and a an extra channelId string field).
On the src/client side I duplicated channel_rss.rs into playlist_rss.rs and made the according change even for tests. Yet as those share most of the code I believe a better approach would be to have a single implementation specialized based on an enum but I'm not sure how to proceed and I'd rather seek advice.
I'm still new at rust so if you're in favor of the feature, I'm not at all settled on how to go about it and would greatly appreciate some guidance.
Finally, same as the channel_videos_tab[_order] query which allows for "videos", "shorts" or "lives" tabs with their "popular", "newer", "older" ordering; it turns out there exist as many channel playlists ids derived from the channel id (if such content as been published) but with a different prefix making them reachable from the aforementioned rss endpoint. I thought we could maybe make those available as choice, something like query().playlist_rss<C, O>() to specify for category and ordering or maybe query().playlist_rss_tab[_order](channel_id, tab[, order]), but maybe in a second time as it's overkill and unreliable.
More specifically on those prefixes though, replacing the channel ID prefix UC with:
UU returns the playlist with "all" content
- for "Videos" only:
UULP ordered by "popular"
UULF ordered by "newer"
- for "Shorts" only:
UUPS ordered by "popular"
UUSH ordered by "newer"
- for "Lives" only:
UUPV ordered by "popular"
UULV ordered by "newer"
Those prefixes are documented in freetube codebase.
((削除) Still looking for the eventual "older" ordering prefix (削除ここまで), explored the entire UUXX prefixes, there's no "older" ordering for playlist ID)
Hey,
First thing, thank you so much for such an amazing library, that's both a huge amount of work and a continuous effort to maintain after each youtube change!
## Channel specific playlists and rss endpoints
I figured I'd use the channel_rss feature for the most part in my use case but I wish I could be more easily tell the difference between videos, shorts and lives. I've long used the `UU` prefixed whole channel playlist, but inquiring on the matter on other 3rd party clients, I not only found about the channel dedicated extra "videos", "shorts", "lives" and I'll come back to that, but also about the playlist rss endoint (eg: `https://www.youtube.com/feeds/videos.xml?playlist_id=<PLAYLIST-ID>`) thanks to [thefranke](https://gist.github.com/thefranke/63853a6f8c499dc97bc17838f6cedcc2).
There's an extra user endpoint for users (`https://www.youtube.com/feeds/videos.xml?user=<USERNAME>`), but it seems to basically be the very same as channel except for the id that maps to the username in the xml response.
## Proposition: adding the `playlist_rss` feature
As I wished I could use `playlist_rss` same as `channel_rss`, I've forked the repo and made the basic changes for having a working version, would you be ok with me opening a draft Pull Request ?
On the current changes I renamed `src/client/response/channel_rss.rs` to just `rss.rs` and adding a single `PlaylistRss` struct for the response to deserialize because they share the exact same structure (except `PlaylistRss` takes both its own `playlistId` and a an extra `channelId` string field).
On the `src/client` side I duplicated `channel_rss.rs` into `playlist_rss.rs` and made the according change even for tests. Yet as those share most of the code I believe a better approach would be to have a single implementation specialized based on an enum but I'm not sure how to proceed and I'd rather seek advice.
I'm still new at rust so if you're in favor of the feature, I'm not at all settled on how to go about it and would greatly appreciate some guidance.
## Extra thought about readily available playlists
Finally, same as the `channel_videos_tab[_order]` query which allows for "videos", "shorts" or "lives" tabs with their "popular", "newer", "older" ordering; it turns out there exist as many channel playlists ids derived from the channel id (if such content as been published) but with a different prefix making them reachable from the aforementioned rss endpoint. I thought we could maybe make those available as choice, something like `query().playlist_rss<C, O>()` to specify for category and ordering or maybe `query().playlist_rss_tab[_order](channel_id, tab[, order])`, but maybe in a second time as it's overkill and unreliable.
More specifically on those prefixes though, replacing the channel ID prefix `UC` with:
- `UU` returns the playlist with "all" content
- for "Videos" only:
- `UULP` ordered by "popular"
- `UULF` ordered by "newer"
- for "Shorts" only:
- `UUPS` ordered by "popular"
- `UUSH` ordered by "newer"
- for "Lives" only:
- `UUPV` ordered by "popular"
- `UULV` ordered by "newer"
Those prefixes are documented in [freetube codebase](https://github.com/FreeTubeApp/FreeTube/blob/development/src/renderer/helpers/utils.js#L902).
(~~Still looking for the eventual "older" ordering prefix~~, explored the entire UUXX prefixes, there's no "older" ordering for playlist ID)