PodFetch icon indicating copy to clipboard operation
PodFetch copied to clipboard

FR/Question - specify podcast download directory.

Open ashprice opened this issue 9 months ago • 2 comments

Hello, I used to have this setup so that it would use a specified directory as the podcast storage directory, but I didn't use it for a long time and then ran into some issues with antennapod, ultimately prompting me to reinstall podfetch from scratch. I have forgotten how to edit the environment variables so as to do this. Would you please be able to help me? Maybe add the information to the documentation?

Apologies, this might be basic docker know-how; I am not a developer. Please point me to documentation if it is easier.

Use-case: I am running podfetch on a dedicated desktop as opposed to a server; I sync to antennapod as needed. On my desktop I have a smaller drive for my system on an SSD and a larger storage HDD. I would like for the podcast files to be stored on the HDD. Everything else can be on the SSD. I have other docker images running which need to be on the SSD.

Thank you.

ashprice avatar Mar 23 '25 15:03 ashprice

It's called PODFETCH_FOLDER. There you can specify the path

SamTV12345 avatar Mar 25 '25 17:03 SamTV12345

Thank you.

When I specify this environment variable, I get an error when starting the service, saying that the folder cannot be found - I get this regardless of whether it is there or not.

I wonder if it isn't a permissions issue? I tried with both user: 0:0 and user: 1000:1000. I have also tried variations of permissions and ownership on the folder directly with chmod/chown.

2025-03-26T13:52:50 ℹ️ - GPodder integration enabled: true
2025-03-26T13:52:50 ℹ️ - Podindex API key&secret configured: false
2025-03-26T13:52:50 ❌ - database is locked
2025-03-26T13:52:50 ❌ - database is locked
2025-03-26T13:52:50 ❌ - database is locked
2025-03-26T13:52:50 ❌ - database is locked
2025-03-26T13:52:50 ❌ - database is locked
2025-03-26T13:52:50 ❌ - database is locked
2025-03-26T13:52:50 ❌ - database is locked
2025-03-26T13:52:50 ❌ - database is locked
2025-03-26T13:52:50 ❌ - database is locked
2025-03-26T13:52:50 ❌ - IO error: No such file or directory (os error 2) for path /store/podcasts/podstore
2025-03-26T13:52:50 ❌ - Could not create podcast root directory: Initial error: Requested file was not found
Error context:
   0: <podfetch::utils::error::CustomError as core::convert::From<podfetch::utils::error::CustomErrorInner>>::from
             at /home/rust/src/src/utils/error.rs:33:34
   1: podfetch::utils::error::map_io_error
             at /home/rust/src/src/utils/error.rs:220:41
   2: <podfetch::adapters::file::local_file_handler::LocalFileHandler as podfetch::adapters::file::file_handler::FileHandler>::create_dir::{{closure}}
             at /home/rust/src/src/adapters/file/local_file_handler.rs:26:47
   3: core::result::Result<T,E>::map_err
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/result.rs:856:27
   4: <podfetch::adapters::file::local_file_handler::LocalFileHandler as podfetch::adapters::file::file_handler::FileHandler>::create_dir
             at /home/rust/src/src/adapters/file/local_file_handler.rs:26:35
   5: podfetch::adapters::file::file_handle_wrapper::FileHandleWrapper::create_dir
             at /home/rust/src/src/adapters/file/file_handle_wrapper.rs:35:39
   6: podfetch::service::file_service::FileService::create_podcast_root_directory_exists
             at /home/rust/src/src/service/file_service.rs:57:20
   7: podfetch::commands::startup::handle_config_for_server_startup
             at /home/rust/src/src/commands/startup.rs:322:11
   8: podfetch::main::{{closure}}
             at /home/rust/src/src/main.rs:57:18
   9: tokio::runtime::park::CachedParkThread::block_on::{{closure}}
             at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.43.0/src/runtime/park.rs:284:63
  10: tokio::runtime::coop::with_budget
             at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.43.0/src/runtime/coop.rs:107:5
  11: tokio::runtime::coop::budget
             at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.43.0/src/runtime/coop.rs:73:5
  12: tokio::runtime::park::CachedParkThread::block_on
             at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.43.0/src/runtime/park.rs:284:31
  13: tokio::runtime::context::blocking::BlockingRegionGuard::block_on
             at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.43.0/src/runtime/context/blocking.rs:66:9
  14: tokio::runtime::scheduler::multi_thread::MultiThread::block_on::{{closure}}
             at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.43.0/src/runtime/scheduler/multi_thread/mod.rs:87:22
  15: tokio::runtime::context::runtime::enter_runtime
             at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.43.0/src/runtime/context/runtime.rs:65:16
  16: tokio::runtime::scheduler::multi_thread::MultiThread::block_on
             at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.43.0/src/runtime/scheduler/multi_thread/mod.rs:86:9
  17: tokio::runtime::runtime::Runtime::block_on_inner
             at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.43.0/src/runtime/runtime.rs:370:50
  18: tokio::runtime::runtime::Runtime::block_on
             at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.43.0/src/runtime/runtime.rs:342:13
  19: podfetch::main
             at /home/rust/src/src/main.rs:62:5
  20: core::ops::function::FnOnce::call_once
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/ops/function.rs:250:5
  21: std::sys::backtrace::__rust_begin_short_backtrace
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/sys/backtrace.rs:154:18
  22: std::rt::lang_start::{{closure}}
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/rt.rs:195:18
  23: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/ops/function.rs:284:13
  24: std::panicking::try::do_call
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:557:40
  25: std::panicking::try
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:520:19
  26: std::panic::catch_unwind
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panic.rs:358:14
  27: std::rt::lang_start_internal::{{closure}}
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/rt.rs:174:48
  28: std::panicking::try::do_call
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:557:40
  29: std::panicking::try
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:520:19
  30: std::panic::catch_unwind
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panic.rs:358:14
  31: std::rt::lang_start_internal
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/rt.rs:174:20
  32: main


thread 'main' panicked at src/commands/startup.rs:326:13:
Could not create podcast root directory: Initial error: Requested file was not found
Error context:
   0: <podfetch::utils::error::CustomError as core::convert::From<podfetch::utils::error::CustomErrorInner>>::from
             at /home/rust/src/src/utils/error.rs:33:34
   1: podfetch::utils::error::map_io_error
             at /home/rust/src/src/utils/error.rs:220:41
   2: <podfetch::adapters::file::local_file_handler::LocalFileHandler as podfetch::adapters::file::file_handler::FileHandler>::create_dir::{{closure}}
             at /home/rust/src/src/adapters/file/local_file_handler.rs:26:47
   3: core::result::Result<T,E>::map_err
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/result.rs:856:27
   4: <podfetch::adapters::file::local_file_handler::LocalFileHandler as podfetch::adapters::file::file_handler::FileHandler>::create_dir
             at /home/rust/src/src/adapters/file/local_file_handler.rs:26:35
   5: podfetch::adapters::file::file_handle_wrapper::FileHandleWrapper::create_dir
             at /home/rust/src/src/adapters/file/file_handle_wrapper.rs:35:39
   6: podfetch::service::file_service::FileService::create_podcast_root_directory_exists
             at /home/rust/src/src/service/file_service.rs:57:20
   7: podfetch::commands::startup::handle_config_for_server_startup
             at /home/rust/src/src/commands/startup.rs:322:11
   8: podfetch::main::{{closure}}
             at /home/rust/src/src/main.rs:57:18
   9: tokio::runtime::park::CachedParkThread::block_on::{{closure}}
             at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.43.0/src/runtime/park.rs:284:63
  10: tokio::runtime::coop::with_budget
             at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.43.0/src/runtime/coop.rs:107:5
  11: tokio::runtime::coop::budget
             at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.43.0/src/runtime/coop.rs:73:5
  12: tokio::runtime::park::CachedParkThread::block_on
             at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.43.0/src/runtime/park.rs:284:31
  13: tokio::runtime::context::blocking::BlockingRegionGuard::block_on
             at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.43.0/src/runtime/context/blocking.rs:66:9
  14: tokio::runtime::scheduler::multi_thread::MultiThread::block_on::{{closure}}
             at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.43.0/src/runtime/scheduler/multi_thread/mod.rs:87:22
  15: tokio::runtime::context::runtime::enter_runtime
             at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.43.0/src/runtime/context/runtime.rs:65:16
  16: tokio::runtime::scheduler::multi_thread::MultiThread::block_on
             at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.43.0/src/runtime/scheduler/multi_thread/mod.rs:86:9
  17: tokio::runtime::runtime::Runtime::block_on_inner
             at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.43.0/src/runtime/runtime.rs:370:50
  18: tokio::runtime::runtime::Runtime::block_on
             at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.43.0/src/runtime/runtime.rs:342:13
  19: podfetch::main
             at /home/rust/src/src/main.rs:62:5
  20: core::ops::function::FnOnce::call_once
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/ops/function.rs:250:5
  21: std::sys::backtrace::__rust_begin_short_backtrace
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/sys/backtrace.rs:154:18
  22: std::rt::lang_start::{{closure}}
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/rt.rs:195:18
  23: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/ops/function.rs:284:13
  24: std::panicking::try::do_call
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:557:40
  25: std::panicking::try
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:520:19
  26: std::panic::catch_unwind
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panic.rs:358:14
  27: std::rt::lang_start_internal::{{closure}}
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/rt.rs:174:48
  28: std::panicking::try::do_call
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:557:40
  29: std::panicking::try
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:520:19
  30: std::panic::catch_unwind
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panic.rs:358:14
  31: std::rt::lang_start_internal
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/rt.rs:174:20
  32: main


stack backtrace:
   0: rust_begin_unwind
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:665:5
   1: core::panicking::panic_fmt
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/panicking.rs:74:14
   2: podfetch::commands::startup::handle_config_for_server_startup
             at /home/rust/src/src/commands/startup.rs:326:13
   3: podfetch::main::{{closure}}
             at /home/rust/src/src/main.rs:57:18
   4: tokio::runtime::park::CachedParkThread::block_on::{{closure}}
             at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.43.0/src/runtime/park.rs:284:63
   5: tokio::runtime::coop::with_budget
             at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.43.0/src/runtime/coop.rs:107:5
   6: tokio::runtime::coop::budget
             at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.43.0/src/runtime/coop.rs:73:5
   7: tokio::runtime::park::CachedParkThread::block_on
             at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.43.0/src/runtime/park.rs:284:31
   8: tokio::runtime::context::blocking::BlockingRegionGuard::block_on
             at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.43.0/src/runtime/context/blocking.rs:66:9
   9: tokio::runtime::scheduler::multi_thread::MultiThread::block_on::{{closure}}
             at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.43.0/src/runtime/scheduler/multi_thread/mod.rs:87:22
  10: tokio::runtime::context::runtime::enter_runtime
             at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.43.0/src/runtime/context/runtime.rs:65:16
  11: tokio::runtime::scheduler::multi_thread::MultiThread::block_on
             at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.43.0/src/runtime/scheduler/multi_thread/mod.rs:86:9
  12: tokio::runtime::runtime::Runtime::block_on_inner
             at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.43.0/src/runtime/runtime.rs:370:50
  13: tokio::runtime::runtime::Runtime::block_on
             at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.43.0/src/runtime/runtime.rs:342:13
  14: podfetch::main
             at /home/rust/src/src/main.rs:62:5
  15: core::ops::function::FnOnce::call_once
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
2025-03-26T13:52:50 ❌ - Error Requested file was not found:    0: <podfetch::utils::error::CustomError as core::convert::From<podfetch::utils::error::CustomErrorInner>>::from
             at /home/rust/src/src/utils/error.rs:33:34
   1: podfetch::utils::error::map_io_error
             at /home/rust/src/src/utils/error.rs:220:41
   2: <podfetch::adapters::file::local_file_handler::LocalFileHandler as podfetch::adapters::file::file_handler::FileHandler>::create_dir::{{closure}}
             at /home/rust/src/src/adapters/file/local_file_handler.rs:26:47
   3: core::result::Result<T,E>::map_err
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/result.rs:856:27
   4: <podfetch::adapters::file::local_file_handler::LocalFileHandler as podfetch::adapters::file::file_handler::FileHandler>::create_dir
             at /home/rust/src/src/adapters/file/local_file_handler.rs:26:35
   5: podfetch::adapters::file::file_handle_wrapper::FileHandleWrapper::create_dir
             at /home/rust/src/src/adapters/file/file_handle_wrapper.rs:35:39
   6: podfetch::service::file_service::FileService::create_podcast_root_directory_exists
             at /home/rust/src/src/service/file_service.rs:57:20
   7: podfetch::commands::startup::handle_config_for_server_startup
             at /home/rust/src/src/commands/startup.rs:322:11
   8: podfetch::main::{{closure}}
             at /home/rust/src/src/main.rs:57:18
   9: tokio::runtime::park::CachedParkThread::block_on::{{closure}}
             at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.43.0/src/runtime/park.rs:284:63
  10: tokio::runtime::coop::with_budget
             at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.43.0/src/runtime/coop.rs:107:5
  11: tokio::runtime::coop::budget
             at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.43.0/src/runtime/coop.rs:73:5
  12: tokio::runtime::park::CachedParkThread::block_on
             at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.43.0/src/runtime/park.rs:284:31
  13: tokio::runtime::context::blocking::BlockingRegionGuard::block_on
             at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.43.0/src/runtime/context/blocking.rs:66:9
  14: tokio::runtime::scheduler::multi_thread::MultiThread::block_on::{{closure}}
             at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.43.0/src/runtime/scheduler/multi_thread/mod.rs:87:22
  15: tokio::runtime::context::runtime::enter_runtime
             at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.43.0/src/runtime/context/runtime.rs:65:16
  16: tokio::runtime::scheduler::multi_thread::MultiThread::block_on
             at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.43.0/src/runtime/scheduler/multi_thread/mod.rs:86:9
  17: tokio::runtime::runtime::Runtime::block_on_inner
             at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.43.0/src/runtime/runtime.rs:370:50
  18: tokio::runtime::runtime::Runtime::block_on
             at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.43.0/src/runtime/runtime.rs:342:13
  19: podfetch::main
             at /home/rust/src/src/main.rs:62:5
  20: core::ops::function::FnOnce::call_once
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/ops/function.rs:250:5
  21: std::sys::backtrace::__rust_begin_short_backtrace
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/sys/backtrace.rs:154:18
  22: std::rt::lang_start::{{closure}}
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/rt.rs:195:18
  23: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/ops/function.rs:284:13
  24: std::panicking::try::do_call
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:557:40
  25: std::panicking::try
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:520:19
  26: std::panic::catch_unwind
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panic.rs:358:14
  27: std::rt::lang_start_internal::{{closure}}
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/rt.rs:174:48
  28: std::panicking::try::do_call
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:557:40
  29: std::panicking::try
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:520:19
  30: std::panic::catch_unwind
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panic.rs:358:14
  31: std::rt::lang_start_internal
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/rt.rs:174:20
  32: main
 with error

ashprice avatar Mar 26 '25 13:03 ashprice