properly unlock trakt (#1035)

This commit is contained in:
Jason Dove
2022-11-23 18:34:55 -06:00
committed by GitHub
parent e388f81e1f
commit 47fbb2b1b7
17 changed files with 38 additions and 29 deletions
+1
View File
@@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Fix `Work-Ahead HLS Segmenter Limit` setting to properly limit number of channels that can work-ahead at once
- Include base path value in generated channel playlist (M3U) and channel guide (XMLTV) links
- Fix parsing song metadata from OGG audio files
- Properly unlock/re-enable trakt list operations after an operation is canceled
### Added
- Add (required) bit depth normalization option to ffmpeg profile
+3 -3
View File
@@ -240,7 +240,7 @@
var parameters = new DialogParameters { { "EntityType", "artist" }, { "EntityName", _artist.Name } };
var options = new DialogOptions { CloseButton = true, MaxWidth = MaxWidth.ExtraSmall };
IDialogReference dialog = _dialog.Show<AddToCollectionDialog>("Add To Collection", parameters, options);
IDialogReference dialog = await _dialog.ShowAsync<AddToCollectionDialog>("Add To Collection", parameters, options);
DialogResult result = await dialog.Result;
if (!result.Cancelled && result.Data is MediaCollectionViewModel collection)
{
@@ -254,7 +254,7 @@
var parameters = new DialogParameters { { "EntityType", "artist" }, { "EntityName", _artist.Name } };
var options = new DialogOptions { CloseButton = true, MaxWidth = MaxWidth.ExtraSmall };
IDialogReference dialog = _dialog.Show<AddToScheduleDialog>("Add To Schedule", parameters, options);
IDialogReference dialog = await _dialog.ShowAsync<AddToScheduleDialog>("Add To Schedule", parameters, options);
DialogResult result = await dialog.Result;
if (!result.Cancelled && result.Data is ProgramScheduleViewModel schedule)
{
@@ -268,7 +268,7 @@
var parameters = new DialogParameters { { "EntityType", "music video" }, { "EntityName", musicVideo.Title } };
var options = new DialogOptions { CloseButton = true, MaxWidth = MaxWidth.ExtraSmall };
IDialogReference dialog = _dialog.Show<AddToCollectionDialog>("Add To Collection", parameters, options);
IDialogReference dialog = await _dialog.ShowAsync<AddToCollectionDialog>("Add To Collection", parameters, options);
DialogResult result = await dialog.Result;
if (!result.Cancelled && result.Data is MediaCollectionViewModel collection)
{
+1 -1
View File
@@ -104,7 +104,7 @@
var parameters = new DialogParameters { { "EntityType", "channel" }, { "EntityName", channel.Name } };
var options = new DialogOptions { CloseButton = true, MaxWidth = MaxWidth.ExtraSmall };
IDialogReference dialog = _dialog.Show<DeleteDialog>("Delete Channel", parameters, options);
IDialogReference dialog = await _dialog.ShowAsync<DeleteDialog>("Delete Channel", parameters, options);
DialogResult result = await dialog.Result;
if (!result.Cancelled)
{
+3 -3
View File
@@ -165,7 +165,7 @@
var parameters = new DialogParameters { { "EntityType", "collection" }, { "EntityName", collection.Name } };
var options = new DialogOptions { CloseButton = true, MaxWidth = MaxWidth.ExtraSmall };
IDialogReference dialog = _dialog.Show<DeleteDialog>("Delete Collection", parameters, options);
IDialogReference dialog = await _dialog.ShowAsync<DeleteDialog>("Delete Collection", parameters, options);
DialogResult result = await dialog.Result;
if (!result.Cancelled)
{
@@ -179,7 +179,7 @@
var parameters = new DialogParameters { { "EntityType", "multi collection" }, { "EntityName", collection.Name } };
var options = new DialogOptions { CloseButton = true, MaxWidth = MaxWidth.ExtraSmall };
IDialogReference dialog = _dialog.Show<DeleteDialog>("Delete Multi Collection", parameters, options);
IDialogReference dialog = await _dialog.ShowAsync<DeleteDialog>("Delete Multi Collection", parameters, options);
DialogResult result = await dialog.Result;
if (!result.Cancelled)
{
@@ -193,7 +193,7 @@
var parameters = new DialogParameters { { "EntityType", "smart collection" }, { "EntityName", collection.Name } };
var options = new DialogOptions { CloseButton = true, MaxWidth = MaxWidth.ExtraSmall };
IDialogReference dialog = _dialog.Show<DeleteDialog>("Delete Smart Collection", parameters, options);
IDialogReference dialog = await _dialog.ShowAsync<DeleteDialog>("Delete Smart Collection", parameters, options);
DialogResult result = await dialog.Result;
if (!result.Cancelled)
{
+2 -2
View File
@@ -85,7 +85,7 @@
var parameters = new DialogParameters { { "EntityType", "ffmpeg profile" }, { "EntityName", ffmpegProfile.Name } };
var options = new DialogOptions { CloseButton = true, MaxWidth = MaxWidth.ExtraSmall };
IDialogReference dialog = _dialog.Show<DeleteDialog>("Delete FFmpeg Profile", parameters, options);
IDialogReference dialog = await _dialog.ShowAsync<DeleteDialog>("Delete FFmpeg Profile", parameters, options);
DialogResult result = await dialog.Result;
if (!result.Cancelled)
{
@@ -99,7 +99,7 @@
var parameters = new DialogParameters { { "FFmpegProfileId", ffmpegProfile.Id } };
var options = new DialogOptions { CloseButton = true, MaxWidth = MaxWidth.ExtraSmall };
IDialogReference dialog = _dialog.Show<CopyFFmpegProfileDialog>("Copy FFmpeg Profile", parameters, options);
IDialogReference dialog = await _dialog.ShowAsync<CopyFFmpegProfileDialog>("Copy FFmpeg Profile", parameters, options);
DialogResult dialogResult = await dialog.Result;
if (!dialogResult.Cancelled && dialogResult.Data is FFmpegProfileViewModel data)
{
+1 -1
View File
@@ -87,7 +87,7 @@
var parameters = new DialogParameters { { "EntityType", "filler preset" }, { "EntityName", fillerPreset.Name } };
var options = new DialogOptions { CloseButton = true, MaxWidth = MaxWidth.ExtraSmall };
IDialogReference dialog = _dialog.Show<DeleteDialog>("Delete Filler Preset", parameters, options);
IDialogReference dialog = await _dialog.ShowAsync<DeleteDialog>("Delete Filler Preset", parameters, options);
DialogResult result = await dialog.Result;
if (!result.Cancelled)
{
+1 -1
View File
@@ -76,7 +76,7 @@
};
var options = new DialogOptions { CloseButton = true, MaxWidth = MaxWidth.ExtraSmall };
IDialogReference dialog = _dialog.Show<DeleteDialog>("Delete Library", parameters, options);
IDialogReference dialog = await _dialog.ShowAsync<DeleteDialog>("Delete Library", parameters, options);
DialogResult result = await dialog.Result;
if (!result.Cancelled)
{
+2 -2
View File
@@ -141,7 +141,7 @@
var parameters = new DialogParameters { { "MediaKind", _model.MediaKind }, { "SourceLibraryId", Id } };
var options = new DialogOptions { CloseButton = true, MaxWidth = MaxWidth.ExtraSmall };
IDialogReference dialog = _dialog.Show<MoveLocalLibraryPathDialog>("Move Local Library Path", parameters, options);
IDialogReference dialog = await _dialog.ShowAsync<MoveLocalLibraryPathDialog>("Move Local Library Path", parameters, options);
DialogResult result = await dialog.Result;
if (!result.Cancelled && result.Data is LocalLibraryViewModel library)
{
@@ -175,7 +175,7 @@
};
var options = new DialogOptions { CloseButton = true, MaxWidth = MaxWidth.ExtraSmall };
IDialogReference dialog = _dialog.Show<DeleteDialog>("Delete Library Path", parameters, options);
IDialogReference dialog = await _dialog.ShowAsync<DeleteDialog>("Delete Library Path", parameters, options);
DialogResult result = await dialog.Result;
if (!result.Cancelled)
{
+1 -1
View File
@@ -244,7 +244,7 @@
var parameters = new DialogParameters { { "EntityType", "movie" }, { "EntityName", _movie.Title } };
var options = new DialogOptions { CloseButton = true, MaxWidth = MaxWidth.ExtraSmall };
IDialogReference dialog = _dialog.Show<AddToCollectionDialog>("Add To Collection", parameters, options);
IDialogReference dialog = await _dialog.ShowAsync<AddToCollectionDialog>("Add To Collection", parameters, options);
DialogResult result = await dialog.Result;
if (!result.Cancelled && result.Data is MediaCollectionViewModel collection)
{
+2 -2
View File
@@ -150,7 +150,7 @@
var parameters = new DialogParameters { { "EntityType", "playout" }, { "EntityName", $"{playout.ScheduleName} on {playout.ChannelNumber} - {playout.ChannelName}" } };
var options = new DialogOptions { CloseButton = true, MaxWidth = MaxWidth.ExtraSmall };
IDialogReference dialog = _dialog.Show<DeleteDialog>("Delete Playout", parameters, options);
IDialogReference dialog = await _dialog.ShowAsync<DeleteDialog>("Delete Playout", parameters, options);
DialogResult result = await dialog.Result;
if (!result.Cancelled)
{
@@ -184,7 +184,7 @@
};
var options = new DialogOptions { CloseButton = true, MaxWidth = MaxWidth.ExtraSmall };
IDialogReference dialog = _dialog.Show<SchedulePlayoutReset>("Schedule Playout Reset", parameters, options);
IDialogReference dialog = await _dialog.ShowAsync<SchedulePlayoutReset>("Schedule Playout Reset", parameters, options);
await dialog.Result;
await _table.ReloadServerData();
+1 -1
View File
@@ -104,7 +104,7 @@
private async Task SignOutOfPlex()
{
var options = new DialogOptions { CloseButton = true, MaxWidth = MaxWidth.Small };
IDialogReference dialog = _dialog.Show<SignOutOfPlexDialog>("Sign out of Plex", options);
IDialogReference dialog = await _dialog.ShowAsync<SignOutOfPlexDialog>("Sign out of Plex", options);
DialogResult result = await dialog.Result;
if (!result.Cancelled)
{
+1 -1
View File
@@ -121,7 +121,7 @@
var parameters = new DialogParameters { { "EntityType", "schedule" }, { "EntityName", programSchedule.Name } };
var options = new DialogOptions { CloseButton = true, MaxWidth = MaxWidth.ExtraSmall };
IDialogReference dialog = _dialog.Show<DeleteDialog>("Delete Schedule", parameters, options);
IDialogReference dialog = await _dialog.ShowAsync<DeleteDialog>("Delete Schedule", parameters, options);
DialogResult result = await dialog.Result;
if (!result.Cancelled)
{
+3 -3
View File
@@ -214,7 +214,7 @@
var parameters = new DialogParameters { { "EntityType", "season" }, { "EntityName", $"{_season.Title} - {_season.Name}" } };
var options = new DialogOptions { CloseButton = true, MaxWidth = MaxWidth.ExtraSmall };
IDialogReference dialog = _dialog.Show<AddToCollectionDialog>("Add To Collection", parameters, options);
IDialogReference dialog = await _dialog.ShowAsync<AddToCollectionDialog>("Add To Collection", parameters, options);
DialogResult result = await dialog.Result;
if (!result.Cancelled && result.Data is MediaCollectionViewModel collection)
{
@@ -229,7 +229,7 @@
var parameters = new DialogParameters { { "EntityType", "season" }, { "EntityName", $"{_season.Title} - {_season.Name}" } };
var options = new DialogOptions { CloseButton = true, MaxWidth = MaxWidth.ExtraSmall };
IDialogReference dialog = _dialog.Show<AddToScheduleDialog>("Add To Schedule", parameters, options);
IDialogReference dialog = await _dialog.ShowAsync<AddToScheduleDialog>("Add To Schedule", parameters, options);
DialogResult result = await dialog.Result;
if (!result.Cancelled && result.Data is ProgramScheduleViewModel schedule)
{
@@ -243,7 +243,7 @@
var parameters = new DialogParameters { { "EntityType", "episode" }, { "EntityName", episode.Title } };
var options = new DialogOptions { CloseButton = true, MaxWidth = MaxWidth.ExtraSmall };
IDialogReference dialog = _dialog.Show<AddToCollectionDialog>("Add To Collection", parameters, options);
IDialogReference dialog = await _dialog.ShowAsync<AddToCollectionDialog>("Add To Collection", parameters, options);
DialogResult result = await dialog.Result;
if (!result.Cancelled && result.Data is MediaCollectionViewModel collection)
{
+3 -3
View File
@@ -210,7 +210,7 @@
var parameters = new DialogParameters { { "EntityType", "show" }, { "EntityName", _show.Title } };
var options = new DialogOptions { CloseButton = true, MaxWidth = MaxWidth.ExtraSmall };
IDialogReference dialog = _dialog.Show<AddToCollectionDialog>("Add To Collection", parameters, options);
IDialogReference dialog = await _dialog.ShowAsync<AddToCollectionDialog>("Add To Collection", parameters, options);
DialogResult result = await dialog.Result;
if (!result.Cancelled && result.Data is MediaCollectionViewModel collection)
{
@@ -224,7 +224,7 @@
var parameters = new DialogParameters { { "EntityType", "show" }, { "EntityName", _show.Title } };
var options = new DialogOptions { CloseButton = true, MaxWidth = MaxWidth.ExtraSmall };
IDialogReference dialog = _dialog.Show<AddToScheduleDialog>("Add To Schedule", parameters, options);
IDialogReference dialog = await _dialog.ShowAsync<AddToScheduleDialog>("Add To Schedule", parameters, options);
DialogResult result = await dialog.Result;
if (!result.Cancelled && result.Data is ProgramScheduleViewModel schedule)
{
@@ -240,7 +240,7 @@
var parameters = new DialogParameters { { "EntityType", "season" }, { "EntityName", season.Title } };
var options = new DialogOptions { CloseButton = true, MaxWidth = MaxWidth.ExtraSmall };
IDialogReference dialog = _dialog.Show<AddToCollectionDialog>("Add To Collection", parameters, options);
IDialogReference dialog = await _dialog.ShowAsync<AddToCollectionDialog>("Add To Collection", parameters, options);
DialogResult result = await dialog.Result;
if (!result.Cancelled && result.Data is MediaCollectionViewModel collection)
{
+10 -2
View File
@@ -115,12 +115,16 @@
var parameters = new DialogParameters { { "EntityType", "Trakt List" }, { "EntityName", traktList.Name } };
var options = new DialogOptions { CloseButton = true, MaxWidth = MaxWidth.ExtraSmall };
IDialogReference dialog = _dialog.Show<DeleteDialog>("Delete Trakt List", parameters, options);
IDialogReference dialog = await _dialog.ShowAsync<DeleteDialog>("Delete Trakt List", parameters, options);
DialogResult result = await dialog.Result;
if (!result.Cancelled)
{
await _workerChannel.WriteAsync(new DeleteTraktList(traktList.Id), _cts.Token);
}
else
{
_locker.UnlockTrakt();
}
}
}
@@ -137,12 +141,16 @@
if (_locker.LockTrakt())
{
var options = new DialogOptions { CloseButton = true, MaxWidth = MaxWidth.Small };
IDialogReference dialog = _dialog.Show<AddTraktListDialog>("Add Trakt List", options);
IDialogReference dialog = await _dialog.ShowAsync<AddTraktListDialog>("Add Trakt List", options);
DialogResult result = await dialog.Result;
if (!result.Cancelled && result.Data is string url)
{
await _workerChannel.WriteAsync(new AddTraktList(url), _cts.Token);
}
else
{
_locker.UnlockTrakt();
}
}
}
+2 -2
View File
@@ -91,7 +91,7 @@
var parameters = new DialogParameters { { "EntityType", "watermark" }, { "EntityName", watermark.Name } };
var options = new DialogOptions { CloseButton = true, MaxWidth = MaxWidth.ExtraSmall };
IDialogReference dialog = _dialog.Show<DeleteDialog>("Delete Watermark", parameters, options);
IDialogReference dialog = await _dialog.ShowAsync<DeleteDialog>("Delete Watermark", parameters, options);
DialogResult result = await dialog.Result;
if (!result.Cancelled)
{
@@ -105,7 +105,7 @@
var parameters = new DialogParameters { { "WatermarkId", watermark.Id } };
var options = new DialogOptions { CloseButton = true, MaxWidth = MaxWidth.ExtraSmall };
IDialogReference dialog = _dialog.Show<CopyWatermarkDialog>("Copy Watermark", parameters, options);
IDialogReference dialog = await _dialog.ShowAsync<CopyWatermarkDialog>("Copy Watermark", parameters, options);
DialogResult dialogResult = await dialog.Result;
if (!dialogResult.Cancelled && dialogResult.Data is WatermarkViewModel data)
{
+1 -1
View File
@@ -119,7 +119,7 @@
{
var parameters = new DialogParameters { { "Name", Name } };
var options = new DialogOptions { CloseButton = true, MaxWidth = MaxWidth.Small };
IDialogReference dialog = _dialog.Show<DisconnectRemoteMediaSourceDialog>($"Disconnect {Name}", parameters, options);
IDialogReference dialog = await _dialog.ShowAsync<DisconnectRemoteMediaSourceDialog>($"Disconnect {Name}", parameters, options);
DialogResult result = await dialog.Result;
if (!result.Cancelled)
{