diff options
Diffstat (limited to 'src/storage/video_database/getters.rs')
-rw-r--r-- | src/storage/video_database/getters.rs | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/storage/video_database/getters.rs b/src/storage/video_database/getters.rs index f2b0507..29dd014 100644 --- a/src/storage/video_database/getters.rs +++ b/src/storage/video_database/getters.rs @@ -287,7 +287,13 @@ pub async fn get_video_yt_dlp_opts(app: &App, hash: &ExtractorHash) -> Result<Yt ehash ) .fetch_one(&app.database) - .await?; + .await + .with_context(|| { + format!( + "Failed to fetch the `yt_dlp_video_opts` for video: {}", + hash + ) + })?; Ok(YtDlpOptions { subtitle_langs: yt_dlp_options.subtitle_langs, @@ -305,7 +311,8 @@ pub async fn get_video_mpv_opts(app: &App, hash: &ExtractorHash) -> Result<MpvOp ehash ) .fetch_one(&app.database) - .await?; + .await + .with_context(|| format!("Failed to fetch the `mpv_video_opts` for video: {}", hash))?; Ok(MpvOptions { playback_speed: mpv_options.playback_speed, @@ -324,7 +331,8 @@ pub async fn get_video_opts(app: &App, hash: &ExtractorHash) -> Result<VideoOpti ehash ) .fetch_one(&app.database) - .await?; + .await + .with_context(|| format!("Failed to fetch the `video_opts` for video: {}", hash))?; let mpv = MpvOptions { playback_speed: opts.playback_speed, |