diff --git a/crates/models/media/src/lib.rs b/crates/models/media/src/lib.rs index 3d58c3d5b0..cad9af8fda 100644 --- a/crates/models/media/src/lib.rs +++ b/crates/models/media/src/lib.rs @@ -929,20 +929,6 @@ pub struct DeployMalImportInput { pub manga_path: Option, } -#[derive(Debug, InputObject, Serialize, Deserialize, Clone)] -pub struct StrongAppImportMapping { - pub source_name: String, - pub target_name: String, - pub multiplier: Option, -} - -#[derive(Debug, InputObject, Serialize, Deserialize, Clone)] -pub struct DeployStrongAppImportInput { - // The path to the CSV file in the local file system. - pub export_path: String, - pub mapping: Vec, -} - #[derive(Debug, InputObject, Serialize, Deserialize, Clone)] pub struct DeployIgdbImportInput { // The path to the CSV file in the local file system. @@ -977,7 +963,7 @@ pub struct DeployImportJobInput { pub trakt: Option, pub movary: Option, pub generic_json: Option, - pub strong_app: Option, + pub strong_app: Option, pub url_and_key: Option, pub generic_csv: Option, pub jellyfin: Option, diff --git a/crates/services/importer/src/strong_app.rs b/crates/services/importer/src/strong_app.rs index 5b76492a06..3e90f3fb07 100644 --- a/crates/services/importer/src/strong_app.rs +++ b/crates/services/importer/src/strong_app.rs @@ -12,7 +12,7 @@ use fitness_models::{ }; use importer_models::{ImportFailStep, ImportFailedItem}; use itertools::Itertools; -use media_models::DeployStrongAppImportInput; +use media_models::DeployGenericCsvImportInput; use rust_decimal::Decimal; use rust_decimal_macros::dec; use sea_orm::{ColumnTrait, EntityTrait, QueryFilter}; @@ -48,10 +48,10 @@ struct Entry { } pub async fn import( - input: DeployStrongAppImportInput, + input: DeployGenericCsvImportInput, ss: &Arc, ) -> Result { - let file_string = fs::read_to_string(&input.export_path)?; + let file_string = fs::read_to_string(&input.csv_path)?; // DEV: Delimiter is `;` on android and `,` on iOS, so we determine it by reading the first line let data = file_string.clone(); let first_line = data.lines().next().unwrap(); diff --git a/libs/generated/src/graphql/backend/graphql.ts b/libs/generated/src/graphql/backend/graphql.ts index a3f9705196..77238c567f 100644 --- a/libs/generated/src/graphql/backend/graphql.ts +++ b/libs/generated/src/graphql/backend/graphql.ts @@ -402,7 +402,7 @@ export type DeployImportJobInput = { mal?: InputMaybe; movary?: InputMaybe; source: ImportSource; - strongApp?: InputMaybe; + strongApp?: InputMaybe; trakt?: InputMaybe; urlAndKey?: InputMaybe; }; @@ -424,11 +424,6 @@ export type DeployMovaryImportInput = { watchlist: Scalars['String']['input']; }; -export type DeployStrongAppImportInput = { - exportPath: Scalars['String']['input']; - mapping: Array; -}; - export type DeployTraktImportInput = { username: Scalars['String']['input']; }; @@ -2125,12 +2120,6 @@ export type StringIdObject = { id: Scalars['String']['output']; }; -export type StrongAppImportMapping = { - multiplier?: InputMaybe; - sourceName: Scalars['String']['input']; - targetName: Scalars['String']['input']; -}; - export type UpdateComplexJsonInput = { /** Dot delimited path to the property that needs to be changed. */ property: Scalars['String']['input']; diff --git a/libs/generated/src/graphql/backend/types.generated.ts b/libs/generated/src/graphql/backend/types.generated.ts index 9e0c63c433..4ede218ed5 100644 --- a/libs/generated/src/graphql/backend/types.generated.ts +++ b/libs/generated/src/graphql/backend/types.generated.ts @@ -389,7 +389,7 @@ export type DeployImportJobInput = { mal?: InputMaybe; movary?: InputMaybe; source: ImportSource; - strongApp?: InputMaybe; + strongApp?: InputMaybe; trakt?: InputMaybe; urlAndKey?: InputMaybe; }; @@ -411,11 +411,6 @@ export type DeployMovaryImportInput = { watchlist: Scalars['String']['input']; }; -export type DeployStrongAppImportInput = { - exportPath: Scalars['String']['input']; - mapping: Array; -}; - export type DeployTraktImportInput = { username: Scalars['String']['input']; }; @@ -2191,12 +2186,6 @@ export type StringIdObject = { id: Scalars['String']['output']; }; -export type StrongAppImportMapping = { - multiplier?: InputMaybe; - sourceName: Scalars['String']['input']; - targetName: Scalars['String']['input']; -}; - export type UpdateComplexJsonInput = { /** Dot delimited path to the property that needs to be changed. */ property: Scalars['String']['input'];