ericmedina024 / podcast-sponsor-block

SponsorBlock integration for podcasts
MIT License
39 stars 5 forks source link

Podcast shows 0 episodes when add to Podcast App #1

Closed LJAM96 closed 7 months ago

LJAM96 commented 7 months ago

The first podcast I attempted was Criminal. added ID to URL got an output. On adding the output to my podcast app it creates an entry with the correct name and image but shows 0 episodes.

XML item example

<item>
<title>Protection | Criminal Podcast</title>
<description>John “Sonny” Franzese was once described as “largely responsible for the glamorization of the Mafia over the past century.” He’d been active in the Colombo crime family since the 1960s. And then, when he was 93, he was given an 8-year sentence. The evidence that helped convict him came from the last person he expected to wear a wire. Music in the episode “Tarte Tatin” by Blue Dot Sessions “Myrian” by Blue Dot Sessions “Story Four - Put it Down” by Blue Dot Sessions “Farsical - Slow Driver” by Blue Dot Sessions “Skeptic” by Podington Bear “Holo” by Blue Dot Sessions “In My Head” by Podington Bear “Sepia” by Podington Bear Criminal is a show about people who’ve done wrong, been wronged, or gotten caught somewhere in the middle. Hosted by Phoebe Judge. Part of the Vox Media Podcast Network. Follow the show on Apple Podcasts, Spotify, or wherever you get your podcasts. https://link.chtbl.com/n33u0HsA Say hello on Twitter (@CriminalShow), Instagram (@criminal_podcast), and Facebook https://www.facebook.com/ThisIsCriminal/. Sign up for our occasional newsletter, The Accomplice https://bit.ly/accomplicenewsletter. We also make This is Love and Phoebe Reads a Mystery. Artwork by Julienne Alexander http://www.yssrs.com/. Check out our online shop https://store.dftba.com/collections/criminal. Episode transcripts are posted on our website https://thisiscriminal.com/. Episode 105 originally published 12/21/2018 https://thisiscriminal.com/episode-105-protection-12-21-2018 #crime #podcast #truecrime</description>
<guid isPermaLink="false">dCN7FRPqj_4</guid>
<enclosure url="/media/youtube/dCN7FRPqj_4" length="0" type="audio/mp4"/>
<pubDate>Fri, 20 Jan 2023 03:34:09 +0000</pubDate>
<ns0:group xmlns:ns0="http://search.yahoo.com/mrss/">
<ns0:thumbnail url="https://i.ytimg.com/vi/dCN7FRPqj_4/maxresdefault.jpg"/>
</ns0:group>
</item>
ericmedina024 commented 7 months ago

which podcast app are you using? I tried /rss/youtube/PLMdYRoC0mZlW2uoesMXUrac26lsvOupSx with gPodder and it is able to list and stream the episodes

LJAM96 commented 7 months ago

I use Apple Podcasts, ive tried also tried with Overcast. Same result with 'Sleep With Me Podcast'

Using a reverse nginx proxy and domain but same issue with IP and port as URL

ericmedina024 commented 7 months ago

thanks. could you try the podcast PLY155lJX6_wcTzyjW2sGB4sTT5ZkivwnN? if that works, I believe I know what the issue is

LJAM96 commented 7 months ago

Same result I get 'This Past Weekend' Podcast populated within the app but 0 episodes.

I do get 2024-02-01 01:23:24,478 [INFO] Grabbing episodes from YouTube playlist PLY155lJX6_wcTzyjW2sGB4sTT5ZkivwnN in the logs but just doesnt seem to populate in app. maybe its Apple Podcasts and Overcast

ericmedina024 commented 7 months ago

it seems like Apple has specific proprietary tags required for apple podcasts (and Overcast probably inherits those requirements?). this should be easy enough to support, but i can't test it myself so please bear with me

https://help.apple.com/itc/podcasts_connect/#/itcb54353390

ericmedina024 commented 7 months ago

it seems like iTunes also implements the requirements - it acts the same way as you describe apple podcasts acting. i've opened a PR which works for iTunes now, but I have a few things to resolve still.

LJAM96 commented 7 months ago

On the PR when I enter a playlist ID on the URL I get

Internal Server Error

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

and on the logs I get


2024-02-01 22:37:27,157 [INFO] Generating RSS feed for YouTube playlist PLfikCHtGjo4kZ_kReUH9U3qCoaXQMwNDL
2024-02-01 22:37:27,297 [INFO] https://www.youtube.com/playlist?list=PLfikCHtGjo4kZ_kReUH9U3qCoaXQMwNDL
2024-02-01 22:37:27,298 [INFO] Grabbing episodes from YouTube playlist PLfikCHtGjo4kZ_kReUH9U3qCoaXQMwNDL
2024-02-01 22:37:27,495 [ERROR] Exception on /rss/youtube/PLfikCHtGjo4kZ_kReUH9U3qCoaXQMwNDL [GET]
Traceback (most recent call last):
  File "/home/appuser/.local/lib/python3.12/site-packages/flask/app.py", line 1463, in wsgi_app
    response = self.full_dispatch_request()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/appuser/.local/lib/python3.12/site-packages/flask/app.py", line 872, in full_dispatch_request
    rv = self.handle_user_exception(e)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/appuser/.local/lib/python3.12/site-packages/flask/app.py", line 870, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/appuser/.local/lib/python3.12/site-packages/flask/app.py", line 855, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/appuser/.local/lib/python3.12/site-packages/flask/views.py", line 110, in view
    return current_app.ensure_sync(self.dispatch_request)(**kwargs)  # type: ignore[no-any-return]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/appuser/.local/lib/python3.12/site-packages/flask/views.py", line 191, in dispatch_request
    return current_app.ensure_sync(meth)(**kwargs)  # type: ignore[no-any-return]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/src/podcastsponsorblock/views/youtuberssview.py", line 187, in get
    generate_rss_feed(episode_feed, GeneratorOptions(service_config, podcast_config, "")), mimetype="application/rss+xml"
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/appuser/.local/lib/python3.12/site-packages/cachetools/__init__.py", line 737, in wrapper
    v = func(*args, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^
  File "/app/src/podcastsponsorblock/views/youtuberssview.py", line 163, in generate_rss_feed
    feed_generator.add_entry(generate_episode_entry(episode, generator_options))
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/src/podcastsponsorblock/views/youtuberssview.py", line 93, in generate_episode_entry
    feed_entry.link(
  File "/home/appuser/.local/lib/python3.12/site-packages/feedgen/entry.py", line 445, in link
    self.__atom_link += ensure_format(
                        ^^^^^^^^^^^^^^
  File "/home/appuser/.local/lib/python3.12/site-packages/feedgen/util.py", line 74, in ensure_format
    raise ValueError('Data contains invalid keys')
ValueError: Data contains invalid keys
ericmedina024 commented 7 months ago

I think it should be working now, can you please try the PR branch again? you will need to set up a podcast configuration file as described here so that all the attributes iTunes requires are available

ericmedina024 commented 7 months ago

I found out that I can also test via Apple Podcasts Connect and even that is able to parse everything correctly now, so i hope it works haha

ericmedina024 commented 7 months ago

A friend of mine was able to test the PR w/ apple podcasts and it was able to view the episodes and stream them :)