mirror of
https://github.com/ZuneDev/ZuneShell.dll.git
synced 2026-07-27 13:11:51 -07:00
Always wait for library scan to finish before continuing initialization
This commit is contained in:
@@ -174,7 +174,10 @@ namespace Microsoft.Zune.Shell
|
|||||||
};
|
};
|
||||||
|
|
||||||
var localCore = new StrixMusic.Cores.LocalFiles.LocalFilesCore(
|
var localCore = new StrixMusic.Cores.LocalFiles.LocalFilesCore(
|
||||||
id, settings, fileService, null, null);
|
id, settings, fileService, null, null)
|
||||||
|
{
|
||||||
|
ScannerWaitBehavior = StrixMusic.Cores.Files.ScannerWaitBehavior.AlwaysWait
|
||||||
|
};
|
||||||
|
|
||||||
var prefs = new MergedCollectionConfig
|
var prefs = new MergedCollectionConfig
|
||||||
{
|
{
|
||||||
@@ -222,7 +225,7 @@ namespace Microsoft.Zune.Shell
|
|||||||
{
|
{
|
||||||
library.TracksChanged -= LibraryTracksChanged;
|
library.TracksChanged -= LibraryTracksChanged;
|
||||||
|
|
||||||
ITrack firstTrack = addedItems[0].Data;
|
ITrack firstTrack = addedItems[1].Data;
|
||||||
|
|
||||||
await firstTrack.PlayArtistCollectionAsync();
|
await firstTrack.PlayArtistCollectionAsync();
|
||||||
}
|
}
|
||||||
@@ -230,6 +233,7 @@ namespace Microsoft.Zune.Shell
|
|||||||
|
|
||||||
private static async void LibraryTracksAdded(object sender, int count)
|
private static async void LibraryTracksAdded(object sender, int count)
|
||||||
{
|
{
|
||||||
|
return;
|
||||||
if (sender is ILibrary library && count > 0)
|
if (sender is ILibrary library && count > 0)
|
||||||
{
|
{
|
||||||
library.TracksCountChanged -= LibraryTracksAdded;
|
library.TracksCountChanged -= LibraryTracksAdded;
|
||||||
|
|||||||
Reference in New Issue
Block a user