diff --git a/Sources/Linaris/Converters.cs b/Sources/Linaris/Converters.cs
index f55ecc2..f4e0f12 100644
--- a/Sources/Linaris/Converters.cs
+++ b/Sources/Linaris/Converters.cs
@@ -1,22 +1,26 @@
using System;
-namespace Linaris.Converters
+namespace Linaris.Converters;
+
+public class InverseBooleanConverter : IValueConverter
{
- public class InverseBooleanConverter : IValueConverter
+ public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
- public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ if (value is bool boolValue)
{
- if (value is bool boolValue)
- {
- return !boolValue;
- }
-
- return value;
+ return !boolValue;
}
- public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ return value;
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ {
+ if (value is bool boolValue)
{
- throw new NotImplementedException();
+ return !boolValue;
}
+
+ return value;
}
}
\ No newline at end of file
diff --git a/Sources/Linaris/FooterPage.xaml.cs b/Sources/Linaris/FooterPage.xaml.cs
index 55d0534..e79d555 100644
--- a/Sources/Linaris/FooterPage.xaml.cs
+++ b/Sources/Linaris/FooterPage.xaml.cs
@@ -2,6 +2,7 @@ using CommunityToolkit.Maui.Core.Primitives;
using Model;
using Model.Stub;
using System.ComponentModel;
+using System.Configuration;
namespace Linaris;
@@ -111,9 +112,14 @@ public partial class FooterPage : ContentView, INotifyPropertyChanged
private void TimeSlider_ValueChanged(object sender, ValueChangedEventArgs e)
{
+ if ((TimeSlider.Value * music.Duration.TotalSeconds) - music.Position.TotalSeconds <= 1 && (TimeSlider.Value * music.Duration.TotalSeconds) - music.Position.TotalSeconds >= -1)
+ {
+ return;
+ }
TimeSpan PositionTimeSpan = TimeSpan.FromSeconds(TimeSlider.Value * music.Duration.TotalSeconds);
music.SeekTo(PositionTimeSpan);
Position = music.Position.ToString(@"hh\:mm\:ss");
+ Duration = music.Duration.ToString(@"hh\:mm\:ss");
}
private void Music_StateChanged(object sender, MediaStateChangedEventArgs e)
@@ -135,8 +141,8 @@ public partial class FooterPage : ContentView, INotifyPropertyChanged
Manager.PreviousTitle();
Dispatcher.DispatchAsync(() =>
{
- CurrentPlaying = Manager.CurrentPlaying;
- music.Source = CurrentPlaying.Path;
+ string encodedFilePath = Manager.CurrentPlaying.Path.Replace(" ", "\\ ");
+ music.Source = encodedFilePath;
Duration = music.Duration.ToString(@"hh\:mm\:ss");
});
}
@@ -147,8 +153,8 @@ public partial class FooterPage : ContentView, INotifyPropertyChanged
Manager.NextTitle();
Dispatcher.DispatchAsync(() =>
{
- CurrentPlaying = Manager.CurrentPlaying;
- music.Source = CurrentPlaying.Path;
+ string encodedFilePath = Manager.CurrentPlaying.Path.Replace(" ", "\\ ");
+ music.Source = encodedFilePath;
Duration = music.Duration.ToString(@"hh\:mm\:ss");
});
}
@@ -169,8 +175,8 @@ public partial class FooterPage : ContentView, INotifyPropertyChanged
Manager.NextTitle();
Dispatcher.DispatchAsync(() =>
{
- CurrentPlaying = Manager.CurrentPlaying;
- music.Source = CurrentPlaying.Path;
+ string encodedFilePath = Manager.CurrentPlaying.Path.Replace(" ", "\\ ");
+ music.Source = encodedFilePath;
Duration = music.Duration.ToString(@"hh\:mm\:ss");
});
}
diff --git a/Sources/Linaris/Linaris.csproj b/Sources/Linaris/Linaris.csproj
index 8adecf0..5461e41 100644
--- a/Sources/Linaris/Linaris.csproj
+++ b/Sources/Linaris/Linaris.csproj
@@ -55,6 +55,7 @@
+
diff --git a/Sources/Linaris/LocalFilesPage.xaml b/Sources/Linaris/LocalFilesPage.xaml
index ca1ffb2..39a3210 100644
--- a/Sources/Linaris/LocalFilesPage.xaml
+++ b/Sources/Linaris/LocalFilesPage.xaml
@@ -33,19 +33,19 @@
-
-
-
-
+
+
+
+
-
+
-
+
diff --git a/Sources/Linaris/LocalFilesPage.xaml.cs b/Sources/Linaris/LocalFilesPage.xaml.cs
index 4d7b894..d955453 100644
--- a/Sources/Linaris/LocalFilesPage.xaml.cs
+++ b/Sources/Linaris/LocalFilesPage.xaml.cs
@@ -1,5 +1,4 @@
using CommunityToolkit.Maui.Views;
-using Microsoft.Maui.Controls;
using Model;
using System.Collections.ObjectModel;
using System.Diagnostics;
@@ -92,7 +91,7 @@ public partial class LocalFilesPage : ContentPage
{
foreach (var result in results)
{
- CustomTitle custom = new CustomTitle(result.FileName, "none.png", "", result.FullPath);
+ CustomTitle custom = new (result.FileName, "none.png", "", result.FullPath);
if (!IsCustomTitleInCollection(custom))
{
AddCustomTitle(custom);
diff --git a/Sources/Linaris/Platforms/Android/AndroidManifest.xml b/Sources/Linaris/Platforms/Android/AndroidManifest.xml
index 6a26cc6..e1afb74 100644
--- a/Sources/Linaris/Platforms/Android/AndroidManifest.xml
+++ b/Sources/Linaris/Platforms/Android/AndroidManifest.xml
@@ -3,11 +3,6 @@
-
-
-
-
-
-
-
+
+
\ No newline at end of file
diff --git a/Sources/Linaris/PlaylistPage.xaml b/Sources/Linaris/PlaylistPage.xaml
index f51b4b0..17ec576 100644
--- a/Sources/Linaris/PlaylistPage.xaml
+++ b/Sources/Linaris/PlaylistPage.xaml
@@ -22,9 +22,9 @@
-
-
-
+
+
+
@@ -35,8 +35,8 @@
-
-
+
+
diff --git a/Sources/Linaris/PlaylistPage.xaml.cs b/Sources/Linaris/PlaylistPage.xaml.cs
index 9f6dd22..6b60d22 100644
--- a/Sources/Linaris/PlaylistPage.xaml.cs
+++ b/Sources/Linaris/PlaylistPage.xaml.cs
@@ -44,7 +44,8 @@ public partial class PlaylistPage : ContentPage
if (musicElement != null)
{
if (Manager.CurrentPlaying == null) return;
- musicElement.Source = Manager.CurrentPlaying.Path;
+ string encodedFilePath = Manager.CurrentPlaying.Path.Replace(" ", "\\ ");
+ musicElement.Source = encodedFilePath;
}
if (footer is FooterPage footerPage)
{
@@ -68,7 +69,8 @@ public partial class PlaylistPage : ContentPage
if (musicElement != null)
{
if (Manager.CurrentPlaying == null) return;
- musicElement.Source = Manager.CurrentPlaying.Path;
+ string encodedFilePath = Manager.CurrentPlaying.Path.Replace(" ", "\\ ");
+ musicElement.Source = encodedFilePath;
}
}
}
diff --git a/Sources/Linaris/Resources/Styles/Styles.xaml b/Sources/Linaris/Resources/Styles/Styles.xaml
index 4b93b3c..68d4367 100644
--- a/Sources/Linaris/Resources/Styles/Styles.xaml
+++ b/Sources/Linaris/Resources/Styles/Styles.xaml
@@ -485,27 +485,11 @@
-
+
+
+