From 0ce64a50b763d2b19f5ca254233370418f4b7658 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Thu, 6 Feb 2025 16:52:46 +0100 Subject: add json capability to most useful endpoints --- import/src/lib.rs | 1 + import/src/matroska.rs | 6 +++--- import/src/trakt.rs | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) (limited to 'import/src') diff --git a/import/src/lib.rs b/import/src/lib.rs index 0990ba1..7b19a61 100644 --- a/import/src/lib.rs +++ b/import/src/lib.rs @@ -410,6 +410,7 @@ fn import_media_file( NodeKind::Video }; node.title = Some(infojson.title); + node.subtitle = infojson.uploader; if let Some(desc) = infojson.description { node.description = Some(desc) } diff --git a/import/src/matroska.rs b/import/src/matroska.rs index 4694833..4ab1148 100644 --- a/import/src/matroska.rs +++ b/import/src/matroska.rs @@ -16,7 +16,7 @@ use jellybase::{ cache::{cache_file, cache_memory}, common::Asset, }; -use log::info; +use log::{info, warn}; use std::{ fs::File, io::{BufReader, ErrorKind, Read, Write}, @@ -41,7 +41,7 @@ pub(crate) fn matroska_metadata(path: &Path) -> Result Result { - eprintln!("unknown top-level element {id:x}"); + warn!("unknown top-level element {id:x}"); seg.consume()?; } } diff --git a/import/src/trakt.rs b/import/src/trakt.rs index 1daee77..52a5cb0 100644 --- a/import/src/trakt.rs +++ b/import/src/trakt.rs @@ -1,9 +1,9 @@ -use anyhow::Context; /* This file is part of jellything (https://codeberg.org/metamuffin/jellything) which is licensed under the GNU Affero General Public License (version 3); see /COPYING. Copyright (C) 2025 metamuffin */ +use anyhow::Context; use bincode::{Decode, Encode}; use jellybase::{ cache::async_cache_memory, -- cgit v1.2.3-70-g09d2