aboutsummaryrefslogtreecommitdiff
path: root/import/src/lib.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-04-27 20:00:44 +0200
committermetamuffin <metamuffin@disroot.org>2025-04-27 20:00:44 +0200
commit335ba978dbaf203f3603a815147fd75dbf205723 (patch)
tree57f7959b6f81ad469ddd3062f2e43f88670a08e4 /import/src/lib.rs
parent11a585b3dbe620dcc8772e713b22f1d9ba80d598 (diff)
downloadjellything-335ba978dbaf203f3603a815147fd75dbf205723.tar
jellything-335ba978dbaf203f3603a815147fd75dbf205723.tar.bz2
jellything-335ba978dbaf203f3603a815147fd75dbf205723.tar.zst
move cache to own crate
Diffstat (limited to 'import/src/lib.rs')
-rw-r--r--import/src/lib.rs7
1 files changed, 5 insertions, 2 deletions
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"))