Skip to content

Commit

Permalink
chore(backend): display the type of media being imported
Browse files Browse the repository at this point in the history
  • Loading branch information
IgnisDa committed Nov 30, 2024
1 parent 09b02ba commit 30d9282
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/models/dependent/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ rust_decimal = { workspace = true }
schematic = { workspace = true }
serde = { workspace = true }
serde_with = { workspace = true }
strum = { workspace = true }
3 changes: 2 additions & 1 deletion crates/models/dependent/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ use rust_decimal::Decimal;
use schematic::Schematic;
use serde::{Deserialize, Serialize};
use serde_with::skip_serializing_none;
use strum::Display;

#[derive(Serialize, Deserialize, Debug, SimpleObject, Clone)]
#[graphql(concrete(name = "ExerciseListResults", params(fitness_models::ExerciseListItem)))]
Expand Down Expand Up @@ -206,7 +207,7 @@ pub struct UserMetadataDetails {
pub has_interacted: bool,
}

#[derive(Debug, Default)]
#[derive(Debug, Default, Display)]
pub enum ImportCompletedItem {
#[default]
Empty,
Expand Down
8 changes: 7 additions & 1 deletion crates/utils/dependent/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2005,7 +2005,13 @@ pub async fn process_import(
let total = import.completed.len();

for (idx, item) in import.completed.into_iter().enumerate() {
ryot_log!(debug, "Processing item {}/{total}", idx + 1);
ryot_log!(
debug,
"Processing item ({}) {}/{}",
item.to_string(),
idx + 1,
total,
);
match item {
ImportCompletedItem::Empty => {}
ImportCompletedItem::Collection(col_details) => {
Expand Down

0 comments on commit 30d9282

Please sign in to comment.