Skip to content

Commit

Permalink
Only merge when new versions available
Browse files Browse the repository at this point in the history
  • Loading branch information
danieladov committed Jan 5, 2025
1 parent 582d4c8 commit cb3b3f5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>true</IsPackable>
<AssemblyVersion>10.9.1.0</AssemblyVersion>
<FileVersion>10.9.1.0</FileVersion>
<AssemblyVersion>10.10.0.1</AssemblyVersion>
<FileVersion>10.10.0.1</FileVersion>
<Authors />
<Company />
</PropertyGroup>
Expand All @@ -16,8 +16,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Jellyfin.Common" Version="10.9.1" />
<PackageReference Include="Jellyfin.Controller" Version="10.9.1" />
<PackageReference Include="Jellyfin.Common" Version="10.10.0" />
<PackageReference Include="Jellyfin.Controller" Version="10.10.0" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 3 additions & 1 deletion Jellyfin.Plugin.MergeVersions/MergeVersionsManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ public void MergeMovies(IProgress<double> progress)

var duplicateMovies = GetMoviesFromLibrary()
.GroupBy(x => x.ProviderIds["Tmdb"])
.Where(x => x.Count() > 1)
.Where(group => group.Count() > 1 &&
group.Any(movie => movie.PrimaryVersionId == null &&
!movie.LinkedAlternateVersions.Any()))
.ToList();

var current = 0;
Expand Down

0 comments on commit cb3b3f5

Please sign in to comment.