mirror of
https://github.com/rmcrackan/Libation.git
synced 2025-12-23 14:07:56 -05:00
Merge pull request #1501 from Mbucari/master
Add support for decoding Windows Arm64 and AC-4 audio files
This commit is contained in:
13
.github/workflows/build-windows.yml
vendored
13
.github/workflows/build-windows.yml
vendored
@@ -21,16 +21,21 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: "Windows-${{ matrix.release_name }}-x64"
|
||||
name: "Windows-${{ matrix.release_name }}-${{ matrix.architecture }} (${{ matrix.ui }})"
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
matrix:
|
||||
ui: [Avalonia]
|
||||
architecture: [x64]
|
||||
release_name: [chardonnay]
|
||||
include:
|
||||
- ui: WinForms
|
||||
- architecture: x64
|
||||
ui: WinForms
|
||||
release_name: classic
|
||||
prefix: Classic-
|
||||
- architecture: arm64
|
||||
ui: Avalonia
|
||||
release_name: chardonnay
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
@@ -48,7 +53,7 @@ jobs:
|
||||
working-directory: ./Source
|
||||
run: |
|
||||
$PUBLISH_ARGS=@(
|
||||
"--runtime", "win-x64",
|
||||
"--runtime", "win-${{ matrix.architecture }}",
|
||||
"--configuration", "Release",
|
||||
"--output", "../bin",
|
||||
"-p:PublishProtocol=FileSystem",
|
||||
@@ -70,7 +75,7 @@ jobs:
|
||||
"WindowsConfigApp.deps.json")
|
||||
|
||||
foreach ($file in $delfiles){ if (test-path $file){ Remove-Item $file } }
|
||||
$artifact="${{ matrix.prefix }}Libation.${{ inputs.libation-version }}-windows-${{ matrix.release_name }}-x64.zip"
|
||||
$artifact="${{ matrix.prefix }}Libation.${{ inputs.libation-version }}-windows-${{ matrix.release_name }}-${{ matrix.architecture }}.zip"
|
||||
"artifact=$artifact" >> $env:GITHUB_OUTPUT
|
||||
Compress-Archive -Path * -DestinationPath "$artifact"
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AAXClean.Codecs" Version="2.1.1.1" />
|
||||
<PackageReference Include="AAXClean.Codecs" Version="2.1.2.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -125,7 +125,7 @@ public partial class DownloadOptions
|
||||
//try to request a widevine content license using the user's audio settings
|
||||
var aacCodecChoice = config.Request_xHE_AAC ? Codecs.xHE_AAC : Codecs.AAC_LC;
|
||||
//Always use the ec+3 codec if converting to mp3
|
||||
var spatialCodecChoice = config.SpatialAudioCodec is Configuration.SpatialCodec.AC_4 && !config.DecryptToLossy ? Codecs.AC_4 : Codecs.EC_3;
|
||||
var spatialCodecChoice = config.SpatialAudioCodec is Configuration.SpatialCodec.AC_4 ? Codecs.AC_4 : Codecs.EC_3;
|
||||
|
||||
var contentLic
|
||||
= await api.GetDownloadLicenseAsync(
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace FileLiberator
|
||||
//If DrmType is not Adrm or Widevine, the delivered file is an unencrypted mp3.
|
||||
OutputFormat
|
||||
= licInfo.DrmType is not AudibleApi.Common.DrmType.Adrm and not AudibleApi.Common.DrmType.Widevine ||
|
||||
(config.AllowLibationFixup && config.DecryptToLossy && licInfo.ContentMetadata.ContentReference.Codec != AudibleApi.Codecs.AC_4)
|
||||
(config.AllowLibationFixup && config.DecryptToLossy)
|
||||
? OutputFormat.Mp3
|
||||
: OutputFormat.M4b;
|
||||
|
||||
|
||||
@@ -92,7 +92,6 @@
|
||||
Margin="5,0,0,0"
|
||||
Grid.Column="1"
|
||||
VerticalAlignment="Center"
|
||||
SelectionChanged="SpatialCodec_SelectionChanged"
|
||||
ItemsSource="{CompiledBinding SpatialAudioCodecs}"
|
||||
SelectedItem="{CompiledBinding SpatialAudioCodec}"/>
|
||||
</Grid>
|
||||
|
||||
@@ -23,15 +23,6 @@ namespace LibationAvalonia.Controls.Settings
|
||||
}
|
||||
}
|
||||
|
||||
private void SpatialCodec_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
if (_viewModel.SpatialAudioCodec.Value is Configuration.SpatialCodec.AC_4 && _viewModel.DecryptToLossy)
|
||||
{
|
||||
_viewModel.SpatialAudioCodec = _viewModel.SpatialAudioCodecs[0];
|
||||
_viewModel.RaisePropertyChanged(nameof(AudioSettingsVM.SpatialAudioCodec));
|
||||
}
|
||||
}
|
||||
|
||||
private async void UseWidevine_IsCheckedChanged(object sender, Avalonia.Interactivity.RoutedEventArgs e)
|
||||
{
|
||||
if (sender is CheckBox cbox && cbox.IsChecked is true)
|
||||
|
||||
@@ -145,18 +145,7 @@ namespace LibationAvalonia.ViewModels.Settings
|
||||
public string StripAudibleBrandAudioTip => Configuration.GetHelpText(nameof(StripAudibleBrandAudio));
|
||||
public bool StripUnabridged { get; set; }
|
||||
public string StripUnabridgedTip => Configuration.GetHelpText(nameof(StripUnabridged));
|
||||
public bool DecryptToLossy {
|
||||
get => field;
|
||||
set
|
||||
{
|
||||
this.RaiseAndSetIfChanged(ref field, value);
|
||||
if (DecryptToLossy && SpatialAudioCodec.Value is Configuration.SpatialCodec.AC_4)
|
||||
{
|
||||
SpatialAudioCodec = SpatialAudioCodecs[0];
|
||||
this.RaisePropertyChanged(nameof(SpatialAudioCodec));
|
||||
}
|
||||
}
|
||||
}
|
||||
public bool DecryptToLossy { get => field; set => this.RaiseAndSetIfChanged(ref field, value); }
|
||||
public string DecryptToLossyTip => Configuration.GetHelpText(nameof(DecryptToLossy));
|
||||
public bool MoveMoovToBeginning { get; set; }
|
||||
|
||||
|
||||
@@ -86,8 +86,6 @@ namespace LibationFileManager
|
||||
The Dolby Digital Plus (E-AC-3) codec is more widely
|
||||
supported than the AC-4 codec, but E-AC-3 files are
|
||||
much larger than AC-4 files.
|
||||
|
||||
AC-4 cannot be converted to MP3.
|
||||
""" },
|
||||
{nameof(UseWidevine), """
|
||||
Some audiobooks are only delivered in the highest
|
||||
|
||||
@@ -178,12 +178,6 @@ namespace LibationWinForms.Dialogs
|
||||
moveMoovAtomCbox.Enabled = convertLosslessRb.Checked;
|
||||
lameOptionsGb.Enabled = !convertLosslessRb.Checked;
|
||||
|
||||
if (convertLossyRb.Checked && requestSpatialCbox.Checked)
|
||||
{
|
||||
// Only E-AC-3 can be converted to mp3
|
||||
spatialAudioCodecCb.SelectedIndex = 0;
|
||||
}
|
||||
|
||||
lameTargetRb_CheckedChanged(sender, e);
|
||||
LameMatchSourceBRCbox_CheckedChanged(sender, e);
|
||||
}
|
||||
@@ -205,14 +199,6 @@ namespace LibationWinForms.Dialogs
|
||||
}
|
||||
}
|
||||
|
||||
private void spatialAudioCodecCb_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (spatialAudioCodecCb.SelectedIndex == 1 && convertLossyRb.Checked)
|
||||
{
|
||||
// Only E-AC-3 can be converted to mp3
|
||||
spatialAudioCodecCb.SelectedIndex = 0;
|
||||
}
|
||||
}
|
||||
private void requestSpatialCbox_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
spatialAudioCodecCb.Enabled = requestSpatialCbox.Checked && useWidevineCbox.Checked;
|
||||
|
||||
@@ -897,7 +897,6 @@
|
||||
spatialAudioCodecCb.Name = "spatialAudioCodecCb";
|
||||
spatialAudioCodecCb.Size = new System.Drawing.Size(173, 23);
|
||||
spatialAudioCodecCb.TabIndex = 5;
|
||||
spatialAudioCodecCb.SelectedIndexChanged += spatialAudioCodecCb_SelectedIndexChanged;
|
||||
//
|
||||
// moveMoovAtomCbox
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user