Browse Source

properly unlock trakt (#1035)

pull/1036/head
Jason Dove 4 years ago committed by GitHub
parent
commit
47fbb2b1b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 6
      ErsatzTV/Pages/Artist.razor
  3. 2
      ErsatzTV/Pages/Channels.razor
  4. 6
      ErsatzTV/Pages/Collections.razor
  5. 4
      ErsatzTV/Pages/FFmpeg.razor
  6. 2
      ErsatzTV/Pages/FillerPresets.razor
  7. 2
      ErsatzTV/Pages/LocalLibraries.razor
  8. 4
      ErsatzTV/Pages/LocalLibraryEditor.razor
  9. 2
      ErsatzTV/Pages/Movie.razor
  10. 4
      ErsatzTV/Pages/Playouts.razor
  11. 2
      ErsatzTV/Pages/PlexMediaSources.razor
  12. 2
      ErsatzTV/Pages/Schedules.razor
  13. 6
      ErsatzTV/Pages/TelevisionEpisodeList.razor
  14. 6
      ErsatzTV/Pages/TelevisionSeasonList.razor
  15. 12
      ErsatzTV/Pages/TraktLists.razor
  16. 4
      ErsatzTV/Pages/Watermarks.razor
  17. 2
      ErsatzTV/Shared/RemoteMediaSources.razor

1
CHANGELOG.md

@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). @@ -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

6
ErsatzTV/Pages/Artist.razor

@ -240,7 +240,7 @@ @@ -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 @@ @@ -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 @@ @@ -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)
{

2
ErsatzTV/Pages/Channels.razor

@ -104,7 +104,7 @@ @@ -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)
{

6
ErsatzTV/Pages/Collections.razor

@ -165,7 +165,7 @@ @@ -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 @@ @@ -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 @@ @@ -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)
{

4
ErsatzTV/Pages/FFmpeg.razor

@ -85,7 +85,7 @@ @@ -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 @@ @@ -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)
{

2
ErsatzTV/Pages/FillerPresets.razor

@ -87,7 +87,7 @@ @@ -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)
{

2
ErsatzTV/Pages/LocalLibraries.razor

@ -76,7 +76,7 @@ @@ -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)
{

4
ErsatzTV/Pages/LocalLibraryEditor.razor

@ -141,7 +141,7 @@ @@ -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 @@ @@ -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)
{

2
ErsatzTV/Pages/Movie.razor

@ -244,7 +244,7 @@ @@ -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)
{

4
ErsatzTV/Pages/Playouts.razor

@ -150,7 +150,7 @@ @@ -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 @@ @@ -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();

2
ErsatzTV/Pages/PlexMediaSources.razor

@ -104,7 +104,7 @@ @@ -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)
{

2
ErsatzTV/Pages/Schedules.razor

@ -121,7 +121,7 @@ @@ -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)
{

6
ErsatzTV/Pages/TelevisionEpisodeList.razor

@ -214,7 +214,7 @@ @@ -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 @@ @@ -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 @@ @@ -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)
{

6
ErsatzTV/Pages/TelevisionSeasonList.razor

@ -210,7 +210,7 @@ @@ -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 @@ @@ -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 @@ @@ -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)
{

12
ErsatzTV/Pages/TraktLists.razor

@ -115,12 +115,16 @@ @@ -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 @@ @@ -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();
}
}
}

4
ErsatzTV/Pages/Watermarks.razor

@ -91,7 +91,7 @@ @@ -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 @@ @@ -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)
{

2
ErsatzTV/Shared/RemoteMediaSources.razor

@ -119,7 +119,7 @@ @@ -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)
{

Loading…
Cancel
Save