fix updating jellyfin movies (#1587)
This commit is contained in:
+3
-1
@@ -9,7 +9,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
|
||||
### Fixed
|
||||
- Fix antiforgery error caused by reusing existing browser tabs across docker container restarts
|
||||
- Data protection keys will now be persisted under ErsatzTV's config folder instead of being recreated at startup
|
||||
- Data protection keys will now be persisted under ErsatzTV's config folder instead of being recreated at startup
|
||||
- Fix bug updating/replacing Jellyfin movies
|
||||
- A deep scan can be used to fix all movies, otherwise any future updates made to JF movies will correctly sync to ETV
|
||||
|
||||
### Changed
|
||||
- Pass through `access_token` query param from `Channels` page url to streaming endpoints
|
||||
|
||||
@@ -63,17 +63,20 @@ public class GetMediaItemInfoHandler : IRequestHandler<GetMediaItemInfo, Either<
|
||||
_ => null
|
||||
};
|
||||
|
||||
List<Subtitle> subtitles = mediaItem switch
|
||||
{
|
||||
Movie m => m.MovieMetadata.Map(mm => mm.Subtitles).Flatten().ToList(),
|
||||
Episode e => e.EpisodeMetadata.Map(mm => mm.Subtitles).Flatten().ToList(),
|
||||
_ => new List<Subtitle>()
|
||||
};
|
||||
|
||||
var allStreams = version.Streams.OrderBy(s => s.Index).Map(Project).ToList();
|
||||
|
||||
// include external subtitles from local libraries
|
||||
allStreams.AddRange(subtitles.Filter(s => s.SubtitleKind is SubtitleKind.Sidecar).Map(ProjectToStream));
|
||||
if (mediaItem.LibraryPath.Library is LocalLibrary)
|
||||
{
|
||||
List<Subtitle> subtitles = mediaItem switch
|
||||
{
|
||||
Movie m => m.MovieMetadata.Map(mm => mm.Subtitles).Flatten().ToList(),
|
||||
Episode e => e.EpisodeMetadata.Map(mm => mm.Subtitles).Flatten().ToList(),
|
||||
_ => new List<Subtitle>()
|
||||
};
|
||||
|
||||
allStreams.AddRange(subtitles.Filter(s => s.SubtitleKind is SubtitleKind.Sidecar).Map(ProjectToStream));
|
||||
}
|
||||
|
||||
var allChapters = (version.Chapters ?? []).OrderBy(c => c.StartTime).Map(Project).ToList();
|
||||
|
||||
|
||||
@@ -195,8 +195,6 @@ public class JellyfinMovieRepository : IJellyfinMovieRepository
|
||||
incoming.LibraryPath = existing.LibraryPath;
|
||||
incoming.Id = existing.Id;
|
||||
|
||||
existing.Etag = incoming.Etag;
|
||||
|
||||
// metadata
|
||||
MovieMetadata metadata = existing.MovieMetadata.Head();
|
||||
MovieMetadata incomingMetadata = incoming.MovieMetadata.Head();
|
||||
|
||||
Reference in New Issue
Block a user