mirror of
https://github.com/Royce551/FRESHMusicPlayer.git
synced 2025-01-22 10:51:52 -05:00
fixes
This commit is contained in:
parent
18e0449488
commit
41478d98d3
3 changed files with 16 additions and 13 deletions
|
@ -107,6 +107,7 @@
|
|||
</Compile>
|
||||
<Compile Include="Forms\TagEditor\Integrations\IReleaseIntegration.cs" />
|
||||
<Compile Include="Forms\TagEditor\Integrations\MusicBrainzIntegration.cs" />
|
||||
<Compile Include="Forms\TagEditor\Integrations\OsuIntegration.cs" />
|
||||
<Compile Include="Forms\TagEditor\Integrations\ReleaseIntegrationPage.xaml.cs">
|
||||
<DependentUpon>ReleaseIntegrationPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
|
|
|
@ -80,6 +80,20 @@ namespace FRESHMusicPlayer
|
|||
};
|
||||
progressTimer.Tick += ProgressTimer_Tick;
|
||||
|
||||
LoggingHandler.Log("Reading library...");
|
||||
|
||||
LiteDatabase library;
|
||||
try
|
||||
{
|
||||
library = new LiteDatabase(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "FRESHMusicPlayer", "database.fdb2"));
|
||||
Library = new GUILibrary(library, NotificationHandler);
|
||||
}
|
||||
catch (IOException) // library is *probably* being used by another FMP.
|
||||
{
|
||||
File.WriteAllLines(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "FRESHMusicPlayer", "instance"), initialFile);
|
||||
Application.Current.Shutdown();
|
||||
}
|
||||
|
||||
watcher.Filter = "instance";
|
||||
watcher.IncludeSubdirectories = false;
|
||||
watcher.EnableRaisingEvents = true;
|
||||
|
@ -94,18 +108,6 @@ namespace FRESHMusicPlayer
|
|||
File.Delete(args.FullPath);
|
||||
});
|
||||
};
|
||||
LoggingHandler.Log("Reading library...");
|
||||
LiteDatabase library;
|
||||
try
|
||||
{
|
||||
library = new LiteDatabase(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "FRESHMusicPlayer", "database.fdb2"));
|
||||
Library = new GUILibrary(library, NotificationHandler);
|
||||
}
|
||||
catch (IOException) // library is *probably* being used by another FMP.
|
||||
{
|
||||
File.WriteAllLines(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "FRESHMusicPlayer", "instance"), initialFile);
|
||||
Application.Current.Shutdown();
|
||||
}
|
||||
LoggingHandler.Log("Ready to go!");
|
||||
|
||||
if (initialFile != null)
|
||||
|
|
|
@ -93,7 +93,7 @@ namespace FRESHMusicPlayer.Pages
|
|||
|
||||
private void Page_Drop(object sender, DragEventArgs e)
|
||||
{
|
||||
InterfaceUtils.DoDragDrop((string[])e.Data.GetData(DataFormats.FileDrop), window.Player, window.Library, enqueue: false);
|
||||
InterfaceUtils.DoDragDrop((string[])e.Data.GetData(DataFormats.FileDrop), window.Player, window.Library, clearqueue: false, enqueue: false);
|
||||
}
|
||||
|
||||
private void TextBoxButton_Click(object sender, RoutedEventArgs e)
|
||||
|
|
Loading…
Reference in a new issue