Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor Bug fixes #728

Merged
merged 10 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Documentation/InstallOnMac.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@ This walkthrough should get you up and running with Libation on your Mac.
```
- Close the terminal and use Libation!

## Troubleshooting

If Libation fails to start after completing the above steps, try the following:

1. Right-click the Libation app in your applications folder and select _Show Package Contents_
2. Open the `Contents` folder and then the `MacOS` folder.
3. Find the file named `Libation`, right-click it, and then select _Open_.

Libation _should_ launch, and you should now be able to open Libation by just double-clicking the app bundle in your applications folder.


## Running Hangover

Libation comes with a recovery app called Hangover. You can start it by running this command:
Expand Down
2 changes: 1 addition & 1 deletion Source/AaxDecrypter/AaxDecrypter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AAXClean.Codecs" Version="1.1.0" />
<PackageReference Include="AAXClean.Codecs" Version="1.1.1" />
</ItemGroup>

<ItemGroup>
Expand Down
11 changes: 8 additions & 3 deletions Source/ApplicationServices/LibraryCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,14 @@ public static async Task<List<LibraryBook>> FindInactiveBooks(Func<Account, Task

logTime($"pre {nameof(scanAccountsAsync)} all");
var libraryOptions = new LibraryOptions
{
ResponseGroups = LibraryOptions.ResponseGroupOptions.ALL_OPTIONS,
ImageSizes = LibraryOptions.ImageSizeOptions._500 | LibraryOptions.ImageSizeOptions._1215
{
ResponseGroups
= LibraryOptions.ResponseGroupOptions.Rating | LibraryOptions.ResponseGroupOptions.Media
| LibraryOptions.ResponseGroupOptions.Relationships | LibraryOptions.ResponseGroupOptions.ProductDesc
| LibraryOptions.ResponseGroupOptions.Contributors | LibraryOptions.ResponseGroupOptions.ProvidedReview
| LibraryOptions.ResponseGroupOptions.ProductPlans | LibraryOptions.ResponseGroupOptions.Series
| LibraryOptions.ResponseGroupOptions.CategoryLadders | LibraryOptions.ResponseGroupOptions.ProductExtendedAttrs,
ImageSizes = LibraryOptions.ImageSizeOptions._500 | LibraryOptions.ImageSizeOptions._1215
};
var importItems = await scanAccountsAsync(apiExtendedfunc, accounts, libraryOptions);
logTime($"post {nameof(scanAccountsAsync)} all");
Expand Down
6 changes: 5 additions & 1 deletion Source/AudibleUtilities/ApiExtended.cs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,11 @@ private async Task<List<Item>> getProductsAsync(int batchNum, List<string> asins
try
{
var sw = Stopwatch.StartNew();
var items = await Api.GetCatalogProductsAsync(asins, CatalogOptions.ResponseGroupOptions.ALL_OPTIONS);
var items = await Api.GetCatalogProductsAsync(asins, CatalogOptions.ResponseGroupOptions.Rating | CatalogOptions.ResponseGroupOptions.Media
| CatalogOptions.ResponseGroupOptions.Relationships | CatalogOptions.ResponseGroupOptions.ProductDesc
| CatalogOptions.ResponseGroupOptions.Contributors | CatalogOptions.ResponseGroupOptions.ProvidedReview
| CatalogOptions.ResponseGroupOptions.ProductPlans | CatalogOptions.ResponseGroupOptions.Series
| CatalogOptions.ResponseGroupOptions.CategoryLadders | CatalogOptions.ResponseGroupOptions.ProductExtendedAttrs);
sw.Stop();

Serilog.Log.Logger.Debug($"Batch {batchNum} End: Retrieved {items.Count} items in {sw.ElapsedMilliseconds} ms");
Expand Down
5 changes: 5 additions & 0 deletions Source/FileLiberator/ConvertToMp3.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ public override async Task<StatusHandler> ProcessAsync(LibraryBook libraryBook)
config.LameMatchSourceBR,
chapters);

if (m4bBook.AppleTags.Tracks is (int trackNum, int trackCount))
{
lameConfig.ID3.Track = trackCount > 0 ? $"{trackNum}/{trackCount}" : trackNum.ToString();
}

using var mp3File = File.Open(Path.GetTempFileName(), FileMode.OpenOrCreate, FileAccess.ReadWrite);
try
{
Expand Down
12 changes: 6 additions & 6 deletions Source/HangoverAvalonia/HangoverAvalonia.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@
</ItemGroup>
<ItemGroup>

<PackageReference Include="Avalonia" Version="11.0.3" />
<PackageReference Include="Avalonia.Desktop" Version="11.0.3" />
<PackageReference Include="Avalonia" Version="11.0.4" />
<PackageReference Include="Avalonia.Desktop" Version="11.0.4" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.3" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.3" />
<PackageReference Include="Avalonia.Controls.ItemsRepeater" Version="11.0.3" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.3" />
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.4" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.4" />
<PackageReference Include="Avalonia.Controls.ItemsRepeater" Version="11.0.4" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.4" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\HangoverBase\HangoverBase.csproj" />
Expand Down
2 changes: 1 addition & 1 deletion Source/LibationAvalonia/Dialogs/LibationFilesDialog.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
Margin="5"
Padding="30,3,30,3"
Content="Save"
Command="{Binding SaveButtonAsync}" />
Click="Save_Click" />
</Grid>
</Window>
22 changes: 9 additions & 13 deletions Source/LibationAvalonia/Dialogs/LibationFilesDialog.axaml.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
using Avalonia.Controls;
using LibationFileManager;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace LibationAvalonia.Dialogs
{
public partial class LibationFilesDialog : Window
public partial class LibationFilesDialog : DialogWindow
{
private class DirSelectOptions
{
Expand All @@ -18,28 +16,26 @@ private class DirSelectOptions

public string Directory { get; set; } = Configuration.GetKnownDirectoryPath(Configuration.KnownDirectories.UserProfile);
}
private DirSelectOptions dirSelectOptions;

private readonly DirSelectOptions dirSelectOptions;
public string SelectedDirectory => dirSelectOptions.Directory;
public DialogResult DialogResult { get; private set; }
public LibationFilesDialog()

public LibationFilesDialog() : base(saveAndRestorePosition: false)
{
InitializeComponent();

DataContext = dirSelectOptions = new();
}

public async Task SaveButtonAsync()
public async void Save_Click(object sender, Avalonia.Interactivity.RoutedEventArgs e)
{
var libationDir = dirSelectOptions.Directory;

if (!System.IO.Directory.Exists(libationDir))
if (!System.IO.Directory.Exists(SelectedDirectory))
{
await MessageBox.Show("Not saving change to Libation Files location. This folder does not exist:\r\n" + libationDir, "Folder does not exist", MessageBoxButtons.OK, MessageBoxIcon.Error, saveAndRestorePosition: false);
await MessageBox.Show("Not saving change to Libation Files location. This folder does not exist:\r\n" + SelectedDirectory, "Folder does not exist", MessageBoxButtons.OK, MessageBoxIcon.Error, saveAndRestorePosition: false);
return;
}

DialogResult = DialogResult.OK;
Close(DialogResult);
await SaveAndCloseAsync();
}
}
}
30 changes: 16 additions & 14 deletions Source/LibationAvalonia/Dialogs/SettingsDialog.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="900" d:DesignHeight="750"
MinWidth="900" MinHeight="750"
mc:Ignorable="d" d:DesignWidth="900" d:DesignHeight="200"
MinWidth="900" MinHeight="200"
Width="900" Height="750"
x:Class="LibationAvalonia.Dialogs.SettingsDialog"
xmlns:controls="clr-namespace:LibationAvalonia.Controls"
Expand Down Expand Up @@ -46,39 +46,41 @@
</TabControl.Styles>

<TabItem>

<TabItem.Header>
<TextBlock Text="Important Settings"/>
</TabItem.Header>

<settings:Important DataContext="{CompiledBinding ImportantSettings}" />
<ScrollViewer VerticalScrollBarVisibility="Auto">
<settings:Important DataContext="{CompiledBinding ImportantSettings}" />
</ScrollViewer>
</TabItem>

<TabItem>

<TabItem.Header>
<TextBlock Text="Import Library"/>
</TabItem.Header>

<settings:Import DataContext="{CompiledBinding ImportSettings}" />
<ScrollViewer VerticalScrollBarVisibility="Auto">
<settings:Import DataContext="{CompiledBinding ImportSettings}" />
</ScrollViewer>
</TabItem>

<TabItem>

<TabItem.Header>
<TextBlock Text="Download/Decrypt"/>
</TabItem.Header>

<settings:DownloadDecrypt DataContext="{CompiledBinding DownloadDecryptSettings}" />

<ScrollViewer VerticalScrollBarVisibility="Auto">
<settings:DownloadDecrypt DataContext="{CompiledBinding DownloadDecryptSettings}" />
</ScrollViewer>
</TabItem>

<TabItem>

<TabItem.Header>
<TextBlock Text="Audio File Settings"/>
</TabItem.Header>

<settings:Audio DataContext="{CompiledBinding AudioSettings}" />
<ScrollViewer VerticalScrollBarVisibility="Auto">
<settings:Audio DataContext="{CompiledBinding AudioSettings}" />
</ScrollViewer>
</TabItem>
</TabControl>
</Grid>
Expand Down
14 changes: 7 additions & 7 deletions Source/LibationAvalonia/LibationAvalonia.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Avalonia.Diagnostics" Version="11.0.3" Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'" />
<PackageReference Include="Avalonia" Version="11.0.3" />
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.0.3" />
<PackageReference Include="Avalonia.Controls.ItemsRepeater" Version="11.0.3" />
<PackageReference Include="Avalonia.Desktop" Version="11.0.3" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.3" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.3" />
<PackageReference Include="Avalonia.Diagnostics" Version="11.0.4" Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'" />
<PackageReference Include="Avalonia" Version="11.0.4" />
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.0.4" />
<PackageReference Include="Avalonia.Controls.ItemsRepeater" Version="11.0.4" />
<PackageReference Include="Avalonia.Desktop" Version="11.0.4" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.4" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.4" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading