aboutsummaryrefslogtreecommitdiff
path: root/import/src/plugins/tmdb.rs
diff options
context:
space:
mode:
Diffstat (limited to 'import/src/plugins/tmdb.rs')
-rw-r--r--import/src/plugins/tmdb.rs22
1 files changed, 17 insertions, 5 deletions
diff --git a/import/src/plugins/tmdb.rs b/import/src/plugins/tmdb.rs
index 3d6e832..5980d53 100644
--- a/import/src/plugins/tmdb.rs
+++ b/import/src/plugins/tmdb.rs
@@ -3,17 +3,20 @@
which is licensed under the GNU Affero General Public License (version 3); see /COPYING.
Copyright (C) 2025 metamuffin <metamuffin.org>
*/
-use crate::USER_AGENT;
-use anyhow::{anyhow, bail, Context, Result};
-use jellycache::{cache_memory, cache_store, EscapeKey, HashKey};
+use crate::{
+ USER_AGENT,
+ plugins::{ImportPlugin, PluginInfo},
+};
+use anyhow::{Context, Result, anyhow, bail};
+use jellycache::{EscapeKey, HashKey, cache_memory, cache_store};
use jellycommon::{
- chrono::{format::Parsed, Utc},
Asset,
+ chrono::{Utc, format::Parsed},
};
use log::info;
use reqwest::{
- header::{HeaderMap, HeaderName, HeaderValue},
Client, ClientBuilder,
+ header::{HeaderMap, HeaderName, HeaderValue},
};
use serde::{Deserialize, Serialize};
use std::{fmt::Display, sync::Arc};
@@ -153,6 +156,15 @@ impl Tmdb {
}
}
+impl ImportPlugin for Tmdb {
+ fn info(&self) -> PluginInfo {
+ PluginInfo {
+ name: "tmdb",
+ ..Default::default()
+ }
+ }
+}
+
pub fn parse_release_date(d: &str) -> Result<Option<i64>> {
if d.is_empty() {
return Ok(None);