And now it builds and runs
This commit is contained in:
parent
4b7c146041
commit
65d56a838c
@ -13,14 +13,14 @@ namespace Aurora.Backend.Services
|
|||||||
#region Fields
|
#region Fields
|
||||||
private string _pathName = "/Users/brandonwatson/Music/iTunes/iTunes Media/Music";
|
private string _pathName = "/Users/brandonwatson/Music/iTunes/iTunes Media/Music";
|
||||||
private string _extensions = ".wav,.mp3,.aiff,.flac,.m4a,.m4b,.wma";
|
private string _extensions = ".wav,.mp3,.aiff,.flac,.m4a,.m4b,.wma";
|
||||||
private Dictionary<string, Song> _library;
|
private Dictionary<string, BaseSong> _library;
|
||||||
|
|
||||||
|
|
||||||
#endregion Fields
|
#endregion Fields
|
||||||
|
|
||||||
public LibraryService()
|
public LibraryService()
|
||||||
{
|
{
|
||||||
_library = new Dictionary<string, Song>();
|
_library = new Dictionary<string, BaseSong>();
|
||||||
LoadLibrary();
|
LoadLibrary();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -28,10 +28,10 @@ namespace Aurora.Backend.Services
|
|||||||
/// Gets the songs.
|
/// Gets the songs.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>The songs.</returns>
|
/// <returns>The songs.</returns>
|
||||||
public ObservableCollection<Song> GetLibrary()
|
public ObservableCollection<BaseSong> GetLibrary()
|
||||||
{
|
{
|
||||||
ObservableCollection<Song> collection = new ObservableCollection<Song>();
|
ObservableCollection<BaseSong> collection = new ObservableCollection<BaseSong>();
|
||||||
foreach (KeyValuePair<string, Song> pair in _library)
|
foreach (KeyValuePair<string, BaseSong> pair in _library)
|
||||||
{
|
{
|
||||||
collection.Add(pair.Value);
|
collection.Add(pair.Value);
|
||||||
}
|
}
|
||||||
@ -51,7 +51,7 @@ namespace Aurora.Backend.Services
|
|||||||
{
|
{
|
||||||
TagLib.File tagFile = TagLib.File.Create(file.FullName);
|
TagLib.File tagFile = TagLib.File.Create(file.FullName);
|
||||||
|
|
||||||
Song song = new Song(file)
|
BaseSong song = new LocalSong(file)
|
||||||
{
|
{
|
||||||
Title = tagFile.Tag.Title,
|
Title = tagFile.Tag.Title,
|
||||||
Album = tagFile.Tag.Album,
|
Album = tagFile.Tag.Album,
|
||||||
|
@ -7,22 +7,22 @@ namespace Aurora.Frontend.Views.Songs
|
|||||||
public class SongsViewModel : BaseViewModel
|
public class SongsViewModel : BaseViewModel
|
||||||
{
|
{
|
||||||
#region Fields
|
#region Fields
|
||||||
private ObservableCollection<Song> _songsList;
|
private ObservableCollection<BaseSong> _songsList;
|
||||||
private Song _selectedSong;
|
private BaseSong _selectedSong;
|
||||||
|
|
||||||
#endregion Fields
|
#endregion Fields
|
||||||
|
|
||||||
#region Constructor
|
#region Constructor
|
||||||
public SongsViewModel()
|
public SongsViewModel()
|
||||||
{
|
{
|
||||||
_songsList = new ObservableCollection<Song>();
|
_songsList = new ObservableCollection<BaseSong>();
|
||||||
Initialize();
|
Initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Constructor
|
#endregion Constructor
|
||||||
|
|
||||||
#region Properties
|
#region Properties
|
||||||
public ObservableCollection<Song> SongsList
|
public ObservableCollection<BaseSong> SongsList
|
||||||
{
|
{
|
||||||
get { return _songsList; }
|
get { return _songsList; }
|
||||||
set
|
set
|
||||||
@ -35,7 +35,7 @@ namespace Aurora.Frontend.Views.Songs
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Song SelectedSong
|
public BaseSong SelectedSong
|
||||||
{
|
{
|
||||||
get { return _selectedSong; }
|
get { return _selectedSong; }
|
||||||
set
|
set
|
||||||
|
Reference in New Issue
Block a user