Skip to content

Commit

Permalink
Upgrading methods to be compatible with 10.7. Tested this on 10.7.5
Browse files Browse the repository at this point in the history
  • Loading branch information
ankenyr committed May 6, 2021
1 parent 22f877d commit 5d76963
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Jellyfin.Controller" Version="10.6.0" />
<PackageReference Include="Jellyfin.Controller" Version="10.7.0" />
</ItemGroup>

<Target Name="PostBuild" AfterTargets="PostBuildEvent">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public Task Execute(CancellationToken cancellationToken, IProgress<double> progr

var toremove = plitems.Select(x => x.Id.ToString()).ToList();
RemoveFromPlaylist(playlist.Id.ToString(), toremove);
_playlistManager.AddToPlaylist(playlist.Id.ToString(), new_items.ToArray(), user.Id);
_playlistManager.AddToPlaylistAsync(playlist.Id, new_items.ToArray(), user.Id);
}
return Task.CompletedTask;
}
Expand All @@ -166,8 +166,7 @@ public void RemoveFromPlaylist(string playlistId, IEnumerable<string> entryIds)
playlist.LinkedChildren = children.Except(removals)
.Select(i => i.Item1)
.ToArray();

playlist.UpdateToRepository(ItemUpdateType.MetadataEdit, CancellationToken.None);
playlist.UpdateToRepositoryAsync(ItemUpdateType.MetadataEdit, CancellationToken.None);

_providerManager.QueueRefresh(
playlist.Id,
Expand Down

0 comments on commit 5d76963

Please sign in to comment.