XilinJia / Podcini

Open source podcast instrument for Android supporting contents from YouTube and YT Music as well as normal podcasts.
GNU General Public License v3.0
207 stars 8 forks source link

YouTube playlist support #84

Closed Victor239 closed 2 weeks ago

Victor239 commented 2 months ago

Checklist

App version

6.5.1

Where did you get the app from

F-Droid

Problem you may be having, or feature you want

I'd like to be able to subscribe to a playlist of a channel rather than a whole channel. Many larger channels create so much varied content that I'm not interested in, but they do release some content into narrowly defined playlists that I'd happily subscribe to.

Suggested solution

Ability to subscribe to playlists.

Screenshots / Drawings / Technical details

Note: playlists already have RSS support, but don't seem to be recognised by Podcini eg https://youtube.com/playlist?list=PLUBKwq0XD0uc8NxCik1bJ-SlZ9cOAkd2R

XilinJia commented 2 months ago

Thanks for the suggestion. That should be available soon.

XilinJia commented 2 months ago

in 6.6.3, playlist is handled via share, which should be better than search from within Podcini. Playlist can be subscribed in the same way as a channel.

Victor239 commented 2 months ago

The implementation seems unreliable. Whilst the above playlist works, when I try a random one like https://www.youtube.com/playlist?list=PLvij5I1MVvM1IEs3LJJboEBP7g9R6tCDd it just tries to load infinitely.

XilinJia commented 2 months ago

I opened the link instantly.

I noticed sometime opening a playlist appear to stuck, I thought it has to do with loading too many episodes, but probably that's not the case. Sometimes opening it again goes through. I don't have a good network at the moment, do you?

Victor239 commented 2 months ago

My network is fine. The playlists are each 10 and 12 episodes so I don't know why there's such a difference in behaviour. I've tried several other playlists of similar length and I can only load the original Second Wind one.

XilinJia commented 2 months ago

I found subscribing to shared playlists pretty smooth on 6.6.4+ (can you detail your operation steps). Playing a video episode at times can get stuck. It appears after switching to other episodes and then returning to the stuck episode could make it through. I'm not sure what are the causes, but suspect perhaps the ads cause it to stuck.

Victor239 commented 2 months ago

I can either select the text for the playlist link in the GitHub app and use the Share pop-up to share it to Podcini (Add playlist), or I can follow the playlist link to open it in the YouTube app then try to Share it to Podcini again, both have the same results. I've also tried copying the playlist link into a text editor and sharing it from there with the same results.

https://youtube.com/playlist?list=PLUBKwq0XD0uc8NxCik1bJ-SlZ9cOAkd2R loads instantly, whilst https://www.youtube.com/playlist?list=PLvij5I1MVvM1IEs3LJJboEBP7g9R6tCDd never finishes loading - there's just the spinner in the middle of the page, with "Online feed" and a back button at the top. Any other arbitrary playlist also never finishes loading e.g. https://www.youtube.com/playlist?list=PLU2851hDb3SGuiXDCZW0GEtXeEsjwobG8.

XilinJia commented 2 months ago

What version of Podcini are you using? The 2 never-finish links open instantly in 6.6.6. What I did was copy your link into Youtube, locate the playlist in Youtube, then share it to Podcini.

Victor239 commented 2 months ago

6.6.5. I'll try the next version when it's available on Izzy.

XilinJia commented 2 months ago

Hum, I'm not sure how much difference 6.6.5 is from 6.6.6 in this respect I was thinking 6.6.3 has some difference). I'm quite surprised the 2 links didn't work for you. But let me know how 6.6.6 works.

Victor239 commented 2 months ago

Nah no luck with this version either.

XilinJia commented 2 months ago

https://github.com/user-attachments/assets/181ed834-a47a-44c1-8f9a-e88a656183f0

Victor239 commented 2 months ago

Doesn't work with the same procedure https://www.youtube.com/shorts/pYFcT_6bndY

XilinJia commented 2 months ago

You are sharing from Brave browser? I can't say what actually is shared from there. For Podcini to accept the share as a youtube playlist, it checks if the shared address starts with "https://www.youtube.com/playlist?", if not, then the share is passed on to be handled as a normal podcast. Sorry, it's not that foolproof.

I know share it from Youtube app works. Can you try it from there as I did?

Victor239 commented 2 months ago

I see the issue - it fails because it expects https://youtube.com, so it doesn't handle https://www.youtube.com nor https://m.youtube.com links.

XilinJia commented 2 months ago

That should be it. Will check about other domains later.

XilinJia commented 1 month ago

https://www.youtube.com/ and https://m.youtube.com/ should work with 6.9.0. See if you find further issues.

Victor239 commented 1 month ago

It seems a bit bugged still - it loads the playlist name and thumbnail but stays showing "0 episodes":

image

XilinJia commented 1 month ago

constructing episodes is in the background. If you want to see true number of episodes, you can wait and see the "0 episodes" changes. Otherwise, you can subscribe at any time and it will be done in the background.

Victor239 commented 1 month ago

This isn't completing in the background successfully. Even if I leave it several minutes it stays the same, so I try to click "Subscribing..." which will at least add it as a subscription.

But then it stays at 0 episodes permanently, and even clicking "Refresh" doesn't do anything.

The first 3 here are channels and the episodes load successfully, the last 2 are playlists which don't.

Screenshot_20241008-073828_Podcini.R_1.png

XilinJia commented 1 month ago

OK, got the culprit. fixed in the coming release. Actually it affected the channels too. but since the channels has more episodes, it got those, but not complete.

XilinJia commented 1 month ago

Youtube Live media can now be accepted as share, with version 6.11.3.

Are there any other issues related to this?

Victor239 commented 1 month ago

Trying to share the playlist using the share button is malformed e.g. http://2Fwww.youtube.com%2Fplaylist%3Flist%3DPLWrhB0l2M84m2vwpZXRadL_9YJ1lq4FE6&title=Money+Mondays when it was originally https://www.youtube.com/playlist?list=PLWrhB0l2M84m2vwpZXRadL_9YJ1lq4FE6

Also refreshing doesn't seem to do anything. I can see episodes on YouTube that I can't get into Podcini.

XilinJia commented 1 month ago

How did you get and where do you see: (http://2fwww.youtube.com%2Fplaylist%3Flist=plwrhb0l2m84m2vwpzxradl_9yj1lq4fe6&title=money+mondays/)

I shared (from Youtube app) the playlist into Podcini and on FeedInfo view the url is neither of the two though similar to the second one. Actually the shared address appears different every time I share (shared to Keep to check), and valid, not the http://2Fwww stuff.

The number of episodes shown in Podcini is 190, while I see on Youtube it says 194. I don't have much idea on the difference. How different was yours?

Victor239 commented 1 month ago

Clicking the 3 dot menu then Share brings up the malformed URL: image

Mine is 189. I've been unable to refresh to load the latest video from 2 days ago, which is the only new video that been uploaded since I added this playlist to Podcini.

XilinJia commented 1 month ago

I see, that address is from share-out from Podcini, that should have been handled in the same way as normal podcast. I'm not sure why it's like that, will find out. Will also try to see why some episodes are missing.

XilinJia commented 1 month ago

I checked with a few playlists, it appears the number of episodes Podcini gets are the available episodes from the list (some episodes are made unavailable by the uploader for some reason). For instance, 194 shown on Youtube includes the unavailable episodes (Youtube app shows "unavailable episodes are hidden"), if you count the list (I counted some smaller list to verify), there are only 190 as I get on Podcini.

Will check why the list doesn't update. I know channels update fine.

XilinJia commented 1 month ago

The share of a feed from Podcini (inherited from AntennaPod) has this:

        val text = """
             ${feed.title}

            ${URLEncoder.encode(feed.downloadUrl)}&title=${URLEncoder.encode(feed.title)}
             """.trimIndent()

I don't what that's for.

XilinJia commented 3 weeks ago

in 6.12.6, share in FeedInfo and FeedEpisodes now shares a straight download url of the feed.

Victor239 commented 3 weeks ago

Thanks, yeah the share URL is fixed. Still have the issue where playlist refresh doesn't update the list.

XilinJia commented 3 weeks ago

I wonder if the shared playlist address is static. If you have some updating playlists handy, could you test this:

Victor239 commented 3 weeks ago

The shared playlist address from Podcini is the same as the one that's imported into it. You can use these example addresses for testing https://youtube.com/playlist?list=PLUBKwq0XD0udvQQwx7QOeOmcAAj0yawv1 and https://youtube.com/playlist?list=PLj3yH4lzAY9-PcJMjAgkqcApFl95slr39, they get new additions about once a week so if you leave them in Podcini you'll see they don't get the additions.

XilinJia commented 2 weeks ago

playlists update is likely fixed in 6.13.5. Let me know how it works for you.

Victor239 commented 2 weeks ago

The refresh bug seems fixed :) thanks!

XilinJia commented 2 weeks ago

Good. close this now, feel free to reopen with new evidence