diff options
author | metamuffin <metamuffin@disroot.org> | 2023-08-04 12:37:07 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2023-08-04 12:37:07 +0200 |
commit | 9bef55396cc9a9a4d83970a26bf56f07d5f0377d (patch) | |
tree | 8709da46cd02df8c97338a84fafd3183837b3fb3 /import/src/main.rs | |
parent | 016b8fec6ed9908e11e72ec7b9930e5908d58a02 (diff) | |
download | jellything-9bef55396cc9a9a4d83970a26bf56f07d5f0377d.tar jellything-9bef55396cc9a9a4d83970a26bf56f07d5f0377d.tar.bz2 jellything-9bef55396cc9a9a4d83970a26bf56f07d5f0377d.tar.zst |
infojson schema
Diffstat (limited to 'import/src/main.rs')
-rw-r--r-- | import/src/main.rs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/import/src/main.rs b/import/src/main.rs index d40916a..bf5c49c 100644 --- a/import/src/main.rs +++ b/import/src/main.rs @@ -4,10 +4,13 @@ Copyright (C) 2023 metamuffin <metamuffin.org> */ pub mod tmdb; +pub mod infojson; use anyhow::Context; use clap::{Parser, Subcommand}; -use jellycommon::{AssetLocation, MediaInfo, MediaSource, Node, NodeKind, NodePrivate, NodePublic}; +use jellycommon::{ + AssetLocation, LocalTrack, MediaInfo, MediaSource, Node, NodeKind, NodePrivate, NodePublic, +}; use jellymatroska::read::EbmlReader; use jellyremuxer::import::{import_metadata, seek_index}; use log::{info, warn}; @@ -214,7 +217,15 @@ fn main() -> anyhow::Result<()> { backdrop: backdrop.clone().map(AssetLocation::Library), poster: poster.clone().map(AssetLocation::Library), source: file_meta.as_ref().map(|m| MediaSource::Local { - tracks: m.track_sources.clone(), + tracks: m + .track_sources + .clone() + .into_iter() + .map(|t| LocalTrack { + path: source_path_e.clone().unwrap(), + ..t + }) + .collect(), }), }, public: NodePublic { |