SamTV12345 / PodFetch

A sleek and efficient podcast downloader.
https://samtv12345.github.io/PodFetch
Apache License 2.0
347 stars 25 forks source link

Panic on episode fetch for patreon feed #69

Closed jimmyharris closed 1 year ago

jimmyharris commented 1 year ago

Describe the bug

Trying to add a patreon private feed I get the following error:

thread 'tokio-runtime-worker' panicked at 'called `Option::unwrap()` on a `None` value', src/service/podcast_episode_service.rs:234:41
stack backtrace:
   0: rust_begin_unwind
             at /rustc/8460ca823e8367a30dda430efda790588b8c84d3/library/std/src/panicking.rs:575:5
   1: core::panicking::panic_fmt
             at /rustc/8460ca823e8367a30dda430efda790588b8c84d3/library/core/src/panicking.rs:64:14
   2: core::panicking::panic
             at /rustc/8460ca823e8367a30dda430efda790588b8c84d3/library/core/src/panicking.rs:114:5
   3: podfetch::service::podcast_episode_service::PodcastEpisodeService::get_url_file_suffix
   4: podfetch::service::rust_service::PodcastService::handle_insert_of_podcast::{{closure}}
   5: podfetch::controllers::podcast_controller::insert_outline::{{closure}}
   6: futures_executor::local_pool::block_on
   7: <tokio::runtime::blocking::task::BlockingTask<T> as core::future::future::Future>::poll
   8: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
   9: tokio::runtime::task::core::Core<T,S>::poll
  10: tokio::runtime::task::harness::Harness<T,S>::poll
  11: tokio::runtime::blocking::pool::Inner::run

Looks like patreon file URLS aren't conforming to your regex capture structure correctly.

Reproduction

add a private patreon feed it will produce this stack trace.

System Info

Not sure how to get this via my docker setup.

Used Package Manager

n/a

Validations

jimmyharris commented 1 year ago

This is happening because Patreon podcast files don't have suffixes. I think the file types are based on mime type information.

SamTV12345 commented 1 year ago

Thanks for creating a bug report. Do you have a private patreon feed so I can reproduce the issue? I have never tried adding this via mime type but that could facilitate the process. I'm reading indeed the file type from the url.

SamTV12345 commented 1 year ago

Any updates on this one?

SamTV12345 commented 1 year ago

I'll close it in 1 week as this issue seems to be irrelevant. If you really experience this issue again please open a new one with a better description and a way that I can reproduce this issue.

SamTV12345 commented 1 year ago

Closed. Please create a new one with better reproduction.

jimmyharris commented 1 year ago

sorry I'll have to give some example data with a new ticket and better reproducibility. I might have to setup a similar hosting setup because I don't really want to give a private patreon feed out since that is something the authors of the feed are offering for pay.

SamTV12345 commented 1 year ago

No problem. You can also send it to this email address if you want to keep the url secret.