Enhance movie import process and metadata handling
Refactored the movie import functionality to ensure that the title from the source is used for the show name, while the file name is retained as the original title. Improved the handling of metadata during the import process, allowing for better integration of original titles from various sources. Updated related classes and methods to streamline the import workflow and enhance user experience. Added tests to verify the correct assignment of titles and original names during the import process. Updated documentation to reflect these changes.
This commit is contained in:
1 parent
d859a9894c
commit
d0bc0465e7
21 files changed
+926
-698
No files matched your search
@@ -63,7 +63,8 @@ public sealed class TmdbMetadataProvider(
|
||||
YearFrom(GetString(item, DateField(movie))),
|
||||
GetString(item, "overview"),
|
||||
PosterUrl(GetString(item, "poster_path")),
|
||||
movie ? ShowKind.Single : ShowKind.Series
|
||||
movie ? ShowKind.Single : ShowKind.Series,
|
||||
GetString(item, OriginalTitleField(movie))
|
||||
)
|
||||
);
|
||||
}
|
||||
@@ -83,6 +84,9 @@ public sealed class TmdbMetadataProvider(
|
||||
|
||||
private static string DateField(bool movie) => movie ? "release_date" : "first_air_date";
|
||||
|
||||
private static string OriginalTitleField(bool movie) =>
|
||||
movie ? "original_title" : "original_name";
|
||||
|
||||
public async Task<ShowMetadata?> GetShowAsync(
|
||||
string externalId,
|
||||
ShowKind kind,
|
||||
@@ -108,7 +112,8 @@ public sealed class TmdbMetadataProvider(
|
||||
PosterUrl(GetString(root, "poster_path")),
|
||||
GenresFrom(root),
|
||||
movie ? MovieCertification(root) : TvCertification(root),
|
||||
FranchiseFrom(root)
|
||||
FranchiseFrom(root),
|
||||
GetString(root, OriginalTitleField(movie))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user