diff options
author | metamuffin <metamuffin@disroot.org> | 2024-03-30 10:38:18 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-03-30 10:38:18 +0100 |
commit | d2d58e5ce076a00ad97836a036bcdacfb423dfcb (patch) | |
tree | 6d378c528e3b311bf70a6b80b6a4c84f99be1741 /import/src/tmdb.rs | |
parent | 7f9ab0e949666647074f8d195308a69b224024bb (diff) | |
download | jellything-d2d58e5ce076a00ad97836a036bcdacfb423dfcb.tar jellything-d2d58e5ce076a00ad97836a036bcdacfb423dfcb.tar.bz2 jellything-d2d58e5ce076a00ad97836a036bcdacfb423dfcb.tar.zst |
probably fix tmdb import
Diffstat (limited to 'import/src/tmdb.rs')
-rw-r--r-- | import/src/tmdb.rs | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/import/src/tmdb.rs b/import/src/tmdb.rs index 3470b90..9828b8d 100644 --- a/import/src/tmdb.rs +++ b/import/src/tmdb.rs @@ -6,14 +6,17 @@ use anyhow::{anyhow, bail, Context}; use bincode::{Decode, Encode}; use jellybase::cache::{async_cache_file, async_cache_memory, CachePath}; -use jellycommon::chrono::{format::Parsed, Utc}; +use jellycommon::{ + chrono::{format::Parsed, Utc}, + TmdbKind, +}; use log::info; use reqwest::{ header::{HeaderMap, HeaderName, HeaderValue}, Client, ClientBuilder, }; use serde::Deserialize; -use std::{fmt::Display, sync::Arc}; +use std::sync::Arc; use tokio::io::AsyncWriteExt; pub struct Tmdb { @@ -212,17 +215,3 @@ pub struct TmdbProductionCompany { pub name: String, pub logo_path: Option<String>, } - -#[derive(Debug, Clone, Copy)] -pub enum TmdbKind { - Tv, - Movie, -} -impl Display for TmdbKind { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - f.write_str(match self { - TmdbKind::Tv => "tv", - TmdbKind::Movie => "movie", - }) - } -} |