fix: address copilot review comments on playlist season PR
- Gate PlaylistIndex numbering on having a real playlist id so Unsorted videos get IndexNumber = null instead of 0, matching the enum docs and config UI text. - Remove unused using Microsoft.Extensions.Logging from Video.cs. - Stop catching OperationCanceledException in PlaylistCache.RefreshAsync and GetPlaylistSortDateAsync so cancellation propagates instead of silently falling back to upload year grouping. Note: AI Generated Commit
This commit is contained in:
parent
6d1dcf5c54
commit
114bf981a4
|
|
@ -199,7 +199,7 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata.TubeArchivist
|
|||
{
|
||||
playlists = await taApi.GetPlaylists().ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception ex) when (ex is HttpRequestException or OperationCanceledException or JsonException)
|
||||
catch (Exception ex) when (ex is HttpRequestException or JsonException)
|
||||
{
|
||||
// Failure policy: keep whatever is cached and let callers fall back to upload year
|
||||
// grouping. A partial migration is worse than no migration.
|
||||
|
|
@ -443,7 +443,7 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata.TubeArchivist
|
|||
return video.Published;
|
||||
}
|
||||
}
|
||||
catch (Exception ex) when (ex is HttpRequestException or OperationCanceledException or JsonException)
|
||||
catch (Exception ex) when (ex is HttpRequestException or JsonException)
|
||||
{
|
||||
_logger.LogDebug(ex, "Could not resolve a sort date for playlist {PlaylistId}.", playlist.Id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ using MediaBrowser.Controller.Entities;
|
|||
using MediaBrowser.Controller.Entities.TV;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using MediaBrowser.Model.Providers;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Jellyfin.Plugin.TubeArchivistMetadata.TubeArchivist
|
||||
|
|
@ -153,7 +152,7 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata.TubeArchivist
|
|||
IndexNumber = Plugin.Instance?.Configuration?.EpisodeNumberingScheme switch
|
||||
{
|
||||
NumberingScheme.YYYYMMDD => (Published.Year * 10000) + (Published.Month * 100) + Published.Day,
|
||||
NumberingScheme.PlaylistIndex => playlistAssignment?.Index,
|
||||
NumberingScheme.PlaylistIndex => !string.IsNullOrEmpty(playlistAssignment?.PlaylistId) ? playlistAssignment?.Index : null,
|
||||
_ => null
|
||||
},
|
||||
SeriesName = Channel.Name,
|
||||
|
|
|
|||
Loading…
Reference in New Issue