VLC_WINRT.ViewModels.MainPage.MusicLibraryViewModel.GetMusicFromLibrary C# (CSharp) Method

GetMusicFromLibrary() public method

public GetMusicFromLibrary ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task
        public async Task GetMusicFromLibrary()
        {
            await LoadFromDatabase();
            if (Artist.Any())
            {
                IsMusicLibraryEmpty = false;
                LoadFavoritesRandomAlbums();
            }

            // TODO: Find a better way to check for new items in the library.
            // This checks for new folders. If there are more or less then what was there before, it will index again.
            NbOfFiles = (await KnownVLCLocation.MusicLibrary.GetItemsAsync()).Count;
            bool isMusicLibraryChanged = await IsMusicLibraryChanged();
            if (isMusicLibraryChanged)
            {
                await StartIndexing();
                return;
            }
            IsLoaded = true;
            IsBusy = false;
        }