aboutsummaryrefslogtreecommitdiff
path: root/import
diff options
context:
space:
mode:
Diffstat (limited to 'import')
-rw-r--r--import/Cargo.toml1
-rw-r--r--import/src/acoustid.rs2
-rw-r--r--import/src/lib.rs7
-rw-r--r--import/src/musicbrainz.rs2
-rw-r--r--import/src/tmdb.rs10
-rw-r--r--import/src/trakt.rs6
-rw-r--r--import/src/vgmdb.rs2
-rw-r--r--import/src/wikidata.rs2
-rw-r--r--import/src/wikimedia_commons.rs2
9 files changed, 17 insertions, 17 deletions
diff --git a/import/Cargo.toml b/import/Cargo.toml
index ad9d529..506ed24 100644
--- a/import/Cargo.toml
+++ b/import/Cargo.toml
@@ -7,6 +7,7 @@ edition = "2021"
jellybase = { path = "../base" }
jellyclient = { path = "../client" }
jellyremuxer = { path = "../remuxer" }
+jellycache = { path = "../cache" }
jellyimport-fallback-generator = { path = "fallback_generator" }
rayon = "1.10.0"
diff --git a/import/src/acoustid.rs b/import/src/acoustid.rs
index 19ebc3d..741d491 100644
--- a/import/src/acoustid.rs
+++ b/import/src/acoustid.rs
@@ -6,7 +6,7 @@
use crate::USER_AGENT;
use anyhow::{Context, Result};
use bincode::{Decode, Encode};
-use jellybase::cache::async_cache_memory;
+use jellycache::async_cache_memory;
use log::info;
use reqwest::{
header::{HeaderMap, HeaderName, HeaderValue},
diff --git a/import/src/lib.rs b/import/src/lib.rs
index 0d72da2..2f7383a 100644
--- a/import/src/lib.rs
+++ b/import/src/lib.rs
@@ -9,11 +9,11 @@ use anyhow::{anyhow, bail, Context, Result};
use infojson::YVideo;
use jellybase::{
assetfed::AssetInner,
- cache::cache_file,
common::{Chapter, MediaInfo, Node, NodeID, NodeKind, Rating, SourceTrack, SourceTrackKind},
database::Database,
CONF, SECRETS,
};
+use jellycache::cache_file;
use jellyclient::{
Appearance, LocalTrack, ObjectIds, PeopleGroup, Person, TmdbKind, TrackSource, TraktKind,
Visibility,
@@ -425,7 +425,10 @@ fn import_media_file(
node.slug = slug;
node.title = info.title.or(node.title.clone());
node.visibility = iflags.visibility;
- node.poster = m.cover.or(node.poster.clone());
+ node.poster = m
+ .cover
+ .map(|a| AssetInner::Cache(a).ser())
+ .or(node.poster.clone());
node.description = tags
.remove("DESCRIPTION")
.or(tags.remove("SYNOPSIS"))
diff --git a/import/src/musicbrainz.rs b/import/src/musicbrainz.rs
index d02de69..612c4ba 100644
--- a/import/src/musicbrainz.rs
+++ b/import/src/musicbrainz.rs
@@ -7,7 +7,7 @@
use crate::USER_AGENT;
use anyhow::{Context, Result};
use bincode::{Decode, Encode};
-use jellybase::cache::async_cache_memory;
+use jellycache::async_cache_memory;
use log::info;
use reqwest::{
header::{HeaderMap, HeaderName, HeaderValue},
diff --git a/import/src/tmdb.rs b/import/src/tmdb.rs
index 45d7650..dff0e95 100644
--- a/import/src/tmdb.rs
+++ b/import/src/tmdb.rs
@@ -6,13 +6,11 @@
use crate::USER_AGENT;
use anyhow::{anyhow, bail, Context};
use bincode::{Decode, Encode};
-use jellybase::{
- cache::{async_cache_file, async_cache_memory, CachePath},
- common::{
- chrono::{format::Parsed, Utc},
- TmdbKind,
- },
+use jellybase::common::{
+ chrono::{format::Parsed, Utc},
+ TmdbKind,
};
+use jellycache::{async_cache_file, async_cache_memory, CachePath};
use log::info;
use reqwest::{
header::{HeaderMap, HeaderName, HeaderValue},
diff --git a/import/src/trakt.rs b/import/src/trakt.rs
index 86f2f42..434a3a0 100644
--- a/import/src/trakt.rs
+++ b/import/src/trakt.rs
@@ -6,10 +6,8 @@
use crate::USER_AGENT;
use anyhow::Context;
use bincode::{Decode, Encode};
-use jellybase::{
- cache::async_cache_memory,
- common::{Appearance, ObjectIds, PeopleGroup, Person, TraktKind},
-};
+use jellybase::common::{Appearance, ObjectIds, PeopleGroup, Person, TraktKind};
+use jellycache::async_cache_memory;
use log::info;
use reqwest::{
header::{HeaderMap, HeaderName, HeaderValue},
diff --git a/import/src/vgmdb.rs b/import/src/vgmdb.rs
index fb94f5f..6278aaa 100644
--- a/import/src/vgmdb.rs
+++ b/import/src/vgmdb.rs
@@ -6,7 +6,7 @@
use crate::USER_AGENT;
use anyhow::{Context, Result};
-use jellybase::cache::{async_cache_file, async_cache_memory, CachePath};
+use jellycache::{async_cache_file, async_cache_memory, CachePath};
use log::info;
use regex::Regex;
use reqwest::{
diff --git a/import/src/wikidata.rs b/import/src/wikidata.rs
index 9683950..1b7f06e 100644
--- a/import/src/wikidata.rs
+++ b/import/src/wikidata.rs
@@ -6,7 +6,7 @@
use crate::USER_AGENT;
use anyhow::{bail, Context, Result};
-use jellybase::cache::async_cache_memory;
+use jellycache::async_cache_memory;
use log::info;
use reqwest::{
header::{HeaderMap, HeaderName, HeaderValue},
diff --git a/import/src/wikimedia_commons.rs b/import/src/wikimedia_commons.rs
index faaef44..a5889fb 100644
--- a/import/src/wikimedia_commons.rs
+++ b/import/src/wikimedia_commons.rs
@@ -6,7 +6,7 @@
use crate::USER_AGENT;
use anyhow::{Context, Result};
-use jellybase::cache::{async_cache_file, CachePath};
+use jellycache::{async_cache_file, CachePath};
use reqwest::{
header::{HeaderMap, HeaderName, HeaderValue},
redirect::Policy,