diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-10-14 12:32:23 +0200 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-10-14 12:34:56 +0200 |
commit | 145a776039248a9460e9473e4bc9ef3d533b60c1 (patch) | |
tree | 7b2a948ae1f08335eba477c26bf1d5e83cdac24b /src/storage/video_database/getters.rs | |
parent | fix(downloader): Don't display changed cache size on first run (diff) | |
download | yt-145a776039248a9460e9473e4bc9ef3d533b60c1.tar.gz yt-145a776039248a9460e9473e4bc9ef3d533b60c1.zip |
feat(videos): Provide a consistent display for the `Video` struct
Before, `Video`s where colourized differently, just because the colourization was not standardized. It now is.
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, |