|
|
|
@ -15,7 +15,7 @@ public class Playlist
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private string name;
|
|
|
|
|
private string name = "unknown";
|
|
|
|
|
|
|
|
|
|
public string Description
|
|
|
|
|
{
|
|
|
|
@ -30,9 +30,17 @@ public class Playlist
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private string description;
|
|
|
|
|
private string description = "";
|
|
|
|
|
|
|
|
|
|
public IEnumerable<Title> Morceaux { get; set; }
|
|
|
|
|
public IEnumerable<Title> Titles
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return titles;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private List<Title> titles = new List<Title>();
|
|
|
|
|
|
|
|
|
|
public string ImageURL
|
|
|
|
|
{
|
|
|
|
@ -40,31 +48,39 @@ public class Playlist
|
|
|
|
|
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
if (value != null && value.Contains('.'))
|
|
|
|
|
if (value == null || !value.Contains('.'))
|
|
|
|
|
{
|
|
|
|
|
value = "none.png";
|
|
|
|
|
imageURL = value;
|
|
|
|
|
}
|
|
|
|
|
if (value.Contains(' '))
|
|
|
|
|
{
|
|
|
|
|
imageURL = value.Replace(' ', '_');
|
|
|
|
|
}
|
|
|
|
|
else if (value.Contains('.'))
|
|
|
|
|
{
|
|
|
|
|
imageURL = value;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private string imageURL;
|
|
|
|
|
private string imageURL = "none.png";
|
|
|
|
|
|
|
|
|
|
public Playlist(string nom, string description, string imageURL)
|
|
|
|
|
{
|
|
|
|
|
Name = nom;
|
|
|
|
|
Description = description;
|
|
|
|
|
Morceaux = new List<Title>();
|
|
|
|
|
this.imageURL = imageURL;
|
|
|
|
|
ImageURL = imageURL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void AddTitle(Title morceau)
|
|
|
|
|
{
|
|
|
|
|
Morceaux.Prepend(morceau);
|
|
|
|
|
titles.Add(morceau);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void RemoveTitle(Title morceau)
|
|
|
|
|
{
|
|
|
|
|
Morceaux.ToList().Remove(morceau);
|
|
|
|
|
titles.Remove(morceau);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|