diff --git a/Documentation/doxygen/Doxyfile b/Documentation/doxygen/Doxyfile
index 1608c88..06b6b8e 100644
--- a/Documentation/doxygen/Doxyfile
+++ b/Documentation/doxygen/Doxyfile
@@ -5,7 +5,7 @@ DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "Linaris"
PROJECT_NUMBER = 1.0.0
PROJECT_BRIEF = "Music player and manager"
-PROJECT_LOGO = appicon.svg
+PROJECT_LOGO = appicon.png
OUTPUT_DIRECTORY = /docs/doxygen
CREATE_SUBDIRS = NO
ALLOW_UNICODE_NAMES = NO
diff --git a/Documentation/doxygen/appicon.png b/Documentation/doxygen/appicon.png
new file mode 100644
index 0000000..6d0b4f4
Binary files /dev/null and b/Documentation/doxygen/appicon.png differ
diff --git a/Sources/Console/Console.csproj b/Sources/Console/Console.csproj
index a816ead..b491ec4 100644
--- a/Sources/Console/Console.csproj
+++ b/Sources/Console/Console.csproj
@@ -13,10 +13,6 @@
-
-
-
-
diff --git a/Sources/Linaris/FooterPage.xaml.cs b/Sources/Linaris/FooterPage.xaml.cs
index 35ec8da..24959bc 100644
--- a/Sources/Linaris/FooterPage.xaml.cs
+++ b/Sources/Linaris/FooterPage.xaml.cs
@@ -177,8 +177,7 @@ public partial class FooterPage : ContentView, INotifyPropertyChanged
Manager.NextTitle();
Dispatcher.DispatchAsync(() =>
{
- string encodedFilePath = Manager.CurrentPlaying.Path.Replace(" ", "\\ ");
- music.Source = encodedFilePath;
+ music.Source = Manager.CurrentPlaying.Path;
Duration = music.Duration.ToString(@"hh\:mm\:ss");
});
}
diff --git a/Sources/Linaris/Linaris.csproj b/Sources/Linaris/Linaris.csproj
index 5461e41..459ec0d 100644
--- a/Sources/Linaris/Linaris.csproj
+++ b/Sources/Linaris/Linaris.csproj
@@ -53,9 +53,6 @@
-
-
-
diff --git a/Sources/Linaris/LocalFilesPage.xaml.cs b/Sources/Linaris/LocalFilesPage.xaml.cs
index 5c8ea6c..de03277 100644
--- a/Sources/Linaris/LocalFilesPage.xaml.cs
+++ b/Sources/Linaris/LocalFilesPage.xaml.cs
@@ -1,5 +1,6 @@
using CommunityToolkit.Maui.Views;
using Model;
+using Model.Stub;
using System.Collections.ObjectModel;
using System.Diagnostics;
@@ -87,11 +88,15 @@ public partial class LocalFilesPage : ContentPage
return;
}
- if (sender is Button button)
+ foreach (var result in results)
{
- foreach (var result in results)
+ string path = Path.Combine(FileSystem.Current.AppDataDirectory, "customs");
+ if (!Path.Exists(path)) Directory.CreateDirectory(path);
+ string fullPath = Path.Combine(path, result.FileName);
+ if (!File.Exists(fullPath))
{
- CustomTitle custom = new (result.FileName, "none.png", "", result.FullPath);
+ File.Copy(result.FullPath, fullPath);
+ CustomTitle custom = new(result.FileName, "none.png", "", fullPath);
if (!IsCustomTitleInCollection(custom))
{
AddCustomTitle(custom);
@@ -149,6 +154,7 @@ public partial class LocalFilesPage : ContentPage
{
(Application.Current as App).Manager.RemoveCustomTitle(titleToRemove);
customTitles.Remove(titleToRemove);
+ File.Delete(titleToRemove.Path);
}
}
}
diff --git a/Sources/Linaris/PlaylistPage.xaml b/Sources/Linaris/PlaylistPage.xaml
index 17ec576..2d01fb5 100644
--- a/Sources/Linaris/PlaylistPage.xaml
+++ b/Sources/Linaris/PlaylistPage.xaml
@@ -36,7 +36,7 @@
-
+
diff --git a/Sources/Model/Album.cs b/Sources/Model/Album.cs
index f7e29c2..3cd5a13 100644
--- a/Sources/Model/Album.cs
+++ b/Sources/Model/Album.cs
@@ -2,7 +2,6 @@
using System.Collections.ObjectModel;
namespace Model
-
{
///
/// Classe Album
diff --git a/Sources/Model/Artist.cs b/Sources/Model/Artist.cs
index 84b7f6f..d43175d 100644
--- a/Sources/Model/Artist.cs
+++ b/Sources/Model/Artist.cs
@@ -1,74 +1,75 @@
using Model.Stub;
using System.Xml.Serialization;
-namespace Model;
-
-public class Artist
+namespace Model
{
///
/// Classe Artist
///
-
- public string Name
+ public class Artist
{
- get => name;
- set
+ public string Name
{
- if (value != null && value.Length < Manager.MAX_NAME_LENGTH)
+ get => name;
+
+ set
{
- name = value;
+ if (value != null && value.Length < Manager.MAX_NAME_LENGTH)
+ {
+ name = value;
+ }
}
}
- }
- private string name = Manager.DEFAULT_NAME;
+ private string name = Manager.DEFAULT_NAME;
- ///
- /// Constructeur de la classe Artist
- ///
- /// Nom de l'artiste
- public Artist(string name)
- {
- Name = name;
- }
+ ///
+ /// Constructeur de la classe Artist
+ ///
+ /// Nom de l'artiste
+ public Artist(string name)
+ {
+ Name = name;
+ }
- ///
- /// Constructeur par défaut de la classe Artist
- ///
- public Artist()
- {
+ ///
+ /// Constructeur par défaut de la classe Artist
+ ///
+ public Artist()
+ {
- }
+ }
- ///
- /// Fonction qui permet de déterminer si deux objets Artist sont égaux
- ///
- ///
- /// Un booléen indiquant si l'objet est égal
- public override bool Equals(object obj)
- {
- if(obj == null) return false;
- if(obj.GetType() != typeof(Artist)) return false;
- if(obj is Artist artist && Name == artist.Name) return true;
- else return false;
- }
+ ///
+ /// Fonction qui permet de déterminer si deux objets Artist sont égaux
+ ///
+ ///
+ /// Un booléen indiquant si l'objet est égal
+ public override bool Equals(object obj)
+ {
+ if (obj == null) return false;
+ if (obj.GetType() != typeof(Artist)) return false;
+ if (obj is Artist artist && Name == artist.Name) return true;
+ else return false;
+ }
- ///
- /// Permet de déterminer le hash d'un objet Artist
- ///
- /// Hash de l'attribut Name
- public override int GetHashCode()
- {
- return Name.GetHashCode();
- }
+ ///
+ /// Permet de déterminer le hash d'un objet Artist
+ ///
+ /// Hash de l'attribut Name
+ public override int GetHashCode()
+ {
+ return Name.GetHashCode();
+ }
- ///
- /// Permet de convertir un objet Artist en string
- ///
- /// Une nouvelle chaîne caractères contenant le nom de l'Artist
- public override string ToString()
- {
- return $"{Name}";
+ ///
+ /// Permet de convertir un objet Artist en string
+ ///
+ /// Une nouvelle chaîne caractères contenant le nom de l'Artist
+ public override string ToString()
+ {
+ return $"{Name}";
+ }
}
-}
+}
\ No newline at end of file
diff --git a/Sources/Model/CustomTitle.cs b/Sources/Model/CustomTitle.cs
index 23c433f..66ee735 100644
--- a/Sources/Model/CustomTitle.cs
+++ b/Sources/Model/CustomTitle.cs
@@ -2,128 +2,128 @@
using System.ComponentModel;
using System.Runtime.CompilerServices;
-namespace Model;
-
-public class CustomTitle : Title, INotifyPropertyChanged
+namespace Model
{
///
/// Classe CustomTitle
- ///
-
- public string Path
+ ///
+ public class CustomTitle : Title, INotifyPropertyChanged
{
- get => path;
-
- set
+ public string Path
{
- if (value != null && value.Length < Manager.MAX_DESCRIPTION_LENGTH)
+ get => path;
+
+ set
{
- path = value;
+ if (value != null && value.Length < Manager.MAX_DESCRIPTION_LENGTH)
+ {
+ path = value;
+ }
+ OnPropertyChanged();
}
- OnPropertyChanged();
}
- }
- private string path = Manager.DEFAULT_URL;
+ private string path = Manager.DEFAULT_URL;
- public bool IsSubMenuVisible
- {
- get => isSubMenuVisible;
- set
+ public bool IsSubMenuVisible
{
- if (isSubMenuVisible != value)
+ get => isSubMenuVisible;
+ set
{
- isSubMenuVisible = value;
+ if (isSubMenuVisible != value)
+ {
+ isSubMenuVisible = value;
+ }
+ OnPropertyChanged();
}
- OnPropertyChanged();
}
- }
- private bool isSubMenuVisible = false;
+ private bool isSubMenuVisible = false;
- public bool IsPlaylistMenuVisible
- {
- get => isPlaylistMenuVisible;
- set
+ public bool IsPlaylistMenuVisible
{
- if (isPlaylistMenuVisible != value)
+ get => isPlaylistMenuVisible;
+ set
{
- isPlaylistMenuVisible = value;
+ if (isPlaylistMenuVisible != value)
+ {
+ isPlaylistMenuVisible = value;
+ }
+ OnPropertyChanged();
}
- OnPropertyChanged();
}
- }
- private bool isPlaylistMenuVisible = false;
+ private bool isPlaylistMenuVisible = false;
- public bool IsNewPlaylistMenuVisible
- {
- get => isNewPlaylistMenuVisible;
- set
+ public bool IsNewPlaylistMenuVisible
{
- if (isNewPlaylistMenuVisible != value)
+ get => isNewPlaylistMenuVisible;
+ set
{
- isNewPlaylistMenuVisible = value;
+ if (isNewPlaylistMenuVisible != value)
+ {
+ isNewPlaylistMenuVisible = value;
+ }
+ OnPropertyChanged();
}
- OnPropertyChanged();
}
- }
-
- private bool isNewPlaylistMenuVisible = false;
-
- ///
- /// Constructeur de la classe Album
- ///
- /// Nom du CustomTitle
- /// Chemin d'accès de l'image du CustomTitle
- /// Informations sur un CustomTitle
- /// Chemin d'accès du CustomTitle
- public CustomTitle(string name, string imageURL, string information, string path) : base(name, imageURL, information)
- {
- Path = path;
- }
- ///
- /// Constructeur par défaut de la classe CustomTitle
- ///
- public CustomTitle() : base(Manager.DEFAULT_NAME, Manager.DEFAULT_URL, Manager.DEFAULT_DESC) { }
+ private bool isNewPlaylistMenuVisible = false;
- ///
- /// Fonction qui permet de déterminer si deux objets CustomTitle sont égaux selon leurs chemin d'accès
- ///
- ///
- /// Un booléen indiquant si les chemins d'accès sont égaux
- public bool Equals(CustomTitle other)
- => Path.Equals(other?.Path);
+ ///
+ /// Constructeur de la classe Album
+ ///
+ /// Nom du CustomTitle
+ /// Chemin d'accès de l'image du CustomTitle
+ /// Informations sur un CustomTitle
+ /// Chemin d'accès du CustomTitle
+ public CustomTitle(string name, string imageURL, string information, string path) : base(name, imageURL, information)
+ {
+ Path = path;
+ }
- ///
- /// Fonction qui permet de déterminer si deux objets CustomTitle sont égaux
- ///
- ///
- /// Un booléen indiquant si l'objet est égal
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(obj, null)) return false;
- if (ReferenceEquals(this, obj)) return true;
- if (GetType() != obj.GetType()) return false;
- return Equals(obj as CustomTitle);
- }
+ ///
+ /// Constructeur par défaut de la classe CustomTitle
+ ///
+ public CustomTitle() : base(Manager.DEFAULT_NAME, Manager.DEFAULT_URL, Manager.DEFAULT_DESC) { }
+
+ ///
+ /// Fonction qui permet de déterminer si deux objets CustomTitle sont égaux selon leurs chemin d'accès
+ ///
+ ///
+ /// Un booléen indiquant si les chemins d'accès sont égaux
+ public bool Equals(CustomTitle other)
+ => Path.Equals(other?.Path);
+
+ ///
+ /// Fonction qui permet de déterminer si deux objets CustomTitle sont égaux
+ ///
+ ///
+ /// Un booléen indiquant si l'objet est égal
+ public override bool Equals(object obj)
+ {
+ if (ReferenceEquals(obj, null)) return false;
+ if (ReferenceEquals(this, obj)) return true;
+ if (GetType() != obj.GetType()) return false;
+ return Equals(obj as CustomTitle);
+ }
- ///
- /// Permet de déterminer le hash d'un objet CustomTitle
- ///
- /// Hash de l'attribut Path
- public override int GetHashCode()
- {
- return Path.GetHashCode();
- }
+ ///
+ /// Permet de déterminer le hash d'un objet CustomTitle
+ ///
+ /// Hash de l'attribut Path
+ public override int GetHashCode()
+ {
+ return Path.GetHashCode();
+ }
- ///
- /// Permet de convertir un objet CustomTitle en string
- ///
- /// Une nouvelle chaîne caractères contenant le nom du CustomTitle et le chemin d'accès
- public override string ToString()
- {
- return $"Name : {Name}, Path : {Path}";
+ ///
+ /// Permet de convertir un objet CustomTitle en string
+ ///
+ /// Une nouvelle chaîne caractères contenant le nom du CustomTitle et le chemin d'accès
+ public override string ToString()
+ {
+ return $"Name : {Name}, Path : {Path}";
+ }
}
-}
+}
\ No newline at end of file
diff --git a/Sources/Model/Genre.cs b/Sources/Model/Genre.cs
index d2be539..de15c8b 100644
--- a/Sources/Model/Genre.cs
+++ b/Sources/Model/Genre.cs
@@ -1,10 +1,11 @@
-namespace Model;
-
-public enum Genre
+namespace Model
{
///
/// Enum des diffénres genres référencés.
///
- HIP_HOP, POP, ROCK, ELECTRO, CLASSIQUE, JAZZ, VARIETE_FRANCAISE, VARIETE_INTERNATIONALE, REGGAE, RAP, RNB, DISCO, BLUES, COUNTRY, FUNK, GOSPEL,
- METAL, K_POP
-}
+ public enum Genre
+ {
+ HIP_HOP, POP, ROCK, ELECTRO, CLASSIQUE, JAZZ, VARIETE_FRANCAISE, VARIETE_INTERNATIONALE, REGGAE, RAP, RNB, DISCO, BLUES, COUNTRY, FUNK, GOSPEL,
+ METAL, K_POP
+ }
+}
\ No newline at end of file
diff --git a/Sources/Model/IDataManager.cs b/Sources/Model/IDataManager.cs
index d64a9d8..e50aae6 100644
--- a/Sources/Model/IDataManager.cs
+++ b/Sources/Model/IDataManager.cs
@@ -1,421 +1,422 @@
using System.Collections.ObjectModel;
-namespace Model;
-
-public interface IDataManager
+namespace Model
{
- // Create
-
- ///
- /// Permet d'ajouter un objet Album à l'application
- ///
- /// Album à ajouter
- void AddAlbum(Album album);
-
- ///
- /// Permet d'ajouter des objets Album à l'application
- ///
- /// Liste d'Album à ajouter
- void AddAlbums(List albumsList);
-
- ///
- /// Permet d'ajouter un objet Artist à l'application
- ///
- /// Artist à ajouter
- void AddArtist(Artist artist);
-
- ///
- /// Permet d'ajouter des objets Artist à l'application
- ///
- /// Liste d'Artist à ajouter
- void AddArtists(List artistsList);
-
- ///
- /// Permet d'ajouter un objet Playlist à l'application
- ///
- /// Playlist à ajouter
- void AddPlaylist(Playlist playlist);
-
- ///
- /// Permet d'ajouter des objets Playlist à l'application
- ///
- /// Liste de Playlist à ajouter
- void AddPlaylists(List playlistsList);
-
- ///
- /// Permet d'ajouter un objet CustomTitle à l'application
- ///
- /// CustomTitle à ajouter
- void AddCustomTitle(CustomTitle title);
-
- ///
- /// Permet d'ajouter des objets CustomTitle à l'application
- ///
- /// Liste de CustomTitle à ajouter
- void AddCustomTitles(List customTitlesList);
-
- ///
- /// Permet d'ajouter un objet InfoTitle à l'application
- ///
- /// InfoTitle à ajouter
- void AddInfoTitle(InfoTitle title);
-
- ///
- /// Permet d'ajouter des objets InfoTitle à l'application
- ///
- /// Liste d'InfoTitle à ajouter
- void AddInfoTitles(List infoTitlesList);
-
-
-
-
- // Read
-
- ///
- /// Permet d'obtenir une liste d'objets CustomTitle
- ///
- /// Retourne une liste d'objets CustomTitle
- ObservableCollection GetCustomTitles();
-
- ///
- /// Permet d'obtenir un objet CustomTitle à partir de son chemin d'accès
- ///
- /// Chemin d'accès de l'objet CustomTitle
- /// Retourne l'objet CustomTitle avec un chemin d'accès équivalent à celui donné en paramètre
- CustomTitle GetCustomTitleByPath(string custom);
-
- ///
- /// Permet d'obtenir une liste d'objets InfoTitle
- ///
- /// Retourne une liste d'objets InfoTitle
- ObservableCollection GetInfoTitles();
-
- ///
- /// Permet d'obtenir un objet InfoTitle à partir de son nom
- ///
- /// Nom de l'objet InfoTitle
- /// Retourne l'objet InfoTitle avec un nom équivalent à celui donné en paramètre
- InfoTitle GetInfoTitleByName(string name);
-
- ///
- /// Permet d'obtenir une liste d'objets Album
- ///
- /// Retourne une liste d'objets Album
- ObservableCollection GetAlbums();
-
- ///
- /// Permet d'obtenir un objet Album à partir de son nom
- ///
- /// Nom de l'objet Album
- /// Retourne l'objet Album avec un nom équivalent à celui donné en paramètre
- Album GetAlbumByName(string name);
-
- ///
- /// Permet d'obtenir un objet Album à partir de son ID
- ///
- /// ID de l'objet Album
- /// Retourne l'objet Album avec un ID équivalent à celui donné en paramètre
- Album GetAlbumById(long id);
-
- ///
- /// Permet d'obtenir une liste d'objets Artist
- ///
- /// Retourne une liste d'objets Artist
- List GetArtists();
-
- ///
- /// Permet d'obtenir un objet Artist à partir de son nom
- ///
- /// Nom de l'objet Artist
- /// Retourne l'objet Artist avec un nom équivalent à celui donné en paramètre
- Artist GetArtistByName(string name);
-
- ///
- /// Permet d'obtenir une liste d'objets Playlist
- ///
- /// Retourne une liste d'objets Playlist
- ObservableCollection GetPlaylists();
-
- ///
- /// Permet d'obtenir un objet Playlist à partir de son nom
- ///
- /// Nom de l'objet Playlist
- /// Retourne l'objet Playlist avec un nom équivalent à celui donné en paramètre
- Playlist GetPlaylistByName(string name);
-
-
-
-
- // Update
-
- ///
- /// Modifie un objet CustomTitle avec les informations données en paramètre
- ///
- /// CustomTitle à modifier
- /// Nom de l'objet CustomTitle
- /// Chemin d'accès de l'image de l'objet CustomTitle
- /// Informations de l'objet CustomTitle
- /// Chemin d'accès de l'objet CustomTitle
- void UpdateCustomTitle(CustomTitle title, string name, string url, string info, string path);
-
- ///
- /// Modifie un objet CustomTitle avec les informations données en paramètre
- ///
- /// Chemin d'accès du CustomTitle à modifier
- /// Nom de l'objet CustomTitle
- /// Chemin d'accès de l'image de l'objet CustomTitle
- /// Informations de l'objet CustomTitle
- /// Chemin d'accès de l'objet CustomTitle
- void UpdateCustomTitleByPath(string path, string name, string newUrl, string info, string newPath);
-
- ///
- /// Modifie un objet InfoTitle avec les informations données en paramètre
- ///
- /// InfoTitle à modifier
- /// Nom de l'objet InfoTitle
- /// Chemin d'accès de l'image de l'objet InfoTitle
- /// Informations de l'objet InfoTitle
- /// Artist de l'objet InfoTitle
- /// Description de l'objet InfoTitle
- /// Genre de l'objet InfoTitle
- void UpdateInfoTitle(InfoTitle title, string name, string url, string info, Artist artist, string description, Genre genre);
-
- ///
- /// Modifie un objet InfoTitle avec les informations données en paramètre
- ///
- /// Nom de l'objet InfoTitle à modifier
- /// Chemin d'accès de l'image de l'objet InfoTitle
- /// Informations de l'objet InfoTitle
- /// Artist de l'objet InfoTitle
- /// Description de l'objet InfoTitle
- /// Genre de l'objet InfoTitle
- void UpdateInfoTitleByName(string name, string newUrl, string info, Artist artist, string description, Genre genre);
-
- ///
- /// Modifie un objet Album avec les informations données en paramètre
- ///
- /// Album à modifier
- /// Nom de l'objet Album
- /// Chemin d'accès de l'image de l'objet Album
- /// Artist de l'objet Album
- /// Description de l'objet Album
- /// Informations de l'objet Album
- void UpdateAlbum(Album album, string name, string url, Artist artist, string description, string info);
-
- ///
- /// Modifie un objet Album avec les informations données en paramètre
- ///
- /// Nom de l'objet Album à modifier
- /// Chemin d'accès de l'image de l'objet Album
- /// Artist de l'objet Album
- /// Description de l'objet Album
- /// Informations de l'objet Album
- void UpdateAlbumByName(string name, string newUrl, Artist artist, string description, string info);
-
- ///
- /// Modifie un objet Album avec les informations données en paramètre
- ///
- /// Album à modifier
- /// Nom de l'objet Album
- /// Chemin d'accès de l'image de l'objet Album
- /// Nom de l'artiste de l'objet Album
- /// Description de l'objet Album
- /// Informations de l'objet Album
- void UpdateAlbumByArtistName(Album album, string name, string url, string artist, string description, string info);
-
- ///
- /// Modifie un objet Album avec les informations données en paramètre
- ///
- /// Nom de l'objet Album à modifier
- /// Chemin d'accès de l'image de l'objet Album
- /// Nom de l'artiste de l'objet Album
- /// Description de l'objet Album
- /// Informations de l'objet Album
- void UpdateAlbumByNameByArtistName(string name, string newUrl, string artist, string description, string info);
-
- ///
- /// Modifie un objet Playlist avec les informations données en paramètre
- ///
- /// Playlist à modifier
- /// Nom de l'objet Playlist
- /// Description de l'objet Playlist
- /// Chemin d'accès de l'image de l'objet Playlist
- void UpdatePlaylist(Playlist playlist, string name, string description, string url);
-
- ///
- /// Modifie un objet Playlist avec les informations données en paramètre
- ///
- /// Nom de l'objet Playlist à modifier
- /// Description de l'objet Playlist
- /// Chemin d'accès de l'image de l'objet Playlist
- void UpdatePlaylistByName(string name, string description, string newUrl);
-
- ///
- /// Modifie un objet Artist avec les informations données en paramètre
- ///
- /// Artiste à modifier
- /// Nom de l'objet Artist
- void UpdateArtist(Artist artist, string name);
-
- ///
- /// Modifie un objet Artist avec les informations données en paramètre
- ///
- /// Nom de l'objet Artist à modifier
- /// Nouveau nom de l'objet Artist
- void UpdateArtistByName(string name, string newName);
-
-
-
-
-
- // Delete
-
- ///
- /// Permet de retirer un objet Album de l'application
- ///
- /// Album à retirer
- void RemoveAlbum(Album album);
-
- ///
- /// Permet de retirer des objets Album de l'application
- ///
- /// Liste des objets Album à retirer de l'application
- void RemoveAlbums(List albumsList);
-
- ///
- /// Permet de retirer un objet Artist de l'application
- ///
- /// Artist à retirer
- void RemoveArtist(Artist artist);
-
- ///
- /// Permet de retirer des objets Artist de l'application
- ///
- /// Liste des objets Artist à retirer de l'application
- void RemoveArtists(List artistsList);
-
- ///
- /// Permet de retirer un objet Playlist de l'application
- ///
- /// Playlist à retirer
- void RemovePlaylist(Playlist playlist);
-
- ///
- /// Permet de retirer des objets Playlist de l'application
- ///
- /// Liste des objets Playlist à retirer de l'application
- void RemovePlaylists(List playlistsList);
-
- ///
- /// Permet de retirer un objet CustomTitle de l'application
- ///
- /// CustomTitle à retirer
- void RemoveCustomTitle(CustomTitle title);
-
- ///
- /// Permet de retirer des objets CustomTitle de l'application
- ///
- /// Liste des objets CustomTitle à retirer de l'application
- void RemoveCustomTitles(List customTitlesList);
-
- ///
- /// Permet de retirer un objet InfoTitle de l'application
- ///
- /// InfoTitle à retirer
- void RemoveInfoTitle(InfoTitle title);
-
- ///
- /// Permet de retirer des objets InfoTitle de l'application
- ///
- /// Liste des objets InfoTitle à retirer de l'application
- void RemoveInfoTitles(List infoTitlesList);
-
-
-
- // Serialization
-
- ///
- /// Permet de charger les données
- ///
- void LoadSerialization();
-
- ///
- /// Permet de sauvegarder l'état de l'application
- ///
- void SaveSerialization();
-
-
-
-
- // Exists
-
- ///
- /// Permet de savoir si un objet Playlist appartient ou non à l'application
- ///
- /// Playlist à vérifier
- /// Booléen True s'il est contenu dans l'application, False sinon
- bool ExistsPlaylist(Playlist playlist);
-
- ///
- /// Permet de savoir si un objet Playlist appartient ou non à l'application selon son nom
- ///
- /// Nom de l'objet Playlist à vérifier
- /// Booléen True s'il est contenu dans l'application, False sinon
- bool ExistsPlaylistByName(string name);
-
- ///
- /// Permet de savoir si un objet Album appartient ou non à l'application
- ///
- /// Album à vérifier
- /// Booléen True s'il est contenu dans l'application, False sinon
- bool ExistsAlbum(Album album);
-
- ///
- /// Permet de savoir si un objet Album appartient ou non à l'application selon son nom
- ///
- /// Nom de l'objet Album à vérifier
- /// Booléen True s'il est contenu dans l'application, False sinon
- bool ExistsAlbumByName(string name);
-
- ///
- /// Permet de savoir si un objet Artist appartient ou non à l'application
- ///
- /// Artist à vérifier
- /// Booléen True s'il est contenu dans l'application, False sinon
- bool ExistsArtist(Artist artist);
-
- ///
- /// Permet de savoir si un objet Artist appartient ou non à l'application selon son nom
- ///
- /// Nom de l'objet Artist à vérifier
- /// Booléen True s'il est contenu dans l'application, False sinon
- bool ExistsArtistByName(string name);
-
- ///
- /// Permet de savoir si un objet CustomTitle appartient ou non à l'application selon son nom
- ///
- /// Nom de l'objet CustomTitle à vérifier
- /// Booléen True s'il est contenu dans l'application, False sinon
- bool ExistsCustomTitle(CustomTitle title);
-
- ///
- /// Permet de savoir si un objet CustomTitle appartient ou non à l'application selon son nom
- ///
- /// Nom de l'objet CustomTitle à vérifier
- /// Booléen True s'il est contenu dans l'application, False sinon
- bool ExistsCustomTitleByName(string name);
-
- ///
- /// Permet de savoir si un objet InfoTitle appartient ou non à l'application
- ///
- /// InfoTitle à vérifier
- /// Booléen True s'il est contenu dans l'application, False sinon
- bool ExistsInfoTitle(InfoTitle title);
-
- ///
- /// Permet de savoir si un objet InfoTitle appartient ou non à l'application selon son nom
- ///
- /// Nom de l'objet InfoTitle à vérifier
- /// Booléen True s'il est contenu dans l'application, False sinon
- bool ExistsInfoTitleByName(string name);
+ public interface IDataManager
+ {
+ // Create
+
+ ///
+ /// Permet d'ajouter un objet Album à l'application
+ ///
+ /// Album à ajouter
+ void AddAlbum(Album album);
+
+ ///
+ /// Permet d'ajouter des objets Album à l'application
+ ///
+ /// Liste d'Album à ajouter
+ void AddAlbums(List albumsList);
+
+ ///
+ /// Permet d'ajouter un objet Artist à l'application
+ ///
+ /// Artist à ajouter
+ void AddArtist(Artist artist);
+
+ ///
+ /// Permet d'ajouter des objets Artist à l'application
+ ///
+ /// Liste d'Artist à ajouter
+ void AddArtists(List artistsList);
+
+ ///
+ /// Permet d'ajouter un objet Playlist à l'application
+ ///
+ /// Playlist à ajouter
+ void AddPlaylist(Playlist playlist);
+
+ ///
+ /// Permet d'ajouter des objets Playlist à l'application
+ ///
+ /// Liste de Playlist à ajouter
+ void AddPlaylists(List playlistsList);
+
+ ///
+ /// Permet d'ajouter un objet CustomTitle à l'application
+ ///
+ /// CustomTitle à ajouter
+ void AddCustomTitle(CustomTitle title);
+
+ ///
+ /// Permet d'ajouter des objets CustomTitle à l'application
+ ///
+ /// Liste de CustomTitle à ajouter
+ void AddCustomTitles(List customTitlesList);
+
+ ///
+ /// Permet d'ajouter un objet InfoTitle à l'application
+ ///
+ /// InfoTitle à ajouter
+ void AddInfoTitle(InfoTitle title);
+
+ ///
+ /// Permet d'ajouter des objets InfoTitle à l'application
+ ///
+ /// Liste d'InfoTitle à ajouter
+ void AddInfoTitles(List infoTitlesList);
+
+
+
+
+ // Read
+
+ ///
+ /// Permet d'obtenir une liste d'objets CustomTitle
+ ///
+ /// Retourne une liste d'objets CustomTitle
+ ObservableCollection GetCustomTitles();
+
+ ///
+ /// Permet d'obtenir un objet CustomTitle à partir de son chemin d'accès
+ ///
+ /// Chemin d'accès de l'objet CustomTitle
+ /// Retourne l'objet CustomTitle avec un chemin d'accès équivalent à celui donné en paramètre
+ CustomTitle GetCustomTitleByPath(string custom);
+
+ ///
+ /// Permet d'obtenir une liste d'objets InfoTitle
+ ///
+ /// Retourne une liste d'objets InfoTitle
+ ObservableCollection GetInfoTitles();
+
+ ///
+ /// Permet d'obtenir un objet InfoTitle à partir de son nom
+ ///
+ /// Nom de l'objet InfoTitle
+ /// Retourne l'objet InfoTitle avec un nom équivalent à celui donné en paramètre
+ InfoTitle GetInfoTitleByName(string name);
+
+ ///
+ /// Permet d'obtenir une liste d'objets Album
+ ///
+ /// Retourne une liste d'objets Album
+ ObservableCollection GetAlbums();
+
+ ///
+ /// Permet d'obtenir un objet Album à partir de son nom
+ ///
+ /// Nom de l'objet Album
+ /// Retourne l'objet Album avec un nom équivalent à celui donné en paramètre
+ Album GetAlbumByName(string name);
+
+ ///
+ /// Permet d'obtenir un objet Album à partir de son ID
+ ///
+ /// ID de l'objet Album
+ /// Retourne l'objet Album avec un ID équivalent à celui donné en paramètre
+ Album GetAlbumById(long id);
+
+ ///
+ /// Permet d'obtenir une liste d'objets Artist
+ ///
+ /// Retourne une liste d'objets Artist
+ List GetArtists();
+
+ ///
+ /// Permet d'obtenir un objet Artist à partir de son nom
+ ///
+ /// Nom de l'objet Artist
+ /// Retourne l'objet Artist avec un nom équivalent à celui donné en paramètre
+ Artist GetArtistByName(string name);
+
+ ///
+ /// Permet d'obtenir une liste d'objets Playlist
+ ///
+ /// Retourne une liste d'objets Playlist
+ ObservableCollection GetPlaylists();
+
+ ///
+ /// Permet d'obtenir un objet Playlist à partir de son nom
+ ///
+ /// Nom de l'objet Playlist
+ /// Retourne l'objet Playlist avec un nom équivalent à celui donné en paramètre
+ Playlist GetPlaylistByName(string name);
+
+
+
+
+ // Update
+
+ ///
+ /// Modifie un objet CustomTitle avec les informations données en paramètre
+ ///
+ /// CustomTitle à modifier
+ /// Nom de l'objet CustomTitle
+ /// Chemin d'accès de l'image de l'objet CustomTitle
+ /// Informations de l'objet CustomTitle
+ /// Chemin d'accès de l'objet CustomTitle
+ void UpdateCustomTitle(CustomTitle title, string name, string url, string info, string path);
+
+ ///
+ /// Modifie un objet CustomTitle avec les informations données en paramètre
+ ///
+ /// Chemin d'accès du CustomTitle à modifier
+ /// Nom de l'objet CustomTitle
+ /// Chemin d'accès de l'image de l'objet CustomTitle
+ /// Informations de l'objet CustomTitle
+ /// Chemin d'accès de l'objet CustomTitle
+ void UpdateCustomTitleByPath(string path, string name, string newUrl, string info, string newPath);
+
+ ///
+ /// Modifie un objet InfoTitle avec les informations données en paramètre
+ ///
+ /// InfoTitle à modifier
+ /// Nom de l'objet InfoTitle
+ /// Chemin d'accès de l'image de l'objet InfoTitle
+ /// Informations de l'objet InfoTitle
+ /// Artist de l'objet InfoTitle
+ /// Description de l'objet InfoTitle
+ /// Genre de l'objet InfoTitle
+ void UpdateInfoTitle(InfoTitle title, string name, string url, string info, Artist artist, string description, Genre genre);
+
+ ///
+ /// Modifie un objet InfoTitle avec les informations données en paramètre
+ ///
+ /// Nom de l'objet InfoTitle à modifier
+ /// Chemin d'accès de l'image de l'objet InfoTitle
+ /// Informations de l'objet InfoTitle
+ /// Artist de l'objet InfoTitle
+ /// Description de l'objet InfoTitle
+ /// Genre de l'objet InfoTitle
+ void UpdateInfoTitleByName(string name, string newUrl, string info, Artist artist, string description, Genre genre);
+
+ ///
+ /// Modifie un objet Album avec les informations données en paramètre
+ ///
+ /// Album à modifier
+ /// Nom de l'objet Album
+ /// Chemin d'accès de l'image de l'objet Album
+ /// Artist de l'objet Album
+ /// Description de l'objet Album
+ /// Informations de l'objet Album
+ void UpdateAlbum(Album album, string name, string url, Artist artist, string description, string info);
+
+ ///
+ /// Modifie un objet Album avec les informations données en paramètre
+ ///
+ /// Nom de l'objet Album à modifier
+ /// Chemin d'accès de l'image de l'objet Album
+ /// Artist de l'objet Album
+ /// Description de l'objet Album
+ /// Informations de l'objet Album
+ void UpdateAlbumByName(string name, string newUrl, Artist artist, string description, string info);
+
+ ///
+ /// Modifie un objet Album avec les informations données en paramètre
+ ///
+ /// Album à modifier
+ /// Nom de l'objet Album
+ /// Chemin d'accès de l'image de l'objet Album
+ /// Nom de l'artiste de l'objet Album
+ /// Description de l'objet Album
+ /// Informations de l'objet Album
+ void UpdateAlbumByArtistName(Album album, string name, string url, string artist, string description, string info);
+
+ ///
+ /// Modifie un objet Album avec les informations données en paramètre
+ ///
+ /// Nom de l'objet Album à modifier
+ /// Chemin d'accès de l'image de l'objet Album
+ /// Nom de l'artiste de l'objet Album
+ /// Description de l'objet Album
+ /// Informations de l'objet Album
+ void UpdateAlbumByNameByArtistName(string name, string newUrl, string artist, string description, string info);
+
+ ///
+ /// Modifie un objet Playlist avec les informations données en paramètre
+ ///
+ /// Playlist à modifier
+ /// Nom de l'objet Playlist
+ /// Description de l'objet Playlist
+ /// Chemin d'accès de l'image de l'objet Playlist
+ void UpdatePlaylist(Playlist playlist, string name, string description, string url);
+
+ ///
+ /// Modifie un objet Playlist avec les informations données en paramètre
+ ///
+ /// Nom de l'objet Playlist à modifier
+ /// Description de l'objet Playlist
+ /// Chemin d'accès de l'image de l'objet Playlist
+ void UpdatePlaylistByName(string name, string description, string newUrl);
+
+ ///
+ /// Modifie un objet Artist avec les informations données en paramètre
+ ///
+ /// Artiste à modifier
+ /// Nom de l'objet Artist
+ void UpdateArtist(Artist artist, string name);
+
+ ///
+ /// Modifie un objet Artist avec les informations données en paramètre
+ ///
+ /// Nom de l'objet Artist à modifier
+ /// Nouveau nom de l'objet Artist
+ void UpdateArtistByName(string name, string newName);
+
+
+
+
+
+ // Delete
+
+ ///
+ /// Permet de retirer un objet Album de l'application
+ ///
+ /// Album à retirer
+ void RemoveAlbum(Album album);
+
+ ///
+ /// Permet de retirer des objets Album de l'application
+ ///
+ /// Liste des objets Album à retirer de l'application
+ void RemoveAlbums(List albumsList);
+
+ ///
+ /// Permet de retirer un objet Artist de l'application
+ ///
+ /// Artist à retirer
+ void RemoveArtist(Artist artist);
+
+ ///
+ /// Permet de retirer des objets Artist de l'application
+ ///
+ /// Liste des objets Artist à retirer de l'application
+ void RemoveArtists(List artistsList);
+
+ ///
+ /// Permet de retirer un objet Playlist de l'application
+ ///
+ /// Playlist à retirer
+ void RemovePlaylist(Playlist playlist);
+
+ ///
+ /// Permet de retirer des objets Playlist de l'application
+ ///
+ /// Liste des objets Playlist à retirer de l'application
+ void RemovePlaylists(List playlistsList);
+
+ ///
+ /// Permet de retirer un objet CustomTitle de l'application
+ ///
+ /// CustomTitle à retirer
+ void RemoveCustomTitle(CustomTitle title);
+
+ ///
+ /// Permet de retirer des objets CustomTitle de l'application
+ ///
+ /// Liste des objets CustomTitle à retirer de l'application
+ void RemoveCustomTitles(List customTitlesList);
+
+ ///
+ /// Permet de retirer un objet InfoTitle de l'application
+ ///
+ /// InfoTitle à retirer
+ void RemoveInfoTitle(InfoTitle title);
+
+ ///
+ /// Permet de retirer des objets InfoTitle de l'application
+ ///
+ /// Liste des objets InfoTitle à retirer de l'application
+ void RemoveInfoTitles(List infoTitlesList);
+
+
+
+ // Serialization
+
+ ///
+ /// Permet de charger les données
+ ///
+ void LoadSerialization();
+
+ ///
+ /// Permet de sauvegarder l'état de l'application
+ ///
+ void SaveSerialization();
+
+
+
+
+ // Exists
+
+ ///
+ /// Permet de savoir si un objet Playlist appartient ou non à l'application
+ ///
+ /// Playlist à vérifier
+ /// Booléen True s'il est contenu dans l'application, False sinon
+ bool ExistsPlaylist(Playlist playlist);
+
+ ///
+ /// Permet de savoir si un objet Playlist appartient ou non à l'application selon son nom
+ ///
+ /// Nom de l'objet Playlist à vérifier
+ /// Booléen True s'il est contenu dans l'application, False sinon
+ bool ExistsPlaylistByName(string name);
+
+ ///
+ /// Permet de savoir si un objet Album appartient ou non à l'application
+ ///
+ /// Album à vérifier
+ /// Booléen True s'il est contenu dans l'application, False sinon
+ bool ExistsAlbum(Album album);
+
+ ///
+ /// Permet de savoir si un objet Album appartient ou non à l'application selon son nom
+ ///
+ /// Nom de l'objet Album à vérifier
+ /// Booléen True s'il est contenu dans l'application, False sinon
+ bool ExistsAlbumByName(string name);
+
+ ///
+ /// Permet de savoir si un objet Artist appartient ou non à l'application
+ ///
+ /// Artist à vérifier
+ /// Booléen True s'il est contenu dans l'application, False sinon
+ bool ExistsArtist(Artist artist);
+
+ ///
+ /// Permet de savoir si un objet Artist appartient ou non à l'application selon son nom
+ ///
+ /// Nom de l'objet Artist à vérifier
+ /// Booléen True s'il est contenu dans l'application, False sinon
+ bool ExistsArtistByName(string name);
+
+ ///
+ /// Permet de savoir si un objet CustomTitle appartient ou non à l'application selon son nom
+ ///
+ /// Nom de l'objet CustomTitle à vérifier
+ /// Booléen True s'il est contenu dans l'application, False sinon
+ bool ExistsCustomTitle(CustomTitle title);
+
+ ///
+ /// Permet de savoir si un objet CustomTitle appartient ou non à l'application selon son nom
+ ///
+ /// Nom de l'objet CustomTitle à vérifier
+ /// Booléen True s'il est contenu dans l'application, False sinon
+ bool ExistsCustomTitleByName(string name);
+
+ ///
+ /// Permet de savoir si un objet InfoTitle appartient ou non à l'application
+ ///
+ /// InfoTitle à vérifier
+ /// Booléen True s'il est contenu dans l'application, False sinon
+ bool ExistsInfoTitle(InfoTitle title);
+
+ ///
+ /// Permet de savoir si un objet InfoTitle appartient ou non à l'application selon son nom
+ ///
+ /// Nom de l'objet InfoTitle à vérifier
+ /// Booléen True s'il est contenu dans l'application, False sinon
+ bool ExistsInfoTitleByName(string name);
+ }
}
\ No newline at end of file
diff --git a/Sources/Model/InfoTitle.cs b/Sources/Model/InfoTitle.cs
index 4905cf9..5aa8953 100644
--- a/Sources/Model/InfoTitle.cs
+++ b/Sources/Model/InfoTitle.cs
@@ -1,125 +1,126 @@
using System.Xml.Serialization;
using Model.Stub;
-namespace Model;
-
-public class InfoTitle : Title
+namespace Model
{
///
/// Classe InfoTitle
///
-
- public string Description
+ public class InfoTitle : Title
{
- get => description;
- set
+ public string Description
{
- if (value != null && value.Length < Manager.MAX_DESCRIPTION_LENGTH)
+ get => description;
+
+ set
{
- description = value;
+ if (value != null && value.Length < Manager.MAX_DESCRIPTION_LENGTH)
+ {
+ description = value;
+ }
}
}
- }
- private string description = Manager.DEFAULT_DESC;
+ private string description = Manager.DEFAULT_DESC;
- private List feat = new List();
+ private List feat = new List();
- public IEnumerable Feat
- {
- get
+ public IEnumerable Feat
{
- return new List(feat);
+ get
+ {
+ return new List(feat);
+ }
}
- }
- public Genre Genre { get; set; }
+ public Genre Genre { get; set; }
- private long albumID;
+ private long albumID;
- public long AlbumID
- {
- get => albumID;
- set
+ public long AlbumID
{
- albumID = value;
+ get => albumID;
+ set
+ {
+ albumID = value;
+ }
}
- }
- ///
- /// Constructeur de la classe InfoTitle
- ///
- /// Nom de l'InfoTitle
- /// Chemin d'accès de l'image de l'InfoTitle
- /// Informations complémentaires sur l'InfoTitle
- /// Description de l'InfoTitle
- /// Genre de l'InfoTitle
- /// ID de l'album auquel appartient l'InfoTitle
- public InfoTitle(string name, string imageURL, string information, string description, Genre genre, long albumID) : base(name,imageURL,information)
- {
- Description = description;
- Genre = genre;
- AlbumID = albumID;
- }
+ ///
+ /// Constructeur de la classe InfoTitle
+ ///
+ /// Nom de l'InfoTitle
+ /// Chemin d'accès de l'image de l'InfoTitle
+ /// Informations complémentaires sur l'InfoTitle
+ /// Description de l'InfoTitle
+ /// Genre de l'InfoTitle
+ /// ID de l'album auquel appartient l'InfoTitle
+ public InfoTitle(string name, string imageURL, string information, string description, Genre genre, long albumID) : base(name, imageURL, information)
+ {
+ Description = description;
+ Genre = genre;
+ AlbumID = albumID;
+ }
- ///
- /// Constructeur par défaut de la classe InfoTitle
- ///
- public InfoTitle() : base(Manager.DEFAULT_NAME, Manager.DEFAULT_URL, Manager.DEFAULT_DESC)
- {
-
- }
+ ///
+ /// Constructeur par défaut de la classe InfoTitle
+ ///
+ public InfoTitle() : base(Manager.DEFAULT_NAME, Manager.DEFAULT_URL, Manager.DEFAULT_DESC)
+ {
- ///
- /// Ajoute un artiste en tant que Feat de l'InfoTitle
- ///
- ///
- public void AddFeat(Artist artist)
- {
- feat.Add(artist);
- }
+ }
- ///
- /// Enlève un artiste des feats de l'InfoTitle
- ///
- ///
- public void RemoveFeat(Artist artiste)
- {
- foreach (var item in Feat)
+ ///
+ /// Ajoute un artiste en tant que Feat de l'InfoTitle
+ ///
+ ///
+ public void AddFeat(Artist artist)
{
- feat = Feat.Where(item => item != artiste).ToList();
+ feat.Add(artist);
}
- }
- ///
- /// Fonction qui permet de déterminer si deux objets InfoTitle sont égaux
- ///
- ///
- /// Un booléen indiquant si l'objet est égal
- public override bool Equals(object obj)
- {
- if (obj is null) return false;
- if (obj.GetType() != typeof(InfoTitle)) return false;
- if (obj is InfoTitle infoTitle && Name == infoTitle.Name) return true;
- else return false;
- }
+ ///
+ /// Enlève un artiste des feats de l'InfoTitle
+ ///
+ ///
+ public void RemoveFeat(Artist artiste)
+ {
+ foreach (var item in Feat)
+ {
+ feat = Feat.Where(item => item != artiste).ToList();
+ }
+ }
- ///
- /// Permet de déterminer le hash d'un objet InfoTitle
- ///
- /// Hash de l'attribut Name
- public override int GetHashCode()
- {
- return Name.GetHashCode();
- }
+ ///
+ /// Fonction qui permet de déterminer si deux objets InfoTitle sont égaux
+ ///
+ ///
+ /// Un booléen indiquant si l'objet est égal
+ public override bool Equals(object obj)
+ {
+ if (obj is null) return false;
+ if (obj.GetType() != typeof(InfoTitle)) return false;
+ if (obj is InfoTitle infoTitle && Name == infoTitle.Name) return true;
+ else return false;
+ }
- ///
- /// Permet de convertir un objet InfoTitle en string
- ///
- /// Une nouvelle chaîne caractères contenant le nom de l'InfoTitle et le chemin d'accès à l'image
- public override string ToString()
- {
- return $"Name : {Name}, ImageUrl : {ImageURL}";
+ ///
+ /// Permet de déterminer le hash d'un objet InfoTitle
+ ///
+ /// Hash de l'attribut Name
+ public override int GetHashCode()
+ {
+ return Name.GetHashCode();
+ }
+
+ ///
+ /// Permet de convertir un objet InfoTitle en string
+ ///
+ /// Une nouvelle chaîne caractères contenant le nom de l'InfoTitle et le chemin d'accès à l'image
+ public override string ToString()
+ {
+ return $"Name : {Name}, ImageUrl : {ImageURL}";
+ }
}
}
\ No newline at end of file
diff --git a/Sources/Model/Manager.cs b/Sources/Model/Manager.cs
index 25fab19..f3de266 100644
--- a/Sources/Model/Manager.cs
+++ b/Sources/Model/Manager.cs
@@ -2,445 +2,446 @@
using System.ComponentModel;
using System.Runtime.CompilerServices;
-namespace Model.Stub;
-
-public class Manager : INotifyPropertyChanged
+namespace Model.Stub
{
///
/// Classe Manager
///
-
- public event PropertyChangedEventHandler PropertyChanged;
+ public class Manager : INotifyPropertyChanged
+ {
- public readonly static int MAX_NAME_LENGTH = 75;
+ public event PropertyChangedEventHandler PropertyChanged;
- public readonly static int MAX_DESCRIPTION_LENGTH = 500;
+ public readonly static int MAX_NAME_LENGTH = 75;
- public readonly static string DEFAULT_NAME = "Unknown";
+ public readonly static int MAX_DESCRIPTION_LENGTH = 500;
- public readonly static string DEFAULT_URL = "none.png";
+ public readonly static string DEFAULT_NAME = "Unknown";
- public readonly static string DEFAULT_DESC = "";
+ public readonly static string DEFAULT_URL = "none.png";
- public IDataManager DataManager { get; set; }
+ public readonly static string DEFAULT_DESC = "";
- private ObservableCollection albums;
+ public IDataManager DataManager { get; set; }
- public ObservableCollection Albums
- {
- get
+ private ObservableCollection albums;
+
+ public ObservableCollection Albums
{
- return new ObservableCollection(albums);
+ get
+ {
+ return new ObservableCollection(albums);
+ }
}
- }
- private ObservableCollection customTitles;
+ private ObservableCollection customTitles;
- public ObservableCollection CustomTitles
- {
- get
+ public ObservableCollection CustomTitles
{
- return new ObservableCollection(customTitles);
+ get
+ {
+ return new ObservableCollection(customTitles);
+ }
}
- }
- private ObservableCollection infoTitles;
+ private ObservableCollection infoTitles;
- public ObservableCollection InfoTitles
- {
- get
+ public ObservableCollection InfoTitles
{
- return new ObservableCollection(infoTitles);
+ get
+ {
+ return new ObservableCollection(infoTitles);
+ }
}
- }
- private ObservableCollection playlists;
+ private ObservableCollection playlists;
- public ObservableCollection Playlists
- {
- get
+ public ObservableCollection Playlists
{
- return new ObservableCollection(playlists);
+ get
+ {
+ return new ObservableCollection(playlists);
+ }
}
- }
- private List artists;
+ private List artists;
- public IEnumerable Artists
- {
- get
+ public IEnumerable Artists
{
- return new List(artists);
+ get
+ {
+ return new List(artists);
+ }
}
- }
- private Album currentAlbum;
+ private Album currentAlbum;
- public Album CurrentAlbum
- {
- get => currentAlbum;
- set
+ public Album CurrentAlbum
{
- currentAlbum = value;
- OnPropertyChanged();
+ get => currentAlbum;
+ set
+ {
+ currentAlbum = value;
+ OnPropertyChanged();
+ }
}
- }
- private Playlist currentPlaylist;
+ private Playlist currentPlaylist;
- public Playlist CurrentPlaylist
- {
- get => currentPlaylist;
- set
+ public Playlist CurrentPlaylist
{
- currentPlaylist = value;
- OnPropertyChanged();
+ get => currentPlaylist;
+ set
+ {
+ currentPlaylist = value;
+ OnPropertyChanged();
+ }
}
- }
- private InfoTitle currentInfoTitle;
+ private InfoTitle currentInfoTitle;
- public InfoTitle CurrentInfoTitle
- {
- get => currentInfoTitle;
- set
+ public InfoTitle CurrentInfoTitle
{
- currentInfoTitle = value;
- OnPropertyChanged();
+ get => currentInfoTitle;
+ set
+ {
+ currentInfoTitle = value;
+ OnPropertyChanged();
+ }
}
- }
- private CustomTitle currentPlaying;
+ private CustomTitle currentPlaying;
- public CustomTitle CurrentPlaying
- {
- get => currentPlaying;
- set
+ public CustomTitle CurrentPlaying
{
- currentPlaying = value;
- OnPropertyChanged();
+ get => currentPlaying;
+ set
+ {
+ currentPlaying = value;
+ OnPropertyChanged();
+ }
}
- }
- private Dictionary> albumsFromArtist;
+ private Dictionary> albumsFromArtist;
- public Dictionary> AlbumsFromArtist
- {
- get => albumsFromArtist;
- set
+ public Dictionary> AlbumsFromArtist
{
- albumsFromArtist = value;
+ get => albumsFromArtist;
+ set
+ {
+ albumsFromArtist = value;
+ }
}
- }
- private Dictionary> infoTitlesFromArtist;
+ private Dictionary> infoTitlesFromArtist;
- public Dictionary> InfoTitlesFromArtist
- {
- get => infoTitlesFromArtist;
- set
+ public Dictionary> InfoTitlesFromArtist
{
- infoTitlesFromArtist = value;
+ get => infoTitlesFromArtist;
+ set
+ {
+ infoTitlesFromArtist = value;
+ }
}
- }
- ///
- /// Constructeur de la classe Manager
- ///
- /// Méthode de sérialisation, gestionnaire des données
- public Manager(IDataManager dataManager)
- {
- DataManager = dataManager;
+ ///
+ /// Constructeur de la classe Manager
+ ///
+ /// Méthode de sérialisation, gestionnaire des données
+ public Manager(IDataManager dataManager)
+ {
+ DataManager = dataManager;
- albums = DataManager.GetAlbums();
- customTitles = DataManager.GetCustomTitles();
- infoTitles = DataManager.GetInfoTitles();
- playlists = DataManager.GetPlaylists();
- artists = DataManager.GetArtists();
+ albums = DataManager.GetAlbums();
+ customTitles = DataManager.GetCustomTitles();
+ infoTitles = DataManager.GetInfoTitles();
+ playlists = DataManager.GetPlaylists();
+ artists = DataManager.GetArtists();
- currentAlbum = albums.First();
- currentPlaylist = playlists.FirstOrDefault();
- currentInfoTitle = null;
- currentPlaying = null;
+ currentAlbum = albums.First();
+ currentPlaylist = playlists.FirstOrDefault();
+ currentInfoTitle = null;
+ currentPlaying = null;
- LoadDictionaries();
- }
+ LoadDictionaries();
+ }
- ///
- /// Remplis les dictionnaire grâce aux stubs et à LINQ
- ///
- public void LoadDictionaries()
- {
- albumsFromArtist = albums.GroupBy(album => album.Artist.Name).ToDictionary(group => group.Key, group => group.AsEnumerable());
- infoTitlesFromArtist = infoTitles.GroupBy(infoTitle => GetAlbumById(infoTitle.AlbumID).Artist.Name).ToDictionary(group => group.Key, group => group.AsEnumerable());
- }
+ ///
+ /// Remplis les dictionnaire grâce aux stubs et à LINQ
+ ///
+ public void LoadDictionaries()
+ {
+ albumsFromArtist = albums.GroupBy(album => album.Artist.Name).ToDictionary(group => group.Key, group => group.AsEnumerable());
+ infoTitlesFromArtist = infoTitles.GroupBy(infoTitle => GetAlbumById(infoTitle.AlbumID).Artist.Name).ToDictionary(group => group.Key, group => group.AsEnumerable());
+ }
- ///
- /// Actualise le morceau en cours CurrentTitle avec le morceau suivant
- ///
- public void NextTitle()
- {
- if (currentPlaylist == null) return;
- currentPlaying = currentPlaylist.NextTitle();
- }
+ ///
+ /// Actualise le morceau en cours CurrentTitle avec le morceau suivant
+ ///
+ public void NextTitle()
+ {
+ if (currentPlaylist == null) return;
+ currentPlaying = currentPlaylist.NextTitle();
+ }
- ///
- /// Actualise le morceau en cours CurrentTitle avec le morceau précédent
- ///
- public void PreviousTitle()
- {
- if (CurrentPlaying == null) return;
- currentPlaying = currentPlaylist.PreviousTitle();
- }
+ ///
+ /// Actualise le morceau en cours CurrentTitle avec le morceau précédent
+ ///
+ public void PreviousTitle()
+ {
+ if (CurrentPlaying == null) return;
+ currentPlaying = currentPlaylist.PreviousTitle();
+ }
- ///
- /// Permet de connaître le titre en cours
- ///
- /// Retourne le titre actuel
- public CustomTitle CurrentTitle()
- {
- if (CurrentPlaylist == null) return null;
- return currentPlaylist.GetCurrentTitle();
- }
+ ///
+ /// Permet de connaître le titre en cours
+ ///
+ /// Retourne le titre actuel
+ public CustomTitle CurrentTitle()
+ {
+ if (CurrentPlaylist == null) return null;
+ return currentPlaylist.GetCurrentTitle();
+ }
- ///
- /// Permet d'activer/désactiver l'option de boucle
- ///
- public void Loop()
- {
- if (CurrentPlaylist == null) return;
- currentPlaylist.LoopTitle = !currentPlaylist.LoopTitle;
- }
+ ///
+ /// Permet d'activer/désactiver l'option de boucle
+ ///
+ public void Loop()
+ {
+ if (CurrentPlaylist == null) return;
+ currentPlaylist.LoopTitle = !currentPlaylist.LoopTitle;
+ }
- ///
- /// Permet d'activer/désactiver l'option de l'aléatoire
- ///
- public void Shuffle()
- {
- if (CurrentPlaylist == null) return;
- currentPlaylist.Shuffle = !currentPlaylist.Shuffle;
- }
+ ///
+ /// Permet d'activer/désactiver l'option de l'aléatoire
+ ///
+ public void Shuffle()
+ {
+ if (CurrentPlaylist == null) return;
+ currentPlaylist.Shuffle = !currentPlaylist.Shuffle;
+ }
- ///
- /// Permet d'ajouter un Album à l'application
- ///
- /// Album à ajouter
- public void AddAlbum(Album album)
- {
- if (GetAlbumByName(album.Name) != null) return;
- DataManager.AddAlbum(album);
- albums = DataManager.GetAlbums();
- }
+ ///
+ /// Permet d'ajouter un Album à l'application
+ ///
+ /// Album à ajouter
+ public void AddAlbum(Album album)
+ {
+ if (GetAlbumByName(album.Name) != null) return;
+ DataManager.AddAlbum(album);
+ albums = DataManager.GetAlbums();
+ }
- ///
- /// Permet d'ajouter un CustomTitle à l'application
- ///
- /// CustomTitle à ajouter
- public void AddCustomTitle(CustomTitle title)
- {
- if (GetInfoTitleByName(title.Name) != null) return;
- DataManager.AddCustomTitle(title);
- customTitles = DataManager.GetCustomTitles();
- }
+ ///
+ /// Permet d'ajouter un CustomTitle à l'application
+ ///
+ /// CustomTitle à ajouter
+ public void AddCustomTitle(CustomTitle title)
+ {
+ if (GetInfoTitleByName(title.Name) != null) return;
+ DataManager.AddCustomTitle(title);
+ customTitles = DataManager.GetCustomTitles();
+ }
- ///
- /// Permet d'ajouter un InfoTitle à l'application
- ///
- /// InfoTitle à ajouter
- public void AddInfoTitle(InfoTitle title)
- {
- if (GetInfoTitleByName(title.Name) != null) return;
- DataManager.AddInfoTitle(title);
- infoTitles = DataManager.GetInfoTitles();
- }
+ ///
+ /// Permet d'ajouter un InfoTitle à l'application
+ ///
+ /// InfoTitle à ajouter
+ public void AddInfoTitle(InfoTitle title)
+ {
+ if (GetInfoTitleByName(title.Name) != null) return;
+ DataManager.AddInfoTitle(title);
+ infoTitles = DataManager.GetInfoTitles();
+ }
- ///
- /// Permet d'ajouter une Playlist à l'application
- ///
- /// Playlist à ajouter
- public void AddPlaylist(Playlist playlist)
- {
- if (GetPlaylistByName(playlist.Name) != null) return;
- DataManager.AddPlaylist(playlist);
- playlists = DataManager.GetPlaylists();
- }
+ ///
+ /// Permet d'ajouter une Playlist à l'application
+ ///
+ /// Playlist à ajouter
+ public void AddPlaylist(Playlist playlist)
+ {
+ if (GetPlaylistByName(playlist.Name) != null) return;
+ DataManager.AddPlaylist(playlist);
+ playlists = DataManager.GetPlaylists();
+ }
- ///
- /// Permet d'ajouter un Artist à l'application
- ///
- /// Artist à ajouter
- public void AddArtist(Artist artist)
- {
- if (GetArtistByName(artist.Name) != null) return;
- DataManager.AddArtist(artist);
- artists = DataManager.GetArtists();
- }
+ ///
+ /// Permet d'ajouter un Artist à l'application
+ ///
+ /// Artist à ajouter
+ public void AddArtist(Artist artist)
+ {
+ if (GetArtistByName(artist.Name) != null) return;
+ DataManager.AddArtist(artist);
+ artists = DataManager.GetArtists();
+ }
- ///
- /// Permet de retirer un Album de l'application
- ///
- /// Album à retirer
- public void RemoveAlbum(Album album)
- {
- DataManager.RemoveAlbum(album);
- albums = DataManager.GetAlbums();
- }
+ ///
+ /// Permet de retirer un Album de l'application
+ ///
+ /// Album à retirer
+ public void RemoveAlbum(Album album)
+ {
+ DataManager.RemoveAlbum(album);
+ albums = DataManager.GetAlbums();
+ }
- ///
- /// Permet de retirer un CustomTitle de l'application
- ///
- /// CustomTitle à retirer
- public void RemoveCustomTitle(CustomTitle title)
- {
- DataManager.RemoveCustomTitle(title);
- customTitles = DataManager.GetCustomTitles();
- }
+ ///
+ /// Permet de retirer un CustomTitle de l'application
+ ///
+ /// CustomTitle à retirer
+ public void RemoveCustomTitle(CustomTitle title)
+ {
+ DataManager.RemoveCustomTitle(title);
+ customTitles = DataManager.GetCustomTitles();
+ }
- ///
- /// Permet de retirer un InfoTitle de l'application
- ///
- /// InfoTitle à retirer
- public void RemoveInfoTitle(InfoTitle title)
- {
- DataManager.RemoveInfoTitle(title);
- infoTitles = DataManager.GetInfoTitles();
- }
+ ///
+ /// Permet de retirer un InfoTitle de l'application
+ ///
+ /// InfoTitle à retirer
+ public void RemoveInfoTitle(InfoTitle title)
+ {
+ DataManager.RemoveInfoTitle(title);
+ infoTitles = DataManager.GetInfoTitles();
+ }
- ///
- /// Permet de retirer une Playlist de l'application
- ///
- /// Playlist à retirer
- public void RemovePlaylist(Playlist playlist)
- {
- DataManager.RemovePlaylist(playlist);
- playlists = DataManager.GetPlaylists();
- }
+ ///
+ /// Permet de retirer une Playlist de l'application
+ ///
+ /// Playlist à retirer
+ public void RemovePlaylist(Playlist playlist)
+ {
+ DataManager.RemovePlaylist(playlist);
+ playlists = DataManager.GetPlaylists();
+ }
- ///
- /// Permet d'obtenir la liste des objets Playlist de l'application
- ///
- /// Reourne la liste des objets Playlist de l'application
- public ObservableCollection GetPlaylists()
- {
- return DataManager.GetPlaylists();
- }
+ ///
+ /// Permet d'obtenir la liste des objets Playlist de l'application
+ ///
+ /// Reourne la liste des objets Playlist de l'application
+ public ObservableCollection GetPlaylists()
+ {
+ return DataManager.GetPlaylists();
+ }
- ///
- /// Permet d'obtenir la liste des objets Album de l'application
- ///
- /// Reourne la liste des objets Album de l'application
- public ObservableCollection GetAlbums()
- {
- return DataManager.GetAlbums();
- }
+ ///
+ /// Permet d'obtenir la liste des objets Album de l'application
+ ///
+ /// Reourne la liste des objets Album de l'application
+ public ObservableCollection GetAlbums()
+ {
+ return DataManager.GetAlbums();
+ }
- ///
- /// Permet d'obtenir la liste des objets CustomTitle de l'application
- ///
- /// Reourne la liste des objets CustomTitle de l'application
- public ObservableCollection GetCustomTitles()
- {
- return DataManager.GetCustomTitles();
- }
+ ///
+ /// Permet d'obtenir la liste des objets CustomTitle de l'application
+ ///
+ /// Reourne la liste des objets CustomTitle de l'application
+ public ObservableCollection GetCustomTitles()
+ {
+ return DataManager.GetCustomTitles();
+ }
- ///
- /// Permet d'obtenir la liste des objets InfoTitle de l'application
- ///
- /// Reourne la liste des objets InfoTitle de l'application
- public ObservableCollection GetInfoTitles()
- {
- return DataManager.GetInfoTitles();
- }
+ ///
+ /// Permet d'obtenir la liste des objets InfoTitle de l'application
+ ///
+ /// Reourne la liste des objets InfoTitle de l'application
+ public ObservableCollection GetInfoTitles()
+ {
+ return DataManager.GetInfoTitles();
+ }
- ///
- /// Permet d'obtenir la liste des objets Artist de l'application
- ///
- /// Reourne la liste des objets Artist de l'application
- public IEnumerable GetArtists()
- {
- return DataManager.GetArtists();
- }
+ ///
+ /// Permet d'obtenir la liste des objets Artist de l'application
+ ///
+ /// Reourne la liste des objets Artist de l'application
+ public IEnumerable GetArtists()
+ {
+ return DataManager.GetArtists();
+ }
- ///
- /// Permet de charger l'état sauvegardé précédemment dans l'application
- ///
- public void LoadSerialization()
- {
- DataManager.LoadSerialization();
- }
+ ///
+ /// Permet de charger l'état sauvegardé précédemment dans l'application
+ ///
+ public void LoadSerialization()
+ {
+ DataManager.LoadSerialization();
+ }
- ///
- /// Permet de sauvegarder l'état de l'application
- ///
- public void SaveSerialization()
- {
- DataManager.SaveSerialization();
- }
+ ///
+ /// Permet de sauvegarder l'état de l'application
+ ///
+ public void SaveSerialization()
+ {
+ DataManager.SaveSerialization();
+ }
- ///
- /// Permet d'obtenir une Playlist selon son nom
- ///
- /// Nom de la Playlist
- /// Retourne la Playlist correspondant au nom donné en paramètre
- public Playlist GetPlaylistByName(string name)
- {
- return DataManager.GetPlaylistByName(name);
- }
+ ///
+ /// Permet d'obtenir une Playlist selon son nom
+ ///
+ /// Nom de la Playlist
+ /// Retourne la Playlist correspondant au nom donné en paramètre
+ public Playlist GetPlaylistByName(string name)
+ {
+ return DataManager.GetPlaylistByName(name);
+ }
- ///
- /// Permet d'obtenir un Artist selon son nom
- ///
- /// Nom de l'Artist
- /// Retourne l'Artist correspondant au nom donné en paramètre
- public Artist GetArtistByName(string name)
- {
- return DataManager.GetArtistByName(name);
- }
+ ///
+ /// Permet d'obtenir un Artist selon son nom
+ ///
+ /// Nom de l'Artist
+ /// Retourne l'Artist correspondant au nom donné en paramètre
+ public Artist GetArtistByName(string name)
+ {
+ return DataManager.GetArtistByName(name);
+ }
- ///
- /// Permet d'obtenir un CustomTitle selon son chemin d'accès
- ///
- /// Chemin d'accès du CustomTitle
- /// Retourne le CustomTitle correspondant au chemin d'accès donné en paramètre
- public CustomTitle GetCustomTitleByPath(string path)
- {
- return DataManager.GetCustomTitleByPath(path);
- }
+ ///
+ /// Permet d'obtenir un CustomTitle selon son chemin d'accès
+ ///
+ /// Chemin d'accès du CustomTitle
+ /// Retourne le CustomTitle correspondant au chemin d'accès donné en paramètre
+ public CustomTitle GetCustomTitleByPath(string path)
+ {
+ return DataManager.GetCustomTitleByPath(path);
+ }
- ///
- /// Permet d'obtenir un InfoTitle selon son nom
- ///
- /// Nom de l'InfoTitle
- /// Retourne l'InfoTitle correspondant au nom donné en paramètre
- public InfoTitle GetInfoTitleByName(string name)
- {
- return DataManager.GetInfoTitleByName(name);
- }
+ ///
+ /// Permet d'obtenir un InfoTitle selon son nom
+ ///
+ /// Nom de l'InfoTitle
+ /// Retourne l'InfoTitle correspondant au nom donné en paramètre
+ public InfoTitle GetInfoTitleByName(string name)
+ {
+ return DataManager.GetInfoTitleByName(name);
+ }
- ///
- /// Permet d'obtenir un Album selon son nom
- ///
- /// Nom de l'Album
- /// Retourne l'Album correspondant au nom donné en paramètre
- public Album GetAlbumByName(string name)
- {
- return DataManager.GetAlbumByName(name);
- }
+ ///
+ /// Permet d'obtenir un Album selon son nom
+ ///
+ /// Nom de l'Album
+ /// Retourne l'Album correspondant au nom donné en paramètre
+ public Album GetAlbumByName(string name)
+ {
+ return DataManager.GetAlbumByName(name);
+ }
- ///
- /// Permet d'obtenir un Album selon son ID
- ///
- /// ID de l'Album
- /// Retourne l'Album correspondant au ID donné en paramètre
- public Album GetAlbumById(long id)
- {
- return DataManager.GetAlbumById(id);
- }
+ ///
+ /// Permet d'obtenir un Album selon son ID
+ ///
+ /// ID de l'Album
+ /// Retourne l'Album correspondant au ID donné en paramètre
+ public Album GetAlbumById(long id)
+ {
+ return DataManager.GetAlbumById(id);
+ }
- ///
- /// Permet la notification, et donc l'actualisation des objets connectés à l'événement lorsque la méthode est appelée
- ///
- /// Nom de la propriété modifiée
- protected void OnPropertyChanged([CallerMemberName] string propertyName = null)
- => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
-}
+ ///
+ /// Permet la notification, et donc l'actualisation des objets connectés à l'événement lorsque la méthode est appelée
+ ///
+ /// Nom de la propriété modifiée
+ protected void OnPropertyChanged([CallerMemberName] string propertyName = null)
+ => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+ }
+}
\ No newline at end of file
diff --git a/Sources/Model/Model.csproj b/Sources/Model/Model.csproj
index 6c3fb18..cc3382e 100644
--- a/Sources/Model/Model.csproj
+++ b/Sources/Model/Model.csproj
@@ -18,8 +18,4 @@
6.5
-
-
-
-
\ No newline at end of file
diff --git a/Sources/Model/Platforms/Tizen/PlatformClass1.cs b/Sources/Model/Platforms/Tizen/PlatformClass1.cs
index f721897..0538361 100644
--- a/Sources/Model/Platforms/Tizen/PlatformClass1.cs
+++ b/Sources/Model/Platforms/Tizen/PlatformClass1.cs
@@ -1,9 +1,8 @@
using System;
-namespace Model
+namespace Model;
+
+// All the code in this file is only included on Tizen.
+public class PlatformClass1
{
- // All the code in this file is only included on Tizen.
- public class PlatformClass1
- {
- }
}
\ No newline at end of file
diff --git a/Sources/Model/Playlist.cs b/Sources/Model/Playlist.cs
index 346cfa6..3d73a1f 100644
--- a/Sources/Model/Playlist.cs
+++ b/Sources/Model/Playlist.cs
@@ -4,327 +4,328 @@ using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Security.Cryptography;
-namespace Model;
-
-public class Playlist : INotifyPropertyChanged
+namespace Model
{
///
/// Classe Playlist
///
-
- public event PropertyChangedEventHandler PropertyChanged;
-
- public string Name
+ public class Playlist : INotifyPropertyChanged
{
- get => name;
- set
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ public string Name
{
- if (string.IsNullOrEmpty(value) || value.Length > Manager.MAX_NAME_LENGTH)
+ get => name;
+
+ set
{
- return;
+ if (string.IsNullOrEmpty(value) || value.Length > Manager.MAX_NAME_LENGTH)
+ {
+ return;
+ }
+ name = value;
+ OnPropertyChanged();
}
- name = value;
- OnPropertyChanged();
}
- }
-
- private string name = Manager.DEFAULT_NAME;
- public string Description
- {
- get => description;
+ private string name = Manager.DEFAULT_NAME;
- set
+ public string Description
{
- if (value != null && value.Length < Manager.MAX_DESCRIPTION_LENGTH)
+ get => description;
+
+ set
{
- description = value;
+ if (value != null && value.Length < Manager.MAX_DESCRIPTION_LENGTH)
+ {
+ description = value;
+ }
+ OnPropertyChanged();
}
- OnPropertyChanged();
}
- }
- private string description = Manager.DEFAULT_DESC;
+ private string description = Manager.DEFAULT_DESC;
- public ObservableCollection Titles
- {
- get
+ public ObservableCollection Titles
{
- return titles;
- }
- private set
- {
- titles = value;
- OnPropertyChanged();
- }
- }
-
- private ObservableCollection titles = new ObservableCollection();
-
- public string ImageURL
- {
- get => imageURL;
-
- set
- {
- if (value == null || !value.Contains('.'))
+ get
{
- value = "none.png";
- imageURL = value;
+ return titles;
}
- else if (value.Contains('.'))
+ private set
{
- imageURL = value;
+ titles = value;
+ OnPropertyChanged();
}
- OnPropertyChanged();
}
- }
-
- private string imageURL = Manager.DEFAULT_URL;
- public int Index
- {
- get => index;
+ private ObservableCollection titles = new ObservableCollection();
- set
+ public string ImageURL
{
- if (value < titles.Count)
+ get => imageURL;
+
+ set
{
- index = value;
+ if (value == null || !value.Contains('.'))
+ {
+ value = "none.png";
+ imageURL = value;
+ }
+ else if (value.Contains('.'))
+ {
+ imageURL = value;
+ }
+ OnPropertyChanged();
}
- else
+ }
+
+ private string imageURL = Manager.DEFAULT_URL;
+
+ public int Index
+ {
+ get => index;
+
+ set
{
- index = 0;
+ if (value < titles.Count)
+ {
+ index = value;
+ }
+ else
+ {
+ index = 0;
+ }
}
}
- }
- private int index = -1;
+ private int index = -1;
- public bool Shuffle { get; set; } = false;
+ public bool Shuffle { get; set; } = false;
- public bool LoopTitle { get; set; } = false;
+ public bool LoopTitle { get; set; } = false;
- private readonly List played = new List();
+ private readonly List played = new List();
- public IEnumerable Played
- {
- get
+ public IEnumerable Played
{
- return new List(played);
+ get
+ {
+ return new List(played);
+ }
}
- }
- public bool IsSubMenuVisible
- {
- get => isSubMenuVisible;
- set
+ public bool IsSubMenuVisible
{
- if (isSubMenuVisible != value)
+ get => isSubMenuVisible;
+ set
{
- isSubMenuVisible = value;
+ if (isSubMenuVisible != value)
+ {
+ isSubMenuVisible = value;
+ }
+ OnPropertyChanged(nameof(IsSubMenuVisible));
}
- OnPropertyChanged(nameof(IsSubMenuVisible));
}
- }
-
- private bool isSubMenuVisible;
- ///
- /// Constructeur de la classe Playlist
- ///
- /// Nom de la Playlist
- /// Description de la Playlist
- /// Chemin d'accès de l'image de la Playlist
- public Playlist(string nom, string description, string imageURL)
- {
- Name = nom;
- Description = description;
- ImageURL = imageURL;
- }
-
- ///
- /// Constructeur par défaut de la Playlist
- ///
- public Playlist() { }
-
- ///
- /// Ajoute un titre à la Playlist
- ///
- /// Morceau à ajouter à la Playlist
- public void AddTitle(CustomTitle morceau)
- {
- titles.Add(morceau);
- }
+ private bool isSubMenuVisible;
- ///
- /// Supprime un titre de la playlist
- ///
- /// Morceau à supprimer
- public void RemoveTitle(CustomTitle morceau)
- {
- titles.Remove(morceau);
- }
-
- ///
- /// Permet de connaître le prochain morceau à jouer dans la playlist
- ///
- /// Retourne le CustomTitle suivant selon les options indiquées par l'utilisateur
- /// Vérifie s'il y a des morceaux dans la playlist, puis vérifie si l'option de boucle du morceau est activé.
- /// Si elle est activée, cela renvoie le même morceau. Sinon, si l'option aléatoire N'est PAS activée, cela renvoie
- /// simplement le morceau à la suite dans la liste des titres de la playlist. Sinon, l'option aléatoire est activée, cela
- /// appelle donc une méthode de génération d'un index aléatoire pour avoir un morceau aléatoire dans la liste de la playlist.
- public CustomTitle NextTitle()
- {
- if (titles.Count < 1) return null;
- if (LoopTitle)
+ ///
+ /// Constructeur de la classe Playlist
+ ///
+ /// Nom de la Playlist
+ /// Description de la Playlist
+ /// Chemin d'accès de l'image de la Playlist
+ public Playlist(string nom, string description, string imageURL)
{
- return GetCurrentTitle();
+ Name = nom;
+ Description = description;
+ ImageURL = imageURL;
}
- if (!Shuffle)
- {
- Index++;
- played.Add(Index);
- return GetCurrentTitle();
- }
- else
+ ///
+ /// Constructeur par défaut de la Playlist
+ ///
+ public Playlist() { }
+
+ ///
+ /// Ajoute un titre à la Playlist
+ ///
+ /// Morceau à ajouter à la Playlist
+ public void AddTitle(CustomTitle morceau)
{
- Index = RandomGenerator(titles.Count);
- played.Add(Index);
- return GetCurrentTitle();
+ titles.Add(morceau);
}
- }
- ///
- /// Permet de connaître le titre précédentà jouer dans la playlist
- ///
- /// Retourne le CustomTitle précédent selon les options indiquées par l'utilisateur
- /// Vérifie s'il y a des morceaux dans la playlist, puis vérifie si l'option de boucle du morceau est activé.
- /// Si elle est activée, cela renvoie le même morceau. Sinon, si l'option aléatoire N'est PAS activée, cela renvoie
- /// simplement le morceau précédent celui actuel dans la liste des titres de la playlist. Si le morceau actuel est le
- /// premier, le morceau précédent est le dernier de la playlist.
- /// Sinon, l'option aléatoire est activée, la liste des morceaux jouée est analysée. Si elle est vide, le morceau
- /// actuel est retourné. Sinon, cela renvoie le dernier élément de la liste des morceaux joués. A noter que cette liste ne
- /// stocke que les index des titres présents dans la playlist.
- public CustomTitle PreviousTitle()
- {
- if (titles.Count < 1) return null;
- if (LoopTitle)
+ ///
+ /// Supprime un titre de la playlist
+ ///
+ /// Morceau à supprimer
+ public void RemoveTitle(CustomTitle morceau)
{
- return GetCurrentTitle();
+ titles.Remove(morceau);
}
- if(!Shuffle)
+ ///
+ /// Permet de connaître le prochain morceau à jouer dans la playlist
+ ///
+ /// Retourne le CustomTitle suivant selon les options indiquées par l'utilisateur
+ /// Vérifie s'il y a des morceaux dans la playlist, puis vérifie si l'option de boucle du morceau est activé.
+ /// Si elle est activée, cela renvoie le même morceau. Sinon, si l'option aléatoire N'est PAS activée, cela renvoie
+ /// simplement le morceau à la suite dans la liste des titres de la playlist. Sinon, l'option aléatoire est activée, cela
+ /// appelle donc une méthode de génération d'un index aléatoire pour avoir un morceau aléatoire dans la liste de la playlist.
+ public CustomTitle NextTitle()
{
- if(Index != 0)
+ if (titles.Count < 1) return null;
+ if (LoopTitle)
{
- Index--;
- played.RemoveAt(played.Count - 1);
+ return GetCurrentTitle();
+ }
+
+ if (!Shuffle)
+ {
+ Index++;
+ played.Add(Index);
return GetCurrentTitle();
}
else
{
+ Index = RandomGenerator(titles.Count);
+ played.Add(Index);
return GetCurrentTitle();
}
}
- else
+
+ ///
+ /// Permet de connaître le titre précédentà jouer dans la playlist
+ ///
+ /// Retourne le CustomTitle précédent selon les options indiquées par l'utilisateur
+ /// Vérifie s'il y a des morceaux dans la playlist, puis vérifie si l'option de boucle du morceau est activé.
+ /// Si elle est activée, cela renvoie le même morceau. Sinon, si l'option aléatoire N'est PAS activée, cela renvoie
+ /// simplement le morceau précédent celui actuel dans la liste des titres de la playlist. Si le morceau actuel est le
+ /// premier, le morceau précédent est le dernier de la playlist.
+ /// Sinon, l'option aléatoire est activée, la liste des morceaux jouée est analysée. Si elle est vide, le morceau
+ /// actuel est retourné. Sinon, cela renvoie le dernier élément de la liste des morceaux joués. A noter que cette liste ne
+ /// stocke que les index des titres présents dans la playlist.
+ public CustomTitle PreviousTitle()
{
- if (!played.Any())
+ if (titles.Count < 1) return null;
+ if (LoopTitle)
+ {
+ return GetCurrentTitle();
+ }
+
+ if (!Shuffle)
+ {
+ if (Index != 0)
+ {
+ Index--;
+ played.RemoveAt(played.Count - 1);
+ return GetCurrentTitle();
+ }
+ else
+ {
+ return GetCurrentTitle();
+ }
+ }
+ else
{
+ if (!played.Any())
+ {
+ return GetCurrentTitle();
+ }
+ Index = played[played.Count - 1];
+ played.RemoveAt(played.Count - 1);
return GetCurrentTitle();
}
- Index = played[played.Count - 1];
- played.RemoveAt(played.Count - 1);
- return GetCurrentTitle();
}
- }
- ///
- /// Permet de connaître le morceau actuel de la playlist.
- ///
- /// Retourne le morceau actuel de la playlist
- /// Tout d'abord, des tests de vérification sur l'index sont effectués pour éviter les bugs. Puis, cela renvoie le morceau
- /// à l'index de la playlist dans la liste.
- public CustomTitle GetCurrentTitle()
- {
- if (Index < 0) Index = 0;
- if (Index < titles.Count)
+ ///
+ /// Permet de connaître le morceau actuel de la playlist.
+ ///
+ /// Retourne le morceau actuel de la playlist
+ /// Tout d'abord, des tests de vérification sur l'index sont effectués pour éviter les bugs. Puis, cela renvoie le morceau
+ /// à l'index de la playlist dans la liste.
+ public CustomTitle GetCurrentTitle()
{
- return titles[Index];
+ if (Index < 0) Index = 0;
+ if (Index < titles.Count)
+ {
+ return titles[Index];
+ }
+ else
+ {
+ return null;
+ }
+
}
- else
+
+ ///
+ /// Fonction qui permet de déterminer si deux objets Playlist sont égaux
+ ///
+ ///
+ /// Un booléen indiquant si l'objet est égal
+ public override bool Equals(object obj)
{
- return null;
+ if (obj is null) return false;
+ if (obj.GetType() != typeof(Playlist)) return false;
+ if (obj is Playlist playlist && Name == playlist.Name) return true;
+ else return false;
}
- }
-
- ///
- /// Fonction qui permet de déterminer si deux objets Playlist sont égaux
- ///
- ///
- /// Un booléen indiquant si l'objet est égal
- public override bool Equals(object obj)
- {
- if (obj is null) return false;
- if (obj.GetType() != typeof(Playlist)) return false;
- if (obj is Playlist playlist && Name == playlist.Name) return true;
- else return false;
- }
-
- ///
- /// Permet de déterminer le hash d'un objet Playlist
- ///
- /// Hash de l'attribut Name
- public override int GetHashCode()
- {
- return Name.GetHashCode();
- }
+ ///
+ /// Permet de déterminer le hash d'un objet Playlist
+ ///
+ /// Hash de l'attribut Name
+ public override int GetHashCode()
+ {
+ return Name.GetHashCode();
+ }
- ///
- /// Permet de convertir un objet Playlist en string
- ///
- /// Une nouvelle chaîne caractères contenant le nom de la Playlist
- public override string ToString()
- {
- return $"Name : {Name}";
- }
+ ///
+ /// Permet de convertir un objet Playlist en string
+ ///
+ /// Une nouvelle chaîne caractères contenant le nom de la Playlist
+ public override string ToString()
+ {
+ return $"Name : {Name}";
+ }
- ///
- /// Permet de générer un nombre entre 0 et n
- ///
- /// Limite supérieure du nombre à générer
- /// Retourne un nombre entre 0 et n
- /// Cette méthode est effectuée via RandomNumberGenerator afin d'obtenir un aléatoire moins prévisible.
- static int RandomGenerator(int n)
- {
- RandomNumberGenerator rng = RandomNumberGenerator.Create();
- byte[] randomBytes = new byte[4];
- rng.GetBytes(randomBytes);
- uint randomNumber = BitConverter.ToUInt32(randomBytes, 0);
- return (int)(randomNumber % n) + 1;
- }
+ ///
+ /// Permet de générer un nombre entre 0 et n
+ ///
+ /// Limite supérieure du nombre à générer
+ /// Retourne un nombre entre 0 et n
+ /// Cette méthode est effectuée via RandomNumberGenerator afin d'obtenir un aléatoire moins prévisible.
+ static int RandomGenerator(int n)
+ {
+ RandomNumberGenerator rng = RandomNumberGenerator.Create();
+ byte[] randomBytes = new byte[4];
+ rng.GetBytes(randomBytes);
+ uint randomNumber = BitConverter.ToUInt32(randomBytes, 0);
+ return (int)(randomNumber % n) + 1;
+ }
- ///
- /// Vérifie si la Playlist contient un certain CustomTitle
- ///
- /// CustomTitle à vérifier
- /// Booléen True si le CustomTitle est contenu dans la Playlist, False sinon
- public bool HasCustomTitle(CustomTitle customTitle)
- {
- foreach(CustomTitle custom in Titles)
+ ///
+ /// Vérifie si la Playlist contient un certain CustomTitle
+ ///
+ /// CustomTitle à vérifier
+ /// Booléen True si le CustomTitle est contenu dans la Playlist, False sinon
+ public bool HasCustomTitle(CustomTitle customTitle)
{
- if(custom == customTitle) return true;
+ foreach (CustomTitle custom in Titles)
+ {
+ if (custom == customTitle) return true;
+ }
+ return false;
}
- return false;
- }
- ///
- /// Permet la notification, et donc l'actualisation des objets connectés à l'événement lorsque la méthode est appelée
- ///
- /// Nom de la propriété modifiée
- protected void OnPropertyChanged([CallerMemberName] string propertyName = null)
- => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
-}
+ ///
+ /// Permet la notification, et donc l'actualisation des objets connectés à l'événement lorsque la méthode est appelée
+ ///
+ /// Nom de la propriété modifiée
+ protected void OnPropertyChanged([CallerMemberName] string propertyName = null)
+ => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+ }
+}
\ No newline at end of file
diff --git a/Sources/Model/Serialization/LINQ_XML_Serialization.cs b/Sources/Model/Serialization/LINQ_XML_Serialization.cs
index e87d5e0..6ee3ac7 100644
--- a/Sources/Model/Serialization/LINQ_XML_Serialization.cs
+++ b/Sources/Model/Serialization/LINQ_XML_Serialization.cs
@@ -3,809 +3,745 @@ using System.Xml.Linq;
using System.Collections.ObjectModel;
using Model.Stub;
-namespace Model.Serialization;
-
-public class LinqXmlSerialization : IDataManager
+namespace Model.Serialization
{
- private string XMLPATH;
+ public class LinqXmlSerialization : IDataManager
+ {
+ private string XMLPATH;
- private string XMLFILEPLAYLISTS;
+ private string XMLFILEPLAYLISTS;
- private string XMLFILECUSTOMS;
+ private string XMLFILECUSTOMS;
- private StubInfoTitle stubInfoTitle = new();
+ private StubInfoTitle stubInfoTitle = new();
- public StubInfoTitle StubInfoTitle
- {
- get => stubInfoTitle;
- }
+ public StubInfoTitle StubInfoTitle
+ {
+ get => stubInfoTitle;
+ }
- private List artists;
+ private List artists;
- public IEnumerable Artists
- {
- get
+ public IEnumerable Artists
{
- return new List(artists);
+ get
+ {
+ return new List(artists);
+ }
}
- }
- private ObservableCollection albums;
+ private ObservableCollection albums;
- public ObservableCollection Albums
- {
- get
+ public ObservableCollection Albums
{
- return new ObservableCollection(albums);
+ get
+ {
+ return new ObservableCollection(albums);
+ }
}
- }
- private ObservableCollection playlists;
+ private ObservableCollection playlists;
- public ObservableCollection Playlists
- {
- get
+ public ObservableCollection Playlists
{
- return new ObservableCollection(playlists);
+ get
+ {
+ return new ObservableCollection(playlists);
+ }
}
- }
- private ObservableCollection infoTitles;
+ private ObservableCollection infoTitles;
- public ObservableCollection InfoTitles
- {
- get
+ public ObservableCollection InfoTitles
{
- return new ObservableCollection(infoTitles);
+ get
+ {
+ return new ObservableCollection(infoTitles);
+ }
}
- }
- private ObservableCollection customTitles;
+ private ObservableCollection customTitles;
- public ObservableCollection CustomTitles
- {
- get
+ public ObservableCollection CustomTitles
{
- return new ObservableCollection(customTitles);
+ get
+ {
+ return new ObservableCollection(customTitles);
+ }
}
- }
-
- ///
- /// Constructeur de la classe LinqXmlSerialization
- ///
- /// Chemin d'accès des fichiers de sauvegarde des données
- public LinqXmlSerialization(string pathDirectory)
- {
- XMLPATH = pathDirectory;
- XMLFILECUSTOMS = Path.Combine(XMLPATH, "playlists.xml");
- XMLFILEPLAYLISTS = Path.Combine(XMLPATH, "customs.xml");
- playlists = new ObservableCollection();
- artists = new List();
- infoTitles = new ObservableCollection();
- albums = new ObservableCollection();
- customTitles = new ObservableCollection();
- if (!Directory.Exists(XMLPATH))
- {
- Directory.CreateDirectory(XMLPATH);
- }
- Directory.SetCurrentDirectory(XMLPATH);
- LoadSerialization();
- }
+ ///
+ /// Constructeur de la classe LinqXmlSerialization
+ ///
+ /// Chemin d'accès des fichiers de sauvegarde des données
+ public LinqXmlSerialization(string pathDirectory)
+ {
+ XMLPATH = pathDirectory;
+ XMLFILECUSTOMS = Path.Combine(XMLPATH, "playlists.xml");
+ XMLFILEPLAYLISTS = Path.Combine(XMLPATH, "customs.xml");
+ playlists = new ObservableCollection();
+ artists = new List();
+ infoTitles = new ObservableCollection();
+ albums = new ObservableCollection();
+ customTitles = new ObservableCollection();
+ if (!Directory.Exists(XMLPATH))
+ {
+ Directory.CreateDirectory(XMLPATH);
+ }
+ Directory.SetCurrentDirectory(XMLPATH);
+ LoadSerialization();
+ }
- ///
- /// Permet d'ajouter un objet Album à l'application
- ///
- /// Album à ajouter
- public void AddAlbum(Album album)
- {
- albums.Add(album);
- }
- ///
- /// Permet d'ajouter un objet Artist à l'application
- ///
- /// Artist à ajouter
- public void AddArtist(Artist artist)
- {
- artists.Add(artist);
- }
+ ///
+ /// Permet d'ajouter un objet Album à l'application
+ ///
+ /// Album à ajouter
+ public void AddAlbum(Album album)
+ {
+ albums.Add(album);
+ }
- ///
- /// Permet d'ajouter un objet CustomTitle à l'application
- ///
- /// CustomTitle à ajouter
- public void AddCustomTitle(CustomTitle title)
- {
- customTitles.Add(title);
- }
+ ///
+ /// Permet d'ajouter un objet Artist à l'application
+ ///
+ /// Artist à ajouter
+ public void AddArtist(Artist artist)
+ {
+ artists.Add(artist);
+ }
- ///
- /// Permet d'ajouter un objet InfoTitle à l'application
- ///
- /// InfoTitle à ajouter
- public void AddInfoTitle(InfoTitle title)
- {
- infoTitles.Add(title);
- }
+ ///
+ /// Permet d'ajouter un objet CustomTitle à l'application
+ ///
+ /// CustomTitle à ajouter
+ public void AddCustomTitle(CustomTitle title)
+ {
+ customTitles.Add(title);
+ }
- ///
- /// Permet d'ajouter un objet Playlist à l'application
- ///
- /// Playlist à ajouter
- public void AddPlaylist(Playlist playlist)
- {
- playlists.Add(playlist);
- }
+ ///
+ /// Permet d'ajouter un objet InfoTitle à l'application
+ ///
+ /// InfoTitle à ajouter
+ public void AddInfoTitle(InfoTitle title)
+ {
+ infoTitles.Add(title);
+ }
- ///
- /// Permet d'obtenir une liste d'objets Album
- ///
- /// Retourne une liste d'objets Album
- public ObservableCollection GetAlbums()
- {
- return albums;
- }
+ ///
+ /// Permet d'ajouter un objet Playlist à l'application
+ ///
+ /// Playlist à ajouter
+ public void AddPlaylist(Playlist playlist)
+ {
+ playlists.Add(playlist);
+ }
- ///
- /// Permet d'obtenir une liste d'objets Artist
- ///
- /// Retourne une liste d'objets Artist
- public List GetArtists()
- {
- return artists;
- }
+ ///
+ /// Permet d'obtenir une liste d'objets Album
+ ///
+ /// Retourne une liste d'objets Album
+ public ObservableCollection GetAlbums()
+ {
+ return albums;
+ }
- ///
- /// Permet d'obtenir une liste d'objets CustomTitle
- ///
- /// Retourne une liste d'objets CustomTitle
- public ObservableCollection GetCustomTitles()
- {
- return customTitles;
- }
+ ///
+ /// Permet d'obtenir une liste d'objets Artist
+ ///
+ /// Retourne une liste d'objets Artist
+ public List GetArtists()
+ {
+ return artists;
+ }
- ///
- /// Permet d'obtenir une liste d'objets InfoTitle
- ///
- /// Retourne une liste d'objets InfoTitle
- public ObservableCollection GetInfoTitles()
- {
- return infoTitles;
- }
+ ///
+ /// Permet d'obtenir une liste d'objets CustomTitle
+ ///
+ /// Retourne une liste d'objets CustomTitle
+ public ObservableCollection GetCustomTitles()
+ {
+ return customTitles;
+ }
- ///
- /// Permet d'obtenir une liste d'objets Playlist
- ///
- /// Retourne une liste d'objets Playlist
- public ObservableCollection GetPlaylists()
- {
- return playlists;
- }
+ ///
+ /// Permet d'obtenir une liste d'objets InfoTitle
+ ///
+ /// Retourne une liste d'objets InfoTitle
+ public ObservableCollection GetInfoTitles()
+ {
+ return infoTitles;
+ }
- ///
- /// Permet de retirer un objet Album de l'application
- ///
- /// Album à retirer
- public void RemoveAlbum(Album album)
- {
- albums.Remove(album);
- }
+ ///
+ /// Permet d'obtenir une liste d'objets Playlist
+ ///
+ /// Retourne une liste d'objets Playlist
+ public ObservableCollection GetPlaylists()
+ {
+ return playlists;
+ }
- ///
- /// Permet de retirer un objet Artist de l'application
- ///
- /// Artist à retirer
- public void RemoveArtist(Artist artist)
- {
- artists.Remove(artist);
- }
+ ///
+ /// Permet de retirer un objet Album de l'application
+ ///
+ /// Album à retirer
+ public void RemoveAlbum(Album album)
+ {
+ albums.Remove(album);
+ }
- ///
- /// Permet de retirer un objet CustomTitle de l'application
- ///
- /// CustomTitle à retirer
- public void RemoveCustomTitle(CustomTitle title)
- {
- customTitles.Remove(title);
- }
+ ///
+ /// Permet de retirer un objet Artist de l'application
+ ///
+ /// Artist à retirer
+ public void RemoveArtist(Artist artist)
+ {
+ artists.Remove(artist);
+ }
- ///
- /// Permet de retirer un objet InfoTitle de l'application
- ///
- /// InfoTitle à retirer
- public void RemoveInfoTitle(InfoTitle title)
- {
- infoTitles.Remove(title);
- }
+ ///
+ /// Permet de retirer un objet CustomTitle de l'application
+ ///
+ /// CustomTitle à retirer
+ public void RemoveCustomTitle(CustomTitle title)
+ {
+ customTitles.Remove(title);
+ }
- ///
- /// Permet de retirer un objet Playlist de l'application
- ///
- /// Playlist à retirer
- public void RemovePlaylist(Playlist playlist)
- {
- playlists.Remove(playlist);
- }
+ ///
+ /// Permet de retirer un objet InfoTitle de l'application
+ ///
+ /// InfoTitle à retirer
+ public void RemoveInfoTitle(InfoTitle title)
+ {
+ infoTitles.Remove(title);
+ }
- ///
- /// Permet de charger les données
- ///
- public void LoadSerialization()
- {
- LoadArtists();
- LoadAlbums();
- LoadInfoTitles();
- LoadCustomTitles();
- LoadPlaylists();
- }
+ ///
+ /// Permet de retirer un objet Playlist de l'application
+ ///
+ /// Playlist à retirer
+ public void RemovePlaylist(Playlist playlist)
+ {
+ playlists.Remove(playlist);
+ }
- ///
- /// Permet de sauvegarder l'état de l'application
- ///
- public void SaveSerialization()
- {
- SaveArtists();
- SaveCustomTitles();
- SaveInfoTitles();
- SavePlaylists();
- SaveAlbums();
- }
+ ///
+ /// Permet de charger les données
+ ///
+ public void LoadSerialization()
+ {
+ LoadArtists();
+ LoadAlbums();
+ LoadInfoTitles();
+ LoadCustomTitles();
+ LoadPlaylists();
+ }
- ///
- /// Permet de charger les playlists depuis le fichier correspondant
- ///
- public void LoadPlaylists()
- {
- if (!File.Exists(XMLFILEPLAYLISTS))
+ ///
+ /// Permet de sauvegarder l'état de l'application
+ ///
+ public void SaveSerialization()
{
- XDocument PlaylistFile = new XDocument();
+ SaveArtists();
+ SaveCustomTitles();
+ SaveInfoTitles();
+ SavePlaylists();
+ SaveAlbums();
+ }
- var playlist = playlists.Select(p => new XElement("Playlist",
- new XAttribute("Name", p.Name),
- new XElement("Description", p.Description),
- new XElement("ImageURL", p.ImageURL),
- new XElement("Titles", p.Titles.Any() ? p.Titles.Select(a => a.Name).Aggregate((playlistName, nextPlaylist) => playlistName + " " + nextPlaylist) : "")
- ));
+ ///
+ /// Permet de charger les playlists depuis le fichier correspondant
+ ///
+ public void LoadPlaylists()
+ {
+ if (!File.Exists(XMLFILEPLAYLISTS))
+ {
+ SavePlaylists();
+ }
+ XDocument PlaylistsFichier = XDocument.Load(XMLFILEPLAYLISTS);
- PlaylistFile.Add(new XElement("Playlists", playlist));
+ var playlists2 = PlaylistsFichier.Descendants("Playlist")
+ .Select(eltPlaylist => new Playlist(
+ eltPlaylist.Attribute("Name")!.Value,
+ eltPlaylist.Element("Description")!.Value,
+ eltPlaylist.Element("ImageURL")!.Value
+ )).ToList();
+ playlists = new ObservableCollection(playlists2);
- XmlWriterSettings settings = new XmlWriterSettings();
- settings.Indent = true;
- using (TextWriter tw = File.CreateText(XMLFILEPLAYLISTS))
+ foreach (Playlist playlist in playlists)
{
- using (XmlWriter writer = XmlWriter.Create(tw, settings))
+ var allCustoms = PlaylistsFichier.Descendants("Playlist")
+ .Single(ct => ct.Attribute("Name")?.Value == playlist.Name)
+ .Element("Titles")!.Value;
+
+ if (allCustoms == null)
+ {
+ continue;
+ }
+
+ char[] separator = new char[] { ';' };
+ string[] customArray = allCustoms.Split(separator, StringSplitOptions.RemoveEmptyEntries);
+ List customsList = customArray.ToList();
+
+ foreach (var custom in customsList)
{
- PlaylistFile.Save(writer);
+ CustomTitle customTitle = GetCustomTitleByPath(custom);
+
+ if (customTitle == null)
+ {
+ continue;
+ }
+
+ playlist.AddTitle(customTitle);
}
}
}
- XDocument PlaylistsFichier = XDocument.Load(XMLFILEPLAYLISTS);
- var playlists2 = PlaylistsFichier.Descendants("Playlist")
- .Select(eltPlaylist => new Playlist(
- eltPlaylist.Attribute("Name")!.Value,
- eltPlaylist.Element("Description")!.Value,
- eltPlaylist.Element("ImageURL")!.Value
- )).ToList();
- playlists = new ObservableCollection(playlists2);
-
- foreach (Playlist playlist in playlists)
+ ///
+ /// Permet de sauvegarder les playlists dans le fichier correpondant
+ ///
+ public void SavePlaylists()
{
- var allCustoms = PlaylistsFichier.Descendants("Playlist")
- .Single(ct => ct.Attribute("Name")?.Value == playlist.Name)
- .Element("Titles")!.Value;
+ XDocument PlaylistsFichier = new XDocument();
- if (allCustoms == null)
- {
- continue;
- }
+ var playlist = playlists.Select(playlist => new XElement("Playlist",
+ new XAttribute("Name", playlist.Name),
+ new XElement("Description", playlist.Description),
+ new XElement("ImageURL", playlist.ImageURL),
+ new XElement("Titles", playlist.Titles.Any() ? playlist.Titles.Select(p => p.Path).Aggregate((playlistName, nextPlaylist) => playlistName + ";" + nextPlaylist) : "")));
+ PlaylistsFichier.Add(new XElement("Playlists", playlist));
- char[] separator = new char[] { ';' };
- string[] customArray = allCustoms.Split(separator, StringSplitOptions.RemoveEmptyEntries);
- List customsList = customArray.ToList();
+ XmlWriterSettings settings = new XmlWriterSettings();
+ settings.Indent = true;
- foreach(var custom in customsList)
+ using (TextWriter tw = File.CreateText(XMLFILEPLAYLISTS))
{
- CustomTitle customTitle = GetCustomTitleByPath(custom);
-
- if (customTitle == null)
+ using (XmlWriter writer = XmlWriter.Create(tw, settings))
{
- continue;
+ PlaylistsFichier.Save(writer);
}
-
- playlist.AddTitle(customTitle);
}
}
- }
- ///
- /// Permet de sauvegarder les playlists dans le fichier correpondant
- ///
- public void SavePlaylists()
- {
- XDocument PlaylistsFichier = new XDocument();
-
- var playlist = playlists.Select(playlist => new XElement("Playlist",
- new XAttribute("Name", playlist.Name),
- new XElement("Description", playlist.Description),
- new XElement("ImageURL", playlist.ImageURL),
- new XElement("Titles", playlist.Titles.Any() ? playlist.Titles.Select(p => p.Path).Aggregate((playlistName, nextPlaylist) => playlistName + ";" + nextPlaylist) : "")
- ));
- PlaylistsFichier.Add(new XElement("Playlists", playlist));
+ ///
+ /// Permet de charger les artistes depuis les stubs
+ ///
+ public void LoadArtists()
+ {
+ artists = StubInfoTitle.StubAlbum.StubArtist.GetArtists();
+ }
- XmlWriterSettings settings = new XmlWriterSettings();
- settings.Indent = true;
+ ///
+ /// Permet de sauvegarder les artistes. Ne fais rien car ce sont les stubs qui s'en occupent
+ ///
+ public void SaveArtists()
+ {
+ // Don't do anything because it's static data
+ }
- using(TextWriter tw = File.CreateText(XMLFILEPLAYLISTS))
+ ///
+ /// Permet de charger les CustomTitles depuis le fichier de sauvegarde correspondant
+ ///
+ public void LoadCustomTitles()
{
- using(XmlWriter writer = XmlWriter.Create(tw, settings))
+ if (!File.Exists(XMLFILECUSTOMS))
{
- PlaylistsFichier.Save(writer);
+ SaveCustomTitles();
}
+ XDocument CustomsFile = XDocument.Load(XMLFILECUSTOMS);
+
+ var customTitles2 = CustomsFile.Descendants("CustomTitle")
+ .Select(eltPlaylist => new CustomTitle(
+ eltPlaylist.Attribute("Name")!.Value,
+ eltPlaylist.Element("ImageURL")!.Value,
+ eltPlaylist.Element("Information")!.Value,
+ eltPlaylist.Element("Path")!.Value
+ )).ToList();
+ customTitles = new ObservableCollection(customTitles2);
}
- }
-
- ///
- /// Permet de charger les artistes depuis les stubs
- ///
- public void LoadArtists()
- {
- artists = StubInfoTitle.StubAlbum.StubArtist.GetArtists();
- }
-
- ///
- /// Permet de sauvegarder les artistes. Ne fais rien car ce sont les stubs qui s'en occupent
- ///
- public void SaveArtists()
- {
- // Don't do anything because it's static data
- }
- ///
- /// Permet de charger les CustomTitles depuis le fichier de sauvegarde correspondant
- ///
- public void LoadCustomTitles()
- {
- if (!File.Exists(XMLFILECUSTOMS))
+ ///
+ /// Permet de sauvegarder les CustomTitles dans le fichier correspondant
+ ///
+ public void SaveCustomTitles()
{
+ XDocument CustomsFile = new XDocument();
- XDocument CustomsFile2 = new XDocument();
+ var customs = customTitles.Select(custom => new XElement("CustomTitle",
+ new XAttribute("Name", custom.Name),
+ new XElement("ImageURL", custom.ImageURL),
+ new XElement("Information", custom.Information),
+ new XElement("Path", custom.Path)));
- var custom = customTitles.Select(c => new XElement("CustomTitle",
- new XAttribute("Name", c.Name),
- new XElement("ImageURL", c.ImageURL),
- new XElement("Information", c.Information),
- new XElement("Path",c.Path)
- ));
-
- CustomsFile2.Add(new XElement("Customs", custom));
+ CustomsFile.Add(new XElement("Customs", customs));
XmlWriterSettings settings = new XmlWriterSettings();
settings.Indent = true;
+
using (TextWriter tw = File.CreateText(XMLFILECUSTOMS))
{
using (XmlWriter writer = XmlWriter.Create(tw, settings))
-
- CustomsFile2.Save(writer);
+ {
+ CustomsFile.Save(writer);
+ }
}
}
- XDocument CustomsFile = XDocument.Load(XMLFILECUSTOMS);
-
- var customTitles2 = CustomsFile.Descendants("CustomTitle")
- .Select(eltPlaylist => new CustomTitle(
- eltPlaylist.Attribute("Name")!.Value,
- eltPlaylist.Element("ImageURL")!.Value,
- eltPlaylist.Element("Information")!.Value,
- eltPlaylist.Element("Path")!.Value
- )).ToList();
- customTitles = new ObservableCollection(customTitles2);
- }
-
- ///
- /// Permet de sauvegarder les CustomTitles dans le fichier correspondant
- ///
- public void SaveCustomTitles()
- {
- XDocument CustomsFile = new XDocument();
-
- var customs = customTitles.Select(custom => new XElement("CustomTitle",
- new XAttribute("Name", custom.Name),
- new XElement("ImageURL", custom.ImageURL),
- new XElement("Information", custom.Information),
- new XElement("Path", custom.Path)
- ));
- CustomsFile.Add(new XElement("Customs", customs));
+ ///
+ /// Permet de charger les albums depuis les stubs
+ ///
+ public void LoadAlbums()
+ {
+ albums = StubInfoTitle.StubAlbum.GetAlbums();
+ }
- XmlWriterSettings settings = new XmlWriterSettings();
- settings.Indent = true;
+ ///
+ /// Permet de sauvegarder les albums. Ne fais rien car ce sont les stubs qui s'en occupent
+ ///
+ public void SaveAlbums()
+ {
+ // Don't do anything because it's static data
+ }
- using (TextWriter tw = File.CreateText(XMLFILECUSTOMS))
+ ///
+ /// Permet de charger les InfoTitles depuis les stubs
+ ///
+ public void LoadInfoTitles()
{
- using (XmlWriter writer = XmlWriter.Create(tw, settings))
+ infoTitles = StubInfoTitle.GetInfoTitles();
+ foreach (var infoTitle in InfoTitles)
{
- CustomsFile.Save(writer);
+ GetAlbumById(infoTitle.AlbumID)?.AddTitle(infoTitle);
}
}
- }
-
- ///
- /// Permet de charger les albums depuis les stubs
- ///
- public void LoadAlbums()
- {
- albums = StubInfoTitle.StubAlbum.GetAlbums();
- }
- ///
- /// Permet de sauvegarder les albums. Ne fais rien car ce sont les stubs qui s'en occupent
- ///
- public void SaveAlbums()
- {
- // Don't do anything because it's static data
- }
-
- ///
- /// Permet de charger les InfoTitles depuis les stubs
- ///
- public void LoadInfoTitles()
- {
- infoTitles = StubInfoTitle.GetInfoTitles();
- foreach (var infoTitle in InfoTitles)
+ ///
+ /// Permet de sauvegarder les InfoTitles. Ne fais rien car ce sont les stubs qui s'en occupent
+ ///
+ public void SaveInfoTitles()
{
- GetAlbumById(infoTitle.AlbumID)?.AddTitle(infoTitle);
+ // Don't do anything because it's static data
}
- }
- ///
- /// Permet de sauvegarder les InfoTitles. Ne fais rien car ce sont les stubs qui s'en occupent
- ///
- public void SaveInfoTitles()
- {
- // Don't do anything because it's static data
- }
-
- ///
- /// Permet de passer d'un genre à son nom en chaîne de caractère
- ///
- /// Genre à transformer
- /// Retourne la chaîne de caractère correspondant au genre
- public static Genre GetGenreByName(string genre)
- {
- if (genre == "HIP_HOP") return Genre.HIP_HOP;
- if (genre == "POP") return Genre.POP;
- if (genre == "ROCK") return Genre.ROCK;
- if (genre == "ELECTRO") return Genre.ELECTRO;
- if (genre == "CLASSIQUE") return Genre.CLASSIQUE;
- if (genre == "JAZZ") return Genre.JAZZ;
- if (genre == "VARIETE_FRANCAISE") return Genre.VARIETE_FRANCAISE;
- if (genre == "VARIETE_INTERNATIONALE") return Genre.VARIETE_INTERNATIONALE;
- if (genre == "REGGAE") return Genre.REGGAE;
- if (genre == "RAP") return Genre.RAP;
- if (genre == "RNB") return Genre.RNB;
- if (genre == "DISCO") return Genre.DISCO;
- if (genre == "BLUES") return Genre.BLUES;
- if (genre == "COUNTRY") return Genre.COUNTRY;
- if (genre == "FUNK") return Genre.FUNK;
- if (genre == "GOSPEL") return Genre.GOSPEL;
- if (genre == "METAL") return Genre.METAL;
- else return Genre.K_POP;
- }
+ ///
+ /// Permet de passer d'un genre à son nom en chaîne de caractère
+ ///
+ /// Genre à transformer
+ /// Retourne la chaîne de caractère correspondant au genre
+ public static Genre GetGenreByName(string genre)
+ {
+ if (genre == "HIP_HOP") return Genre.HIP_HOP;
+ if (genre == "POP") return Genre.POP;
+ if (genre == "ROCK") return Genre.ROCK;
+ if (genre == "ELECTRO") return Genre.ELECTRO;
+ if (genre == "CLASSIQUE") return Genre.CLASSIQUE;
+ if (genre == "JAZZ") return Genre.JAZZ;
+ if (genre == "VARIETE_FRANCAISE") return Genre.VARIETE_FRANCAISE;
+ if (genre == "VARIETE_INTERNATIONALE") return Genre.VARIETE_INTERNATIONALE;
+ if (genre == "REGGAE") return Genre.REGGAE;
+ if (genre == "RAP") return Genre.RAP;
+ if (genre == "RNB") return Genre.RNB;
+ if (genre == "DISCO") return Genre.DISCO;
+ if (genre == "BLUES") return Genre.BLUES;
+ if (genre == "COUNTRY") return Genre.COUNTRY;
+ if (genre == "FUNK") return Genre.FUNK;
+ if (genre == "GOSPEL") return Genre.GOSPEL;
+ if (genre == "METAL") return Genre.METAL;
+ else return Genre.K_POP;
+ }
- ///
- /// Permet d'obtenir un objet InfoTitle à partir de son nom
- ///
- /// Nom de l'objet InfoTitle
- /// Retourne l'objet InfoTitle avec un nom équivalent à celui donné en paramètre
- public InfoTitle GetInfoTitleByName(string name)
- {
- foreach(InfoTitle it in infoTitles)
+ ///
+ /// Permet d'obtenir un objet InfoTitle à partir de son nom
+ ///
+ /// Nom de l'objet InfoTitle
+ /// Retourne l'objet InfoTitle avec un nom équivalent à celui donné en paramètre
+ public InfoTitle GetInfoTitleByName(string name)
{
- if (it.Name == name)
+ foreach (InfoTitle it in infoTitles)
{
- return it;
+ if (it.Name == name)
+ {
+ return it;
+ }
}
+ return null;
}
- return null;
- }
- ///
- /// Permet d'obtenir un objet Artist à partir de son nom
- ///
- /// Nom de l'objet Artist
- /// Retourne l'objet Artist avec un nom équivalent à celui donné en paramètre
- public Artist GetArtistByName(string name)
- {
- foreach(Artist a in artists)
+ ///
+ /// Permet d'obtenir un objet Artist à partir de son nom
+ ///
+ /// Nom de l'objet Artist
+ /// Retourne l'objet Artist avec un nom équivalent à celui donné en paramètre
+ public Artist GetArtistByName(string name)
{
- if (a.Name == name)
+ foreach (Artist a in artists)
{
- return a;
+ if (a.Name == name)
+ {
+ return a;
+ }
}
+ return null;
}
- return null;
- }
- ///
- /// Permet d'obtenir un objet Album à partir de son nom
- ///
- /// Nom de l'objet Album
- /// Retourne l'objet Album avec un nom équivalent à celui donné en paramètre
- public Album GetAlbumByName(string name)
- {
- foreach(Album a in albums)
+ ///
+ /// Permet d'obtenir un objet Album à partir de son nom
+ ///
+ /// Nom de l'objet Album
+ /// Retourne l'objet Album avec un nom équivalent à celui donné en paramètre
+ public Album GetAlbumByName(string name)
{
- if (a.Name == name)
+ foreach (Album a in albums)
{
- return a;
+ if (a.Name == name)
+ {
+ return a;
+ }
}
+ return null;
}
- return null;
- }
- ///
- /// Permet d'obtenir un objet Album à partir de son ID
- ///
- /// ID de l'objet Album
- /// Retourne l'objet Album avec un ID équivalent à celui donné en paramètre
- public Album GetAlbumById(long id)
- {
- foreach(Album a in albums)
+ ///
+ /// Permet d'obtenir un objet Album à partir de son ID
+ ///
+ /// ID de l'objet Album
+ /// Retourne l'objet Album avec un ID équivalent à celui donné en paramètre
+ public Album GetAlbumById(long id)
{
- if (a.ID == id) return a;
+ foreach (Album a in albums)
+ {
+ if (a.ID == id) return a;
+ }
+ return null;
}
- return null;
- }
- ///
- /// Permet d'obtenir un objet CustomTitle à partir de son chemin d'accès
- ///
- /// Chemin d'accès de l'objet CustomTitle
- /// Retourne l'objet CustomTitle avec un chemin d'accès équivalent à celui donné en paramètre
- public CustomTitle GetCustomTitleByPath(string custom)
- {
- foreach(CustomTitle customTitle in customTitles)
+ ///
+ /// Permet d'obtenir un objet CustomTitle à partir de son chemin d'accès
+ ///
+ /// Chemin d'accès de l'objet CustomTitle
+ /// Retourne l'objet CustomTitle avec un chemin d'accès équivalent à celui donné en paramètre
+ public CustomTitle GetCustomTitleByPath(string custom)
{
- if(customTitle.Path == custom)
+ foreach (CustomTitle customTitle in customTitles)
{
- return customTitle;
+ if (customTitle.Path == custom)
+ {
+ return customTitle;
+ }
}
+ return null;
}
- return null;
- }
- ///
- /// Permet d'ajouter des objets Album à l'application
- ///
- /// Liste d'Album à ajouter
- public void AddAlbums(List albumsList)
- {
- foreach(Album a in albumsList)
+ ///
+ /// Permet d'ajouter des objets Album à l'application
+ ///
+ /// Liste d'Album à ajouter
+ public void AddAlbums(List albumsList)
{
- albums.Add(a);
+ foreach (Album a in albumsList)
+ {
+ albums.Add(a);
+ }
}
- }
- ///
- /// Permet d'ajouter des objets Artist à l'application
- ///
- /// Liste d'Artist à ajouter
- public void AddArtists(List artistsList)
- {
- foreach (Artist a in artistsList)
+ ///
+ /// Permet d'ajouter des objets Artist à l'application
+ ///
+ /// Liste d'Artist à ajouter
+ public void AddArtists(List artistsList)
{
- artists.Add(a);
+ foreach (Artist a in artistsList)
+ {
+ artists.Add(a);
+ }
}
- }
- ///
- /// Permet d'ajouter des objets Playlist à l'application
- ///
- /// Liste de Playlist à ajouter
- public void AddPlaylists(List playlistsList)
- {
- foreach (Playlist p in playlistsList)
+ ///
+ /// Permet d'ajouter des objets Playlist à l'application
+ ///
+ /// Liste de Playlist à ajouter
+ public void AddPlaylists(List playlistsList)
{
- playlists.Add(p);
+ foreach (Playlist p in playlistsList)
+ {
+ playlists.Add(p);
+ }
}
- }
- ///
- /// Permet d'ajouter des objets CustomTitle à l'application
- ///
- /// Liste de CustomTitle à ajouter
- public void AddCustomTitles(List customTitlesList)
- {
- foreach (CustomTitle ct in customTitlesList)
+ ///
+ /// Permet d'ajouter des objets CustomTitle à l'application
+ ///
+ /// Liste de CustomTitle à ajouter
+ public void AddCustomTitles(List customTitlesList)
{
- customTitles.Add(ct);
+ foreach (CustomTitle ct in customTitlesList)
+ {
+ customTitles.Add(ct);
+ }
}
- }
- ///
- /// Permet d'ajouter des objets InfoTitle à l'application
- ///
- /// Liste d'InfoTitle à ajouter
- public void AddInfoTitles(List infoTitlesList)
- {
- foreach (InfoTitle it in infoTitlesList)
+ ///
+ /// Permet d'ajouter des objets InfoTitle à l'application
+ ///
+ /// Liste d'InfoTitle à ajouter
+ public void AddInfoTitles(List infoTitlesList)
{
- infoTitles.Add(it);
+ foreach (InfoTitle it in infoTitlesList)
+ {
+ infoTitles.Add(it);
+ }
}
- }
- ///
- /// Permet d'obtenir un objet Playlist à partir de son nom
- ///
- /// Nom de l'objet Playlist
- /// Retourne l'objet Playlist avec un nom équivalent à celui donné en paramètre
- public Playlist GetPlaylistByName(string name)
- {
- foreach(Playlist p in playlists)
+ ///
+ /// Permet d'obtenir un objet Playlist à partir de son nom
+ ///
+ /// Nom de l'objet Playlist
+ /// Retourne l'objet Playlist avec un nom équivalent à celui donné en paramètre
+ public Playlist GetPlaylistByName(string name)
{
- if (p.Name == name)
+ foreach (Playlist p in playlists)
{
- return p;
+ if (p.Name == name)
+ {
+ return p;
+ }
}
+ return null;
}
- return null;
- }
- ///
- /// Modifie un objet CustomTitle avec les informations données en paramètre
- ///
- /// CustomTitle à modifier
- /// Nom de l'objet CustomTitle
- /// Chemin d'accès de l'image de l'objet CustomTitle
- /// Informations de l'objet CustomTitle
- /// Chemin d'accès de l'objet CustomTitle
- public void UpdateCustomTitle(CustomTitle title, string name, string url, string info, string path)
- {
- title.Name = name;
- title.ImageURL = url;
- title.Information = info;
- title.Path = path;
- }
-
- ///
- /// Modifie un objet CustomTitle avec les informations données en paramètre
- ///
- /// Chemin d'accès du CustomTitle à modifier
- /// Nom de l'objet CustomTitle
- /// Chemin d'accès de l'image de l'objet CustomTitle
- /// Informations de l'objet CustomTitle
- /// Chemin d'accès de l'objet CustomTitle
- public void UpdateCustomTitleByPath(string path, string name, string newUrl, string info, string newPath)
- {
- CustomTitle title = GetCustomTitleByPath(path);
- if (title != null)
+ ///
+ /// Modifie un objet CustomTitle avec les informations données en paramètre
+ ///
+ /// CustomTitle à modifier
+ /// Nom de l'objet CustomTitle
+ /// Chemin d'accès de l'image de l'objet CustomTitle
+ /// Informations de l'objet CustomTitle
+ /// Chemin d'accès de l'objet CustomTitle
+ public void UpdateCustomTitle(CustomTitle title, string name, string url, string info, string path)
{
title.Name = name;
- title.ImageURL = newUrl;
+ title.ImageURL = url;
title.Information = info;
- title.Path = newPath;
+ title.Path = path;
}
- }
- ///
- /// Modifie un objet InfoTitle avec les informations données en paramètre
- ///
- /// InfoTitle à modifier
- /// Nom de l'objet InfoTitle
- /// Chemin d'accès de l'image de l'objet InfoTitle
- /// Informations de l'objet InfoTitle
- /// Artist de l'objet InfoTitle
- /// Description de l'objet InfoTitle
- /// Genre de l'objet InfoTitle
- public void UpdateInfoTitle(InfoTitle title, string name, string url, string info, Artist artist, string description, Genre genre)
- {
- title.Name = name;
- title.ImageURL = url;
- title.Information = info;
- title.Description = description;
- title.Genre = genre;
- }
+ ///
+ /// Modifie un objet CustomTitle avec les informations données en paramètre
+ ///
+ /// Chemin d'accès du CustomTitle à modifier
+ /// Nom de l'objet CustomTitle
+ /// Chemin d'accès de l'image de l'objet CustomTitle
+ /// Informations de l'objet CustomTitle
+ /// Chemin d'accès de l'objet CustomTitle
+ public void UpdateCustomTitleByPath(string path, string name, string newUrl, string info, string newPath)
+ {
+ CustomTitle title = GetCustomTitleByPath(path);
+ if (title != null)
+ {
+ title.Name = name;
+ title.ImageURL = newUrl;
+ title.Information = info;
+ title.Path = newPath;
+ }
+ }
- ///
- /// Modifie un objet InfoTitle avec les informations données en paramètre
- ///
- /// Nom de l'objet InfoTitle à modifier
- /// Chemin d'accès de l'image de l'objet InfoTitle
- /// Informations de l'objet InfoTitle
- /// Artist de l'objet InfoTitle
- /// Description de l'objet InfoTitle
- /// Genre de l'objet InfoTitle
- public void UpdateInfoTitleByName(string name, string newUrl, string info, Artist artist, string description, Genre genre)
- {
- InfoTitle title = GetInfoTitleByName(name);
- if (title != null)
+ ///
+ /// Modifie un objet InfoTitle avec les informations données en paramètre
+ ///
+ /// InfoTitle à modifier
+ /// Nom de l'objet InfoTitle
+ /// Chemin d'accès de l'image de l'objet InfoTitle
+ /// Informations de l'objet InfoTitle
+ /// Artist de l'objet InfoTitle
+ /// Description de l'objet InfoTitle
+ /// Genre de l'objet InfoTitle
+ public void UpdateInfoTitle(InfoTitle title, string name, string url, string info, Artist artist, string description, Genre genre)
{
title.Name = name;
- title.ImageURL = newUrl;
+ title.ImageURL = url;
title.Information = info;
title.Description = description;
title.Genre = genre;
}
- }
- ///
- /// Modifie un objet Album avec les informations données en paramètre
- ///
- /// Album à modifier
- /// Nom de l'objet Album
- /// Chemin d'accès de l'image de l'objet Album
- /// Artist de l'objet Album
- /// Description de l'objet Album
- /// Informations de l'objet Album
- public void UpdateAlbum(Album album, string name, string url, Artist artist, string description, string info)
- {
- album.Name = name;
- album.ImageURL = url;
- album.Artist = artist;
- album.Description = description;
- album.Information = info;
- }
+ ///
+ /// Modifie un objet InfoTitle avec les informations données en paramètre
+ ///
+ /// Nom de l'objet InfoTitle à modifier
+ /// Chemin d'accès de l'image de l'objet InfoTitle
+ /// Informations de l'objet InfoTitle
+ /// Artist de l'objet InfoTitle
+ /// Description de l'objet InfoTitle
+ /// Genre de l'objet InfoTitle
+ public void UpdateInfoTitleByName(string name, string newUrl, string info, Artist artist, string description, Genre genre)
+ {
+ InfoTitle title = GetInfoTitleByName(name);
+ if (title != null)
+ {
+ title.Name = name;
+ title.ImageURL = newUrl;
+ title.Information = info;
+ title.Description = description;
+ title.Genre = genre;
+ }
+ }
- ///
- /// Modifie un objet Album avec les informations données en paramètre
- ///
- /// Nom de l'objet Album à modifier
- /// Chemin d'accès de l'image de l'objet Album
- /// Artist de l'objet Album
- /// Description de l'objet Album
- /// Informations de l'objet Album
- public void UpdateAlbumByName(string name, string newUrl, Artist artist, string description, string info)
- {
- Album album = GetAlbumByName(name);
- if (album != null)
+ ///
+ /// Modifie un objet Album avec les informations données en paramètre
+ ///
+ /// Album à modifier
+ /// Nom de l'objet Album
+ /// Chemin d'accès de l'image de l'objet Album
+ /// Artist de l'objet Album
+ /// Description de l'objet Album
+ /// Informations de l'objet Album
+ public void UpdateAlbum(Album album, string name, string url, Artist artist, string description, string info)
{
album.Name = name;
- album.ImageURL = newUrl;
+ album.ImageURL = url;
album.Artist = artist;
album.Description = description;
- album.Information= info;
+ album.Information = info;
}
- }
- ///
- /// Modifie un objet Album avec les informations données en paramètre
- ///
- /// Album à modifier
- /// Nom de l'objet Album
- /// Chemin d'accès de l'image de l'objet Album
- /// Nom de l'artiste de l'objet Album
- /// Description de l'objet Album
- /// Informations de l'objet Album
- public void UpdateAlbumByArtistName(Album album, string name, string url, string artist, string description, string info)
- {
- album.Name = name;
- album.ImageURL = url;
- Artist artist2 = GetArtistByName(artist);
- if (artist2 != null)
+ ///
+ /// Modifie un objet Album avec les informations données en paramètre
+ ///
+ /// Nom de l'objet Album à modifier
+ /// Chemin d'accès de l'image de l'objet Album
+ /// Artist de l'objet Album
+ /// Description de l'objet Album
+ /// Informations de l'objet Album
+ public void UpdateAlbumByName(string name, string newUrl, Artist artist, string description, string info)
{
- album.Artist = artist2;
+ Album album = GetAlbumByName(name);
+ if (album != null)
+ {
+ album.Name = name;
+ album.ImageURL = newUrl;
+ album.Artist = artist;
+ album.Description = description;
+ album.Information = info;
+ }
}
- album.Description = description;
- album.Information = info;
- }
- ///
- /// Modifie un objet Album avec les informations données en paramètre
- ///
- /// Nom de l'objet Album à modifier
- /// Chemin d'accès de l'image de l'objet Album
- /// Nom de l'artiste de l'objet Album
- /// Description de l'objet Album
- /// Informations de l'objet Album
- public void UpdateAlbumByNameByArtistName(string name, string newUrl, string artist, string description, string info)
- {
- Album album = GetAlbumByName(name);
- if (album != null)
+ ///
+ /// Modifie un objet Album avec les informations données en paramètre
+ ///
+ /// Album à modifier
+ /// Nom de l'objet Album
+ /// Chemin d'accès de l'image de l'objet Album
+ /// Nom de l'artiste de l'objet Album
+ /// Description de l'objet Album
+ /// Informations de l'objet Album
+ public void UpdateAlbumByArtistName(Album album, string name, string url, string artist, string description, string info)
{
album.Name = name;
- album.ImageURL = newUrl;
+ album.ImageURL = url;
Artist artist2 = GetArtistByName(artist);
if (artist2 != null)
{
@@ -814,291 +750,315 @@ public class LinqXmlSerialization : IDataManager
album.Description = description;
album.Information = info;
}
- }
- ///
- /// Modifie un objet Playlist avec les informations données en paramètre
- ///
- /// Playlist à modifier
- /// Nom de l'objet Playlist
- /// Description de l'objet Playlist
- /// Chemin d'accès de l'image de l'objet Playlist
- public void UpdatePlaylist(Playlist playlist, string name, string description, string url)
- {
- playlist.Name = name;
- playlist.Description = description;
- playlist.ImageURL = url;
- }
+ ///
+ /// Modifie un objet Album avec les informations données en paramètre
+ ///
+ /// Nom de l'objet Album à modifier
+ /// Chemin d'accès de l'image de l'objet Album
+ /// Nom de l'artiste de l'objet Album
+ /// Description de l'objet Album
+ /// Informations de l'objet Album
+ public void UpdateAlbumByNameByArtistName(string name, string newUrl, string artist, string description, string info)
+ {
+ Album album = GetAlbumByName(name);
+ if (album != null)
+ {
+ album.Name = name;
+ album.ImageURL = newUrl;
+ Artist artist2 = GetArtistByName(artist);
+ if (artist2 != null)
+ {
+ album.Artist = artist2;
+ }
+ album.Description = description;
+ album.Information = info;
+ }
+ }
- ///
- /// Modifie un objet Playlist avec les informations données en paramètre
- ///
- /// Nom de l'objet Playlist à modifier
- /// Description de l'objet Playlist
- /// Chemin d'accès de l'image de l'objet Playlist
- public void UpdatePlaylistByName(string name, string description, string newUrl)
- {
- Playlist playlist = GetPlaylistByName(name);
- if (playlist != null)
+ ///
+ /// Modifie un objet Playlist avec les informations données en paramètre
+ ///
+ /// Playlist à modifier
+ /// Nom de l'objet Playlist
+ /// Description de l'objet Playlist
+ /// Chemin d'accès de l'image de l'objet Playlist
+ public void UpdatePlaylist(Playlist playlist, string name, string description, string url)
{
playlist.Name = name;
playlist.Description = description;
- playlist.ImageURL = newUrl;
+ playlist.ImageURL = url;
}
- }
- ///
- /// Modifie un objet Artist avec les informations données en paramètre
- ///
- /// Artiste à modifier
- /// Nom de l'objet Artist
- public void UpdateArtist(Artist artist, string name)
- {
- artist.Name = name;
- }
+ ///
+ /// Modifie un objet Playlist avec les informations données en paramètre
+ ///
+ /// Nom de l'objet Playlist à modifier
+ /// Description de l'objet Playlist
+ /// Chemin d'accès de l'image de l'objet Playlist
+ public void UpdatePlaylistByName(string name, string description, string newUrl)
+ {
+ Playlist playlist = GetPlaylistByName(name);
+ if (playlist != null)
+ {
+ playlist.Name = name;
+ playlist.Description = description;
+ playlist.ImageURL = newUrl;
+ }
+ }
- ///
- /// Modifie un objet Artist avec les informations données en paramètre
- ///
- /// Nom de l'objet Artist à modifier
- /// Nouveau nom de l'objet Artist
- public void UpdateArtistByName(string name, string newName)
- {
- Artist artist = GetArtistByName(newName);
- if (artist != null)
+ ///
+ /// Modifie un objet Artist avec les informations données en paramètre
+ ///
+ /// Artiste à modifier
+ /// Nom de l'objet Artist
+ public void UpdateArtist(Artist artist, string name)
{
- artist.Name = newName;
+ artist.Name = name;
}
- }
- ///
- /// Permet de retirer des objets Album de l'application
- ///
- /// Liste des objets Album à retirer de l'application
- public void RemoveAlbums(List albumsList)
- {
- foreach (Album album in albumsList)
+ ///
+ /// Modifie un objet Artist avec les informations données en paramètre
+ ///
+ /// Nom de l'objet Artist à modifier
+ /// Nouveau nom de l'objet Artist
+ public void UpdateArtistByName(string name, string newName)
{
- albums.Remove(album);
+ Artist artist = GetArtistByName(newName);
+ if (artist != null)
+ {
+ artist.Name = newName;
+ }
}
- }
- ///
- /// Permet de retirer des objets Artist de l'application
- ///
- /// Liste des objets Artist à retirer de l'application
- public void RemoveArtists(List artistsList)
- {
- foreach(Artist artist in artistsList)
+ ///
+ /// Permet de retirer des objets Album de l'application
+ ///
+ /// Liste des objets Album à retirer de l'application
+ public void RemoveAlbums(List albumsList)
{
- artists.Remove(artist);
+ foreach (Album album in albumsList)
+ {
+ albums.Remove(album);
+ }
}
- }
- ///
- /// Permet de retirer des objets Playlist de l'application
- ///
- /// Liste des objets Playlist à retirer de l'application
- public void RemovePlaylists(List playlistsList)
- {
- foreach (Playlist playlist in playlistsList)
+ ///
+ /// Permet de retirer des objets Artist de l'application
+ ///
+ /// Liste des objets Artist à retirer de l'application
+ public void RemoveArtists(List artistsList)
{
- playlists.Remove(playlist);
+ foreach (Artist artist in artistsList)
+ {
+ artists.Remove(artist);
+ }
}
- }
- ///
- /// Permet de retirer des objets CustomTitle de l'application
- ///
- /// Liste des objets CustomTitle à retirer de l'application
- public void RemoveCustomTitles(List customTitlesList)
- {
- foreach(CustomTitle customTitle in customTitlesList)
+ ///
+ /// Permet de retirer des objets Playlist de l'application
+ ///
+ /// Liste des objets Playlist à retirer de l'application
+ public void RemovePlaylists(List playlistsList)
{
- customTitles.Remove(customTitle);
+ foreach (Playlist playlist in playlistsList)
+ {
+ playlists.Remove(playlist);
+ }
}
- }
- ///
- /// Permet de retirer des objets InfoTitle de l'application
- ///
- /// Liste des objets InfoTitle à retirer de l'application
- public void RemoveInfoTitles(List infoTitlesList)
- {
- foreach (InfoTitle infoTitle in infoTitlesList)
+ ///
+ /// Permet de retirer des objets CustomTitle de l'application
+ ///
+ /// Liste des objets CustomTitle à retirer de l'application
+ public void RemoveCustomTitles(List customTitlesList)
{
- infoTitles.Remove(infoTitle);
+ foreach (CustomTitle customTitle in customTitlesList)
+ {
+ customTitles.Remove(customTitle);
+ }
}
- }
- ///
- /// Permet de savoir si un objet Playlist appartient ou non à l'application
- ///
- /// Playlist à vérifier
- /// Booléen True s'il est contenu dans l'application, False sinon
- public bool ExistsPlaylist(Playlist playlist)
- {
- foreach(Playlist p in playlists)
+ ///
+ /// Permet de retirer des objets InfoTitle de l'application
+ ///
+ /// Liste des objets InfoTitle à retirer de l'application
+ public void RemoveInfoTitles(List infoTitlesList)
{
- if (p == playlist)
+ foreach (InfoTitle infoTitle in infoTitlesList)
{
- return true;
+ infoTitles.Remove(infoTitle);
}
}
- return false;
- }
- ///
- /// Permet de savoir si un objet Playlist appartient ou non à l'application selon son nom
- ///
- /// Nom de l'objet Playlist à vérifier
- /// Booléen True s'il est contenu dans l'application, False sinon
- public bool ExistsPlaylistByName(string name)
- {
- foreach(Playlist p in playlists)
+ ///
+ /// Permet de savoir si un objet Playlist appartient ou non à l'application
+ ///
+ /// Playlist à vérifier
+ /// Booléen True s'il est contenu dans l'application, False sinon
+ public bool ExistsPlaylist(Playlist playlist)
+ {
+ foreach (Playlist p in playlists)
+ {
+ if (p == playlist)
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ ///
+ /// Permet de savoir si un objet Playlist appartient ou non à l'application selon son nom
+ ///
+ /// Nom de l'objet Playlist à vérifier
+ /// Booléen True s'il est contenu dans l'application, False sinon
+ public bool ExistsPlaylistByName(string name)
{
- if (p.Name == name)
+ foreach (Playlist p in playlists)
{
- return true;
+ if (p.Name == name)
+ {
+ return true;
+ }
}
+ return false;
}
- return false;
- }
- ///
- /// Permet de savoir si un objet Album appartient ou non à l'application
- ///
- /// Album à vérifier
- /// Booléen True s'il est contenu dans l'application, False sinon
- public bool ExistsAlbum(Album album)
- {
- foreach(Album a in albums)
+ ///
+ /// Permet de savoir si un objet Album appartient ou non à l'application
+ ///
+ /// Album à vérifier
+ /// Booléen True s'il est contenu dans l'application, False sinon
+ public bool ExistsAlbum(Album album)
{
- if(a == album)
+ foreach (Album a in albums)
{
- return true;
+ if (a == album)
+ {
+ return true;
+ }
}
+ return false;
}
- return false;
- }
- ///
- /// Permet de savoir si un objet Album appartient ou non à l'application selon son nom
- ///
- /// Nom de l'objet Album à vérifier
- /// Booléen True s'il est contenu dans l'application, False sinon
- public bool ExistsAlbumByName(string name)
- {
- foreach(Album a in albums)
+ ///
+ /// Permet de savoir si un objet Album appartient ou non à l'application selon son nom
+ ///
+ /// Nom de l'objet Album à vérifier
+ /// Booléen True s'il est contenu dans l'application, False sinon
+ public bool ExistsAlbumByName(string name)
{
- if (a.Name == name)
+ foreach (Album a in albums)
{
- return true;
+ if (a.Name == name)
+ {
+ return true;
+ }
}
+ return false;
}
- return false;
- }
- ///
- /// Permet de savoir si un objet Artist appartient ou non à l'application
- ///
- /// Artist à vérifier
- /// Booléen True s'il est contenu dans l'application, False sinon
- public bool ExistsArtist(Artist artist)
- {
- foreach (Artist a in artists)
+ ///
+ /// Permet de savoir si un objet Artist appartient ou non à l'application
+ ///
+ /// Artist à vérifier
+ /// Booléen True s'il est contenu dans l'application, False sinon
+ public bool ExistsArtist(Artist artist)
{
- if (a == artist)
+ foreach (Artist a in artists)
{
- return true;
+ if (a == artist)
+ {
+ return true;
+ }
}
+ return false;
}
- return false;
- }
- ///
- /// Permet de savoir si un objet Artist appartient ou non à l'application selon son nom
- ///
- /// Nom de l'objet Artist à vérifier
- /// Booléen True s'il est contenu dans l'application, False sinon
- public bool ExistsArtistByName(string name)
- {
- foreach(Artist a in artists)
+ ///
+ /// Permet de savoir si un objet Artist appartient ou non à l'application selon son nom
+ ///
+ /// Nom de l'objet Artist à vérifier
+ /// Booléen True s'il est contenu dans l'application, False sinon
+ public bool ExistsArtistByName(string name)
{
- if(a.Name == name)
+ foreach (Artist a in artists)
{
- return true;
+ if (a.Name == name)
+ {
+ return true;
+ }
}
+ return false;
}
- return false;
- }
- ///
- /// Permet de savoir si un objet CustomTitle appartient ou non à l'application selon son nom
- ///
- /// Nom de l'objet CustomTitle à vérifier
- /// Booléen True s'il est contenu dans l'application, False sinon
- public bool ExistsCustomTitle(CustomTitle title)
- {
- foreach(CustomTitle ct in customTitles)
+ ///
+ /// Permet de savoir si un objet CustomTitle appartient ou non à l'application selon son nom
+ ///
+ /// Nom de l'objet CustomTitle à vérifier
+ /// Booléen True s'il est contenu dans l'application, False sinon
+ public bool ExistsCustomTitle(CustomTitle title)
{
- if(title == ct)
+ foreach (CustomTitle ct in customTitles)
{
- return true;
+ if (title == ct)
+ {
+ return true;
+ }
}
+ return false;
}
- return false;
- }
- ///
- /// Permet de savoir si un objet CustomTitle appartient ou non à l'application selon son nom
- ///
- /// Nom de l'objet CustomTitle à vérifier
- /// Booléen True s'il est contenu dans l'application, False sinon
- public bool ExistsCustomTitleByName(string name)
- {
- foreach(CustomTitle ct in customTitles)
+ ///
+ /// Permet de savoir si un objet CustomTitle appartient ou non à l'application selon son nom
+ ///
+ /// Nom de l'objet CustomTitle à vérifier
+ /// Booléen True s'il est contenu dans l'application, False sinon
+ public bool ExistsCustomTitleByName(string name)
{
- if(ct.Name == name)
+ foreach (CustomTitle ct in customTitles)
{
- return true;
+ if (ct.Name == name)
+ {
+ return true;
+ }
}
+ return false;
}
- return false;
- }
- ///
- /// Permet de savoir si un objet InfoTitle appartient ou non à l'application
- ///
- /// InfoTitle à vérifier
- /// Booléen True s'il est contenu dans l'application, False sinon
- public bool ExistsInfoTitle(InfoTitle title)
- {
- foreach(InfoTitle it in infoTitles)
+ ///
+ /// Permet de savoir si un objet InfoTitle appartient ou non à l'application
+ ///
+ /// InfoTitle à vérifier
+ /// Booléen True s'il est contenu dans l'application, False sinon
+ public bool ExistsInfoTitle(InfoTitle title)
{
- if(it == title)
+ foreach (InfoTitle it in infoTitles)
{
- return true;
+ if (it == title)
+ {
+ return true;
+ }
}
+ return false;
}
- return false;
- }
- ///
- /// Permet de savoir si un objet InfoTitle appartient ou non à l'application selon son nom
- ///
- /// Nom de l'objet InfoTitle à vérifier
- /// Booléen True s'il est contenu dans l'application, False sinon
- public bool ExistsInfoTitleByName(string name)
- {
- foreach(InfoTitle it in infoTitles)
+ ///
+ /// Permet de savoir si un objet InfoTitle appartient ou non à l'application selon son nom
+ ///
+ /// Nom de l'objet InfoTitle à vérifier
+ /// Booléen True s'il est contenu dans l'application, False sinon
+ public bool ExistsInfoTitleByName(string name)
{
- if(it.Name == name)
+ foreach (InfoTitle it in infoTitles)
{
- return true;
+ if (it.Name == name)
+ {
+ return true;
+ }
}
+ return false;
}
- return false;
}
-
-}
+}
\ No newline at end of file
diff --git a/Sources/Model/Stub/StubAlbum.cs b/Sources/Model/Stub/StubAlbum.cs
index 6abd3aa..744abca 100644
--- a/Sources/Model/Stub/StubAlbum.cs
+++ b/Sources/Model/Stub/StubAlbum.cs
@@ -1,93 +1,93 @@
using System.Collections.ObjectModel;
-using System.Linq;
-namespace Model.Stub;
-
-public class StubAlbum
+namespace Model.Stub
{
- public StubArtist StubArtist
+ public class StubAlbum
{
- get
+ public StubArtist StubArtist
{
- return stubArtist;
+ get
+ {
+ return stubArtist;
+ }
}
- }
- private readonly StubArtist stubArtist;
+ private readonly StubArtist stubArtist;
- public ObservableCollection Albums
- {
- get => albums;
- }
+ public ObservableCollection Albums
+ {
+ get => albums;
+ }
- private readonly ObservableCollection albums;
+ private readonly ObservableCollection albums;
- ///
- /// Constructeur de la classe StubAlbum
- ///
- public StubAlbum()
- {
- stubArtist = new StubArtist();
- albums = new ObservableCollection()
+ ///
+ /// Constructeur de la classe StubAlbum
+ ///
+ public StubAlbum()
{
- new Album("Adios Bahamas", "album1.jpg", StubArtist.GetArtistByName("Népal") ?? new Artist("Népal"), "Album post-mortem qui signé également le dernier de l'artiste", "Sortie : 2020"),
- new Album("445e Nuit", "album2.jpg", StubArtist.GetArtistByName("Népal") ?? new Artist("Népal"), "", "Sortie : 2017\n8 titres - 24 min"),
- new Album("Fenêtre Sur Rue", "album3.jpg", StubArtist.GetArtistByName("Hugo TSR") ?? new Artist("Hugo TSR"), "", "Sortie : 2012\n14 titres - 46 min"),
- new Album("Temps Mort", "album4.jpg", StubArtist.GetArtistByName("Booba") ?? new Artist("Booba"), "Premier album de Booba", "Sortie : 2002\n14 titres - 57 min"),
- new Album("Opéra Puccino", "album5.jpg", StubArtist.GetArtistByName("Oxmo Puccino") ?? new Artist("Oxmo Puccino"), "", "Sortie : 1998\n18 titres - 1h08min"),
- new Album("L'école du micro d'argent", "album6.jpg", StubArtist.GetArtistByName("IAM") ?? new Artist("IAM"), "", "Sortie : 1997\n16 titres - 1h13min"),
- new Album("Deux Frères", "album7.png", StubArtist.GetArtistByName("PNL") ?? new Artist("PNL"), "", "Sortie : 2019\n22 titres"),
- new Album("Dans la légende", "album8.jpg", StubArtist.GetArtistByName("PNL") ?? new Artist("PNL"), "", "Sortie : 2016\n16 titres - 1h06"),
- new Album("Night Visions", "album9.jpg", StubArtist.GetArtistByName("Imagine Dragons") ?? new Artist("Imagine Dragons"), "", ""),
- new Album("Smoke & Mirrors", "album10.jpg", StubArtist.GetArtistByName("Imagine Dragons") ?? new Artist("Imagine Dragons"), "", ""),
- new Album("Evolve", "album11.jpg", StubArtist.GetArtistByName("Imagine Dragons") ?? new Artist("Imagine Dragons"), "", ""),
- new Album("Origins", "album12.jpg", StubArtist.GetArtistByName("Imagine Dragons") ?? new Artist("Imagine Dragons"), "", ""),
- new Album("Mercury Act 1", "album13.jpg", StubArtist.GetArtistByName("Imagine Dragons") ?? new Artist("Imagine Dragons"), "", ""),
- new Album("Mercury Act 2", "album14.jpg", StubArtist.GetArtistByName("Imagine Dragons") ?? new Artist("Imagine Dragons"), "", "")
- };
- }
+ stubArtist = new StubArtist();
+ albums = new ObservableCollection()
+ {
+ new Album("Adios Bahamas", "album1.jpg", StubArtist.GetArtistByName("Népal") ?? new Artist("Népal"), "Album post-mortem qui signé également le dernier de l'artiste", "Sortie : 2020"),
+ new Album("445e Nuit", "album2.jpg", StubArtist.GetArtistByName("Népal") ?? new Artist("Népal"), "", "Sortie : 2017\n8 titres - 24 min"),
+ new Album("Fenêtre Sur Rue", "album3.jpg", StubArtist.GetArtistByName("Hugo TSR") ?? new Artist("Hugo TSR"), "", "Sortie : 2012\n14 titres - 46 min"),
+ new Album("Temps Mort", "album4.jpg", StubArtist.GetArtistByName("Booba") ?? new Artist("Booba"), "Premier album de Booba", "Sortie : 2002\n14 titres - 57 min"),
+ new Album("Opéra Puccino", "album5.jpg", StubArtist.GetArtistByName("Oxmo Puccino") ?? new Artist("Oxmo Puccino"), "", "Sortie : 1998\n18 titres - 1h08min"),
+ new Album("L'école du micro d'argent", "album6.jpg", StubArtist.GetArtistByName("IAM") ?? new Artist("IAM"), "", "Sortie : 1997\n16 titres - 1h13min"),
+ new Album("Deux Frères", "album7.png", StubArtist.GetArtistByName("PNL") ?? new Artist("PNL"), "", "Sortie : 2019\n22 titres"),
+ new Album("Dans la légende", "album8.jpg", StubArtist.GetArtistByName("PNL") ?? new Artist("PNL"), "", "Sortie : 2016\n16 titres - 1h06"),
+ new Album("Night Visions", "album9.jpg", StubArtist.GetArtistByName("Imagine Dragons") ?? new Artist("Imagine Dragons"), "", ""),
+ new Album("Smoke & Mirrors", "album10.jpg", StubArtist.GetArtistByName("Imagine Dragons") ?? new Artist("Imagine Dragons"), "", ""),
+ new Album("Evolve", "album11.jpg", StubArtist.GetArtistByName("Imagine Dragons") ?? new Artist("Imagine Dragons"), "", ""),
+ new Album("Origins", "album12.jpg", StubArtist.GetArtistByName("Imagine Dragons") ?? new Artist("Imagine Dragons"), "", ""),
+ new Album("Mercury Act 1", "album13.jpg", StubArtist.GetArtistByName("Imagine Dragons") ?? new Artist("Imagine Dragons"), "", ""),
+ new Album("Mercury Act 2", "album14.jpg", StubArtist.GetArtistByName("Imagine Dragons") ?? new Artist("Imagine Dragons"), "", "")
+ };
+ }
- ///
- /// Permet d'obtenir la liste des albums
- ///
- /// Retourne la liste des albums
- public ObservableCollection GetAlbums()
- {
- return albums;
- }
+ ///
+ /// Permet d'obtenir la liste des albums
+ ///
+ /// Retourne la liste des albums
+ public ObservableCollection GetAlbums()
+ {
+ return albums;
+ }
- ///
- /// Permet d'obtenir un album selon son nom
- ///
- /// Nom de l'album recherché
- /// Retourne l'album correspondant au nom donné en paramètre
- public Album GetAlbumByName(string name)
- {
- foreach(Album album in albums)
+ ///
+ /// Permet d'obtenir un album selon son nom
+ ///
+ /// Nom de l'album recherché
+ /// Retourne l'album correspondant au nom donné en paramètre
+ public Album GetAlbumByName(string name)
{
- if (name == album.Name)
+ foreach (Album album in albums)
{
- return album;
+ if (name == album.Name)
+ {
+ return album;
+ }
}
+ return null;
}
- return null;
- }
- ///
- /// Permet d'ajouter un album à la liste des albums
- ///
- /// Album à ajouter
- public void AddAlbum(Album album)
- {
- albums.Add(album);
- }
+ ///
+ /// Permet d'ajouter un album à la liste des albums
+ ///
+ /// Album à ajouter
+ public void AddAlbum(Album album)
+ {
+ albums.Add(album);
+ }
- ///
- /// Permet de retirer un album de la liste des albums
- ///
- /// Album à retirer
- public void RemoveAlbum(Album album)
- {
- albums.Remove(album);
+ ///
+ /// Permet de retirer un album de la liste des albums
+ ///
+ /// Album à retirer
+ public void RemoveAlbum(Album album)
+ {
+ albums.Remove(album);
+ }
}
-}
+}
\ No newline at end of file
diff --git a/Sources/Model/Stub/StubArtist.cs b/Sources/Model/Stub/StubArtist.cs
index 46ad0f7..af334c0 100644
--- a/Sources/Model/Stub/StubArtist.cs
+++ b/Sources/Model/Stub/StubArtist.cs
@@ -1,72 +1,72 @@
-namespace Model.Stub;
-
-public class StubArtist
-{
- public List Artists
+namespace Model.Stub {
+ public class StubArtist
{
- get => artists;
- }
+ public List Artists
+ {
+ get => artists;
+ }
- private readonly List artists;
+ private readonly List artists;
- ///
- /// Constructeur de la classe StubArtist
- ///
- public StubArtist()
- {
- artists = new List()
+ ///
+ /// Constructeur de la classe StubArtist
+ ///
+ public StubArtist()
{
- new Artist("Imagine Dragons"),
- new Artist("Népal"),
- new Artist("Hugo TSR"),
- new Artist("Booba"),
- new Artist("Oxmo Puccino"),
- new Artist("IAM"),
- new Artist("PNL")
- };
- }
+ artists = new List()
+ {
+ new Artist("Imagine Dragons"),
+ new Artist("Népal"),
+ new Artist("Hugo TSR"),
+ new Artist("Booba"),
+ new Artist("Oxmo Puccino"),
+ new Artist("IAM"),
+ new Artist("PNL")
+ };
+ }
- ///
- /// Permet d'obtenir la liste des artistes
- ///
- /// Retourne la liste des artistes
- public List GetArtists()
- {
- return artists;
- }
+ ///
+ /// Permet d'obtenir la liste des artistes
+ ///
+ /// Retourne la liste des artistes
+ public List GetArtists()
+ {
+ return artists;
+ }
- ///
- /// Permet d'obtenir un artiste selon son nom
- ///
- /// Nom de l'artiste recherché
- /// Retourne l'artiste correspondant au nom donné en paramètre
- public Artist GetArtistByName(string name)
- {
- foreach (var artist in artists)
+ ///
+ /// Permet d'obtenir un artiste selon son nom
+ ///
+ /// Nom de l'artiste recherché
+ /// Retourne l'artiste correspondant au nom donné en paramètre
+ public Artist GetArtistByName(string name)
{
- if (artist.Name == name)
+ foreach (var artist in artists)
{
- return artist;
+ if (artist.Name == name)
+ {
+ return artist;
+ }
}
+ return null;
}
- return null;
- }
- ///
- /// Permet d'ajouter un artiste à la liste des artistes
- ///
- /// Artiste à ajouter
- public void AddArtist(Artist artist)
- {
- artists.Add(artist);
- }
+ ///
+ /// Permet d'ajouter un artiste à la liste des artistes
+ ///
+ /// Artiste à ajouter
+ public void AddArtist(Artist artist)
+ {
+ artists.Add(artist);
+ }
- ///
- /// Permet de retirer un artiste de la liste des artistes
- ///
- /// Artiste à retirer
- public void RemoveArtist(Artist artist)
- {
- artists.Remove(artist);
+ ///
+ /// Permet de retirer un artiste de la liste des artistes
+ ///
+ /// Artiste à retirer
+ public void RemoveArtist(Artist artist)
+ {
+ artists.Remove(artist);
+ }
}
-}
+}
\ No newline at end of file
diff --git a/Sources/Model/Stub/StubCustomTitle.cs b/Sources/Model/Stub/StubCustomTitle.cs
index 0f473c6..c909947 100644
--- a/Sources/Model/Stub/StubCustomTitle.cs
+++ b/Sources/Model/Stub/StubCustomTitle.cs
@@ -1,85 +1,86 @@
using System.Collections.ObjectModel;
-namespace Model.Stub;
-
-public class StubCustomTitle
+namespace Model.Stub
{
-
- public ObservableCollection CustomTitles
+ public class StubCustomTitle
{
- get => customTitles;
- }
- private readonly ObservableCollection customTitles;
+ public ObservableCollection CustomTitles
+ {
+ get => customTitles;
+ }
- ///
- /// Constructeur de la classe StubCustomTitle
- ///
- public StubCustomTitle()
- {
- CustomTitle Custom1 = new CustomTitle("MaMusique", "mp3.png", "info1", "chemin1");
- CustomTitle Custom2 = new CustomTitle("MusiqueGeniale", "wav.png", "info2", "chemin2");
- CustomTitle Custom3 = new CustomTitle("custom3", "midi.png", "info3", "chemin3");
- CustomTitle Custom4 = new CustomTitle("custom4", "ogg.png", "info4", "chemin4");
- CustomTitle Custom5 = new CustomTitle("custom5", "mp3.png", "info5", "chemin5");
- CustomTitle Custom6 = new CustomTitle("custom6", "mp3.png", "info6", "chemin6");
- CustomTitle Custom7 = new CustomTitle("custom7", "wav.png", "info7", "chemin7");
- CustomTitle Custom8 = new CustomTitle("custom8", "ogg.png", "info8", "chemin8");
- CustomTitle Custom9 = new CustomTitle("custom9", "mp3.png", "info9", "chemin9");
- CustomTitle Custom10 = new CustomTitle("custom10", "wav.png", "info10", "chemin10");
- CustomTitle Custom11 = new CustomTitle("custom11", "mp3.png", "info11", "chemin11");
+ private readonly ObservableCollection customTitles;
- customTitles = new ObservableCollection()
+ ///
+ /// Constructeur de la classe StubCustomTitle
+ ///
+ public StubCustomTitle()
{
- Custom1, Custom2, Custom3, Custom4, Custom5, Custom6, Custom7, Custom8, Custom9, Custom10, Custom11
- };
- }
+ CustomTitle Custom1 = new CustomTitle("MaMusique", "mp3.png", "info1", "chemin1");
+ CustomTitle Custom2 = new CustomTitle("MusiqueGeniale", "wav.png", "info2", "chemin2");
+ CustomTitle Custom3 = new CustomTitle("custom3", "midi.png", "info3", "chemin3");
+ CustomTitle Custom4 = new CustomTitle("custom4", "ogg.png", "info4", "chemin4");
+ CustomTitle Custom5 = new CustomTitle("custom5", "mp3.png", "info5", "chemin5");
+ CustomTitle Custom6 = new CustomTitle("custom6", "mp3.png", "info6", "chemin6");
+ CustomTitle Custom7 = new CustomTitle("custom7", "wav.png", "info7", "chemin7");
+ CustomTitle Custom8 = new CustomTitle("custom8", "ogg.png", "info8", "chemin8");
+ CustomTitle Custom9 = new CustomTitle("custom9", "mp3.png", "info9", "chemin9");
+ CustomTitle Custom10 = new CustomTitle("custom10", "wav.png", "info10", "chemin10");
+ CustomTitle Custom11 = new CustomTitle("custom11", "mp3.png", "info11", "chemin11");
- ///
- /// Permet d'obtenir la liste des CustomTitle
- ///
- /// Retourne la liste des CustomTitle
- public ObservableCollection GetCustomTitles()
- {
- return customTitles;
- }
+ customTitles = new ObservableCollection()
+ {
+ Custom1, Custom2, Custom3, Custom4, Custom5, Custom6, Custom7, Custom8, Custom9, Custom10, Custom11
+ };
+ }
- ///
- /// Permet d'obtenir une liste de CustomTitle selon les noms donnés en paramètre
- ///
- /// Liste des noms des CustomTitle recherchés
- /// Retourne la liste des CustomTitle correspondant aux noms donnés en paramètre
- public List GetCustomTitlesByNames(List names)
- {
- List Customs = new List();
- foreach(var name in names)
+ ///
+ /// Permet d'obtenir la liste des CustomTitle
+ ///
+ /// Retourne la liste des CustomTitle
+ public ObservableCollection GetCustomTitles()
{
- foreach (var title in customTitles)
+ return customTitles;
+ }
+
+ ///
+ /// Permet d'obtenir une liste de CustomTitle selon les noms donnés en paramètre
+ ///
+ /// Liste des noms des CustomTitle recherchés
+ /// Retourne la liste des CustomTitle correspondant aux noms donnés en paramètre
+ public List GetCustomTitlesByNames(List names)
+ {
+ List Customs = new List();
+ foreach (var name in names)
{
- if (name == title.Name)
+ foreach (var title in customTitles)
{
- Customs.Add(title);
+ if (name == title.Name)
+ {
+ Customs.Add(title);
+ }
}
}
+ return Customs;
}
- return Customs;
- }
- ///
- /// Permet d'ajouter un CustomTitle à la liste des CustomTitle
- ///
- /// CustomTitle à ajouter
- public void AddCustomTitle(CustomTitle customTitle)
- {
- customTitles.Add(customTitle);
- }
+ ///
+ /// Permet d'ajouter un CustomTitle à la liste des CustomTitle
+ ///
+ /// CustomTitle à ajouter
+ public void AddCustomTitle(CustomTitle customTitle)
+ {
+ customTitles.Add(customTitle);
+ }
- ///
- /// Permet de retirer un CustomTitle de la liste des CustomTitle
- ///
- /// CustomTitle à retirer
- public void RemoveCustomTitle(CustomTitle customTitle)
- {
- customTitles.Remove(customTitle);
+ ///
+ /// Permet de retirer un CustomTitle de la liste des CustomTitle
+ ///
+ /// CustomTitle à retirer
+ public void RemoveCustomTitle(CustomTitle customTitle)
+ {
+ customTitles.Remove(customTitle);
+ }
}
-}
+}
\ No newline at end of file
diff --git a/Sources/Model/Stub/StubInfoTitle.cs b/Sources/Model/Stub/StubInfoTitle.cs
index e49b465..2f69b80 100644
--- a/Sources/Model/Stub/StubInfoTitle.cs
+++ b/Sources/Model/Stub/StubInfoTitle.cs
@@ -1,346 +1,347 @@
using System.Collections.ObjectModel;
-namespace Model.Stub;
-
-public class StubInfoTitle
+namespace Model.Stub
{
- public StubAlbum StubAlbum
+ public class StubInfoTitle
{
- get
+ public StubAlbum StubAlbum
{
- return stubAlbum;
+ get
+ {
+ return stubAlbum;
+ }
}
- }
- private readonly StubAlbum stubAlbum;
+ private readonly StubAlbum stubAlbum;
- public ObservableCollection InfoTitles
- {
- get => infoTitles;
- }
+ public ObservableCollection InfoTitles
+ {
+ get => infoTitles;
+ }
- private readonly ObservableCollection infoTitles;
+ private readonly ObservableCollection infoTitles;
- ///
- /// Constructeur de la classe StubInfoTitle
- ///
- public StubInfoTitle()
- {
- stubAlbum = new StubAlbum();
- Artist ImagineDragons = StubAlbum.StubArtist.GetArtistByName("Imagine Dragons") ?? new Artist("Imagine Dragons");
- Artist PNL = StubAlbum.StubArtist.GetArtistByName("PNL") ?? new Artist("PNL");
- Artist Nepal = StubAlbum.StubArtist.GetArtistByName("Népal") ?? new Artist("Népal");
- Artist Booba = StubAlbum.StubArtist.GetArtistByName("Booba") ?? new Artist("Booba");
- Artist IAM = StubAlbum.StubArtist.GetArtistByName("IAM") ?? new Artist("IAM");
- Artist Hugo = StubAlbum.StubArtist.GetArtistByName("Hugo TSR") ?? new Artist("Hugo TSR");
- Artist Oxmo = StubAlbum.StubArtist.GetArtistByName("Oxmo Puccino") ?? new Artist("Oxmo Puccino");
- Album MercuryAct2 = stubAlbum.GetAlbumByName("Mercury Act 2") ?? new Album("Mercury Act 2", "album14.png", ImagineDragons, "desc", "infos");
- Album MercuryAct1 = stubAlbum.GetAlbumByName("Mercury Act 1") ?? new Album("Mercury Act 1", "album13.png", ImagineDragons, "desc", "infos");
- Album Origins = stubAlbum.GetAlbumByName("Origins") ?? new Album("Origins", "album12.png", ImagineDragons, "desc", "infos");
- Album Evolve = stubAlbum.GetAlbumByName("Evolve") ?? new Album("Evolve", "album11.png", ImagineDragons, "desc", "infos");
- Album SmokeAndMirrors = stubAlbum.GetAlbumByName("Smoke & Mirrors") ?? new Album("Smoke & Mirrors", "album11.png", ImagineDragons, "desc", "infos");
- Album NightVisions = stubAlbum.GetAlbumByName("Night Visions") ?? new Album("Night Visions", "album11.png", ImagineDragons, "desc", "infos");
- Album AB = stubAlbum.GetAlbumByName("Adios Bahamas") ?? new Album("Adios Bahamas", "album1.jpg", Nepal, "Album post-mortem qui signé également le dernier de l'artiste", "Sortie : 2020");
- Album E445 = stubAlbum.GetAlbumByName("445e Nuit") ?? new Album("445e Nuit", "album2.jpg", Nepal, "", "Sortie : 2017\n8 titres - 24 min");
- Album FSR = stubAlbum.GetAlbumByName("Fenêtre Sur Rue") ?? new Album("Fenêtre Sur Rue", "album3.jpg", Hugo, "", "Sortie : 2012\n14 titres - 46 min");
- Album TM = stubAlbum.GetAlbumByName("Temps Mort") ?? new Album("Temps Mort", "album4.jpg", Booba, "Premier album de Booba", "Sortie : 2002\n14 titres - 57 min");
- Album OP = stubAlbum.GetAlbumByName("Opéra Puccino") ?? new Album("Opéra Puccino", "album5.jpg", Oxmo, "", "Sortie : 1998\n18 titres - 1h08min");
- Album EMA = stubAlbum.GetAlbumByName("L'école du micro d'argent") ?? new Album("L'école du micro d'argent", "album6.jpg", IAM, "", "Sortie : 1997\n16 titres - 1h13min");
- Album DF = stubAlbum.GetAlbumByName("Deux Frères") ?? new Album("Deux Frères", "album7.png", PNL, "", "Sortie : 2019\n22 titres");
- Album DLL = stubAlbum.GetAlbumByName("Dans la légende") ?? new Album("Dans la légende", "album8.jpg", PNL, "", "Sortie : 2016\n16 titres - 1h06");
- infoTitles = new ObservableCollection()
+ ///
+ /// Constructeur de la classe StubInfoTitle
+ ///
+ public StubInfoTitle()
{
- new InfoTitle("Bones", MercuryAct2.ImageURL, "infos", "desc", Genre.POP, MercuryAct2.ID),
- new InfoTitle("Symphony", MercuryAct2.ImageURL, "infos", "desc", Genre.POP, MercuryAct2.ID),
- new InfoTitle("Sharks", MercuryAct2.ImageURL, "infos", "desc", Genre.POP, MercuryAct2.ID),
- new InfoTitle("I don't like myself", MercuryAct2.ImageURL, "infos", "desc", Genre.POP, MercuryAct2.ID),
- new InfoTitle("Blur", MercuryAct2.ImageURL, "infos", "desc", Genre.POP, MercuryAct2.ID),
- new InfoTitle("Higher ground", MercuryAct2.ImageURL, "infos", "desc", Genre.POP, MercuryAct2.ID),
- new InfoTitle("Crushed", MercuryAct2.ImageURL, "infos", "desc", Genre.POP, MercuryAct2.ID),
- new InfoTitle("Take it easy", MercuryAct2.ImageURL, "infos", "desc", Genre.POP, MercuryAct2.ID),
- new InfoTitle("Waves", MercuryAct2.ImageURL, "infos", "desc", Genre.POP, MercuryAct2.ID),
- new InfoTitle("I'm happy", MercuryAct2.ImageURL, "infos", "desc", Genre.POP, MercuryAct2.ID),
- new InfoTitle("Ferris wheel", MercuryAct2.ImageURL, "infos", "desc", Genre.POP, MercuryAct2.ID),
- new InfoTitle("Peace of mind", MercuryAct2.ImageURL, "infos", "desc", Genre.POP, MercuryAct2.ID),
- new InfoTitle("Sirens", MercuryAct2.ImageURL, "infos", "desc", Genre.POP, MercuryAct2.ID),
- new InfoTitle("Tied", MercuryAct2.ImageURL, "infos", "desc", Genre.POP, MercuryAct2.ID),
- new InfoTitle("Younger", MercuryAct2.ImageURL, "infos", "desc", Genre.POP, MercuryAct2.ID),
- new InfoTitle("Continual", MercuryAct2.ImageURL, "infos", "desc", Genre.POP, MercuryAct2.ID),
- new InfoTitle("They don't know you like I do", MercuryAct2.ImageURL, "infos", "desc", Genre.POP, MercuryAct2.ID),
+ stubAlbum = new StubAlbum();
+ Artist ImagineDragons = StubAlbum.StubArtist.GetArtistByName("Imagine Dragons") ?? new Artist("Imagine Dragons");
+ Artist PNL = StubAlbum.StubArtist.GetArtistByName("PNL") ?? new Artist("PNL");
+ Artist Nepal = StubAlbum.StubArtist.GetArtistByName("Népal") ?? new Artist("Népal");
+ Artist Booba = StubAlbum.StubArtist.GetArtistByName("Booba") ?? new Artist("Booba");
+ Artist IAM = StubAlbum.StubArtist.GetArtistByName("IAM") ?? new Artist("IAM");
+ Artist Hugo = StubAlbum.StubArtist.GetArtistByName("Hugo TSR") ?? new Artist("Hugo TSR");
+ Artist Oxmo = StubAlbum.StubArtist.GetArtistByName("Oxmo Puccino") ?? new Artist("Oxmo Puccino");
+ Album MercuryAct2 = stubAlbum.GetAlbumByName("Mercury Act 2") ?? new Album("Mercury Act 2", "album14.png", ImagineDragons, "desc", "infos");
+ Album MercuryAct1 = stubAlbum.GetAlbumByName("Mercury Act 1") ?? new Album("Mercury Act 1", "album13.png", ImagineDragons, "desc", "infos");
+ Album Origins = stubAlbum.GetAlbumByName("Origins") ?? new Album("Origins", "album12.png", ImagineDragons, "desc", "infos");
+ Album Evolve = stubAlbum.GetAlbumByName("Evolve") ?? new Album("Evolve", "album11.png", ImagineDragons, "desc", "infos");
+ Album SmokeAndMirrors = stubAlbum.GetAlbumByName("Smoke & Mirrors") ?? new Album("Smoke & Mirrors", "album11.png", ImagineDragons, "desc", "infos");
+ Album NightVisions = stubAlbum.GetAlbumByName("Night Visions") ?? new Album("Night Visions", "album11.png", ImagineDragons, "desc", "infos");
+ Album AB = stubAlbum.GetAlbumByName("Adios Bahamas") ?? new Album("Adios Bahamas", "album1.jpg", Nepal, "Album post-mortem qui signé également le dernier de l'artiste", "Sortie : 2020");
+ Album E445 = stubAlbum.GetAlbumByName("445e Nuit") ?? new Album("445e Nuit", "album2.jpg", Nepal, "", "Sortie : 2017\n8 titres - 24 min");
+ Album FSR = stubAlbum.GetAlbumByName("Fenêtre Sur Rue") ?? new Album("Fenêtre Sur Rue", "album3.jpg", Hugo, "", "Sortie : 2012\n14 titres - 46 min");
+ Album TM = stubAlbum.GetAlbumByName("Temps Mort") ?? new Album("Temps Mort", "album4.jpg", Booba, "Premier album de Booba", "Sortie : 2002\n14 titres - 57 min");
+ Album OP = stubAlbum.GetAlbumByName("Opéra Puccino") ?? new Album("Opéra Puccino", "album5.jpg", Oxmo, "", "Sortie : 1998\n18 titres - 1h08min");
+ Album EMA = stubAlbum.GetAlbumByName("L'école du micro d'argent") ?? new Album("L'école du micro d'argent", "album6.jpg", IAM, "", "Sortie : 1997\n16 titres - 1h13min");
+ Album DF = stubAlbum.GetAlbumByName("Deux Frères") ?? new Album("Deux Frères", "album7.png", PNL, "", "Sortie : 2019\n22 titres");
+ Album DLL = stubAlbum.GetAlbumByName("Dans la légende") ?? new Album("Dans la légende", "album8.jpg", PNL, "", "Sortie : 2016\n16 titres - 1h06");
+ infoTitles = new ObservableCollection()
+ {
+ new InfoTitle("Bones", MercuryAct2.ImageURL, "infos", "desc", Genre.POP, MercuryAct2.ID),
+ new InfoTitle("Symphony", MercuryAct2.ImageURL, "infos", "desc", Genre.POP, MercuryAct2.ID),
+ new InfoTitle("Sharks", MercuryAct2.ImageURL, "infos", "desc", Genre.POP, MercuryAct2.ID),
+ new InfoTitle("I don't like myself", MercuryAct2.ImageURL, "infos", "desc", Genre.POP, MercuryAct2.ID),
+ new InfoTitle("Blur", MercuryAct2.ImageURL, "infos", "desc", Genre.POP, MercuryAct2.ID),
+ new InfoTitle("Higher ground", MercuryAct2.ImageURL, "infos", "desc", Genre.POP, MercuryAct2.ID),
+ new InfoTitle("Crushed", MercuryAct2.ImageURL, "infos", "desc", Genre.POP, MercuryAct2.ID),
+ new InfoTitle("Take it easy", MercuryAct2.ImageURL, "infos", "desc", Genre.POP, MercuryAct2.ID),
+ new InfoTitle("Waves", MercuryAct2.ImageURL, "infos", "desc", Genre.POP, MercuryAct2.ID),
+ new InfoTitle("I'm happy", MercuryAct2.ImageURL, "infos", "desc", Genre.POP, MercuryAct2.ID),
+ new InfoTitle("Ferris wheel", MercuryAct2.ImageURL, "infos", "desc", Genre.POP, MercuryAct2.ID),
+ new InfoTitle("Peace of mind", MercuryAct2.ImageURL, "infos", "desc", Genre.POP, MercuryAct2.ID),
+ new InfoTitle("Sirens", MercuryAct2.ImageURL, "infos", "desc", Genre.POP, MercuryAct2.ID),
+ new InfoTitle("Tied", MercuryAct2.ImageURL, "infos", "desc", Genre.POP, MercuryAct2.ID),
+ new InfoTitle("Younger", MercuryAct2.ImageURL, "infos", "desc", Genre.POP, MercuryAct2.ID),
+ new InfoTitle("Continual", MercuryAct2.ImageURL, "infos", "desc", Genre.POP, MercuryAct2.ID),
+ new InfoTitle("They don't know you like I do", MercuryAct2.ImageURL, "infos", "desc", Genre.POP, MercuryAct2.ID),
- new InfoTitle("Enemy", MercuryAct1.ImageURL, "infos", "desc", Genre.POP, MercuryAct1.ID),
- new InfoTitle("My life", MercuryAct1.ImageURL, "infos", "desc", Genre.POP, MercuryAct1.ID),
- new InfoTitle("Lonely", MercuryAct1.ImageURL, "infos", "desc", Genre.POP, MercuryAct1.ID),
- new InfoTitle("Wrecked", MercuryAct1.ImageURL, "infos", "desc", Genre.POP, MercuryAct1.ID),
- new InfoTitle("Monday", MercuryAct1.ImageURL, "infos", "desc", Genre.POP, MercuryAct1.ID),
- new InfoTitle("#1", MercuryAct1.ImageURL, "infos", "desc", Genre.POP, MercuryAct1.ID),
- new InfoTitle("Easy come easy go", MercuryAct1.ImageURL, "infos", "desc", Genre.POP, MercuryAct1.ID),
- new InfoTitle("Giants", MercuryAct1.ImageURL, "infos", "desc", Genre.POP, MercuryAct1.ID),
- new InfoTitle("It's ok", MercuryAct1.ImageURL, "infos", "desc", Genre.POP, MercuryAct1.ID),
- new InfoTitle("Dull knives", MercuryAct1.ImageURL, "infos", "desc", Genre.POP, MercuryAct1.ID),
- new InfoTitle("Follow you", MercuryAct1.ImageURL, "infos", "desc", Genre.POP, MercuryAct1.ID),
- new InfoTitle("Cutthroat", MercuryAct1.ImageURL, "infos", "desc", Genre.POP, MercuryAct1.ID),
- new InfoTitle("No time for toxic people", MercuryAct1.ImageURL, "infos", "desc", Genre.POP, MercuryAct1.ID),
- new InfoTitle("One day", MercuryAct1.ImageURL, "infos", "desc", Genre.POP, MercuryAct1.ID),
+ new InfoTitle("Enemy", MercuryAct1.ImageURL, "infos", "desc", Genre.POP, MercuryAct1.ID),
+ new InfoTitle("My life", MercuryAct1.ImageURL, "infos", "desc", Genre.POP, MercuryAct1.ID),
+ new InfoTitle("Lonely", MercuryAct1.ImageURL, "infos", "desc", Genre.POP, MercuryAct1.ID),
+ new InfoTitle("Wrecked", MercuryAct1.ImageURL, "infos", "desc", Genre.POP, MercuryAct1.ID),
+ new InfoTitle("Monday", MercuryAct1.ImageURL, "infos", "desc", Genre.POP, MercuryAct1.ID),
+ new InfoTitle("#1", MercuryAct1.ImageURL, "infos", "desc", Genre.POP, MercuryAct1.ID),
+ new InfoTitle("Easy come easy go", MercuryAct1.ImageURL, "infos", "desc", Genre.POP, MercuryAct1.ID),
+ new InfoTitle("Giants", MercuryAct1.ImageURL, "infos", "desc", Genre.POP, MercuryAct1.ID),
+ new InfoTitle("It's ok", MercuryAct1.ImageURL, "infos", "desc", Genre.POP, MercuryAct1.ID),
+ new InfoTitle("Dull knives", MercuryAct1.ImageURL, "infos", "desc", Genre.POP, MercuryAct1.ID),
+ new InfoTitle("Follow you", MercuryAct1.ImageURL, "infos", "desc", Genre.POP, MercuryAct1.ID),
+ new InfoTitle("Cutthroat", MercuryAct1.ImageURL, "infos", "desc", Genre.POP, MercuryAct1.ID),
+ new InfoTitle("No time for toxic people", MercuryAct1.ImageURL, "infos", "desc", Genre.POP, MercuryAct1.ID),
+ new InfoTitle("One day", MercuryAct1.ImageURL, "infos", "desc", Genre.POP, MercuryAct1.ID),
- new InfoTitle("Natural", Origins.ImageURL, "infos", "desc", Genre.POP, Origins.ID),
- new InfoTitle("Boomerang", Origins.ImageURL, "infos", "desc", Genre.POP, Origins.ID),
- new InfoTitle("Machine", Origins.ImageURL, "infos", "desc", Genre.POP, Origins.ID),
- new InfoTitle("Cool out", Origins.ImageURL, "infos", "desc", Genre.POP, Origins.ID),
- new InfoTitle("Bad Liar", Origins.ImageURL, "infos", "desc", Genre.POP, Origins.ID),
- new InfoTitle("West coast", Origins.ImageURL, "infos", "desc", Genre.POP, Origins.ID),
- new InfoTitle("Zero", Origins.ImageURL, "infos", "desc", Genre.POP, Origins.ID),
- new InfoTitle("Bullet in a gun", Origins.ImageURL, "infos", "desc", Genre.POP, Origins.ID),
- new InfoTitle("Digital", Origins.ImageURL, "infos", "desc", Genre.POP, Origins.ID),
- new InfoTitle("Only", Origins.ImageURL, "infos", "desc", Genre.POP, Origins.ID),
- new InfoTitle("Stuck", Origins.ImageURL, "infos", "desc", Genre.POP, Origins.ID),
- new InfoTitle("Love", Origins.ImageURL, "infos", "desc", Genre.POP, Origins.ID),
+ new InfoTitle("Natural", Origins.ImageURL, "infos", "desc", Genre.POP, Origins.ID),
+ new InfoTitle("Boomerang", Origins.ImageURL, "infos", "desc", Genre.POP, Origins.ID),
+ new InfoTitle("Machine", Origins.ImageURL, "infos", "desc", Genre.POP, Origins.ID),
+ new InfoTitle("Cool out", Origins.ImageURL, "infos", "desc", Genre.POP, Origins.ID),
+ new InfoTitle("Bad Liar", Origins.ImageURL, "infos", "desc", Genre.POP, Origins.ID),
+ new InfoTitle("West coast", Origins.ImageURL, "infos", "desc", Genre.POP, Origins.ID),
+ new InfoTitle("Zero", Origins.ImageURL, "infos", "desc", Genre.POP, Origins.ID),
+ new InfoTitle("Bullet in a gun", Origins.ImageURL, "infos", "desc", Genre.POP, Origins.ID),
+ new InfoTitle("Digital", Origins.ImageURL, "infos", "desc", Genre.POP, Origins.ID),
+ new InfoTitle("Only", Origins.ImageURL, "infos", "desc", Genre.POP, Origins.ID),
+ new InfoTitle("Stuck", Origins.ImageURL, "infos", "desc", Genre.POP, Origins.ID),
+ new InfoTitle("Love", Origins.ImageURL, "infos", "desc", Genre.POP, Origins.ID),
- new InfoTitle("I don't know why", Evolve.ImageURL, "infos", "desc", Genre.POP, Evolve.ID),
- new InfoTitle("Whatever it takes", Evolve.ImageURL, "infos", "desc", Genre.POP, Evolve.ID),
- new InfoTitle("Believer", Evolve.ImageURL, "infos", "desc", Genre.POP, Evolve.ID),
- new InfoTitle("Walking the wire", Evolve.ImageURL, "infos", "desc", Genre.POP, Evolve.ID),
- new InfoTitle("Rise up", Evolve.ImageURL, "infos", "desc", Genre.POP, Evolve.ID),
- new InfoTitle("I'll make it up to you", Evolve.ImageURL, "infos", "desc", Genre.POP, Evolve.ID),
- new InfoTitle("Yesterday", Evolve.ImageURL, "infos", "desc", Genre.POP, Evolve.ID),
- new InfoTitle("Mouth of the river", Evolve.ImageURL, "infos", "desc", Genre.POP, Evolve.ID),
- new InfoTitle("Thunder", Evolve.ImageURL, "infos", "desc", Genre.POP, Evolve.ID),
- new InfoTitle("Start over", Evolve.ImageURL, "infos", "desc", Genre.POP, Evolve.ID),
- new InfoTitle("Dancing in the dark", Evolve.ImageURL, "infos", "desc", Genre.POP, Evolve.ID),
+ new InfoTitle("I don't know why", Evolve.ImageURL, "infos", "desc", Genre.POP, Evolve.ID),
+ new InfoTitle("Whatever it takes", Evolve.ImageURL, "infos", "desc", Genre.POP, Evolve.ID),
+ new InfoTitle("Believer", Evolve.ImageURL, "infos", "desc", Genre.POP, Evolve.ID),
+ new InfoTitle("Walking the wire", Evolve.ImageURL, "infos", "desc", Genre.POP, Evolve.ID),
+ new InfoTitle("Rise up", Evolve.ImageURL, "infos", "desc", Genre.POP, Evolve.ID),
+ new InfoTitle("I'll make it up to you", Evolve.ImageURL, "infos", "desc", Genre.POP, Evolve.ID),
+ new InfoTitle("Yesterday", Evolve.ImageURL, "infos", "desc", Genre.POP, Evolve.ID),
+ new InfoTitle("Mouth of the river", Evolve.ImageURL, "infos", "desc", Genre.POP, Evolve.ID),
+ new InfoTitle("Thunder", Evolve.ImageURL, "infos", "desc", Genre.POP, Evolve.ID),
+ new InfoTitle("Start over", Evolve.ImageURL, "infos", "desc", Genre.POP, Evolve.ID),
+ new InfoTitle("Dancing in the dark", Evolve.ImageURL, "infos", "desc", Genre.POP, Evolve.ID),
- new InfoTitle("Shots", SmokeAndMirrors.ImageURL, "infos", "desc", Genre.POP, SmokeAndMirrors.ID),
- new InfoTitle("Gold", SmokeAndMirrors.ImageURL, "infos", "desc", Genre.POP, SmokeAndMirrors.ID),
- new InfoTitle("Smoke and Mirrors", SmokeAndMirrors.ImageURL, "infos", "desc", Genre.POP, SmokeAndMirrors.ID),
- new InfoTitle("I'm so sorry", SmokeAndMirrors.ImageURL, "infos", "desc", Genre.POP, SmokeAndMirrors.ID),
- new InfoTitle("I bet my life", SmokeAndMirrors.ImageURL, "infos", "desc", Genre.POP, SmokeAndMirrors.ID),
- new InfoTitle("Polaroid", SmokeAndMirrors.ImageURL, "infos", "desc", Genre.POP, SmokeAndMirrors.ID),
- new InfoTitle("Friction", SmokeAndMirrors.ImageURL, "infos", "desc", Genre.POP, SmokeAndMirrors.ID),
- new InfoTitle("It comes back to you", SmokeAndMirrors.ImageURL, "infos", "desc", Genre.POP, SmokeAndMirrors.ID),
- new InfoTitle("Dream", SmokeAndMirrors.ImageURL, "infos", "desc", Genre.POP, SmokeAndMirrors.ID),
- new InfoTitle("Trouble", SmokeAndMirrors.ImageURL, "infos", "desc", Genre.POP, SmokeAndMirrors.ID),
- new InfoTitle("Summer", SmokeAndMirrors.ImageURL, "infos", "desc", Genre.POP, SmokeAndMirrors.ID),
- new InfoTitle("Hopeless Opus", SmokeAndMirrors.ImageURL, "infos", "desc", Genre.POP, SmokeAndMirrors.ID),
- new InfoTitle("The fall", SmokeAndMirrors.ImageURL, "infos", "desc", Genre.POP, SmokeAndMirrors.ID),
- new InfoTitle("Thief", SmokeAndMirrors.ImageURL, "infos", "desc", Genre.POP, SmokeAndMirrors.ID),
- new InfoTitle("The Unknown", SmokeAndMirrors.ImageURL, "infos", "desc", Genre.POP, SmokeAndMirrors.ID),
- new InfoTitle("Second chances", SmokeAndMirrors.ImageURL, "infos", "desc", Genre.POP, SmokeAndMirrors.ID),
- new InfoTitle("Release", SmokeAndMirrors.ImageURL, "infos", "desc", Genre.POP, SmokeAndMirrors.ID),
- new InfoTitle("Warriors", SmokeAndMirrors.ImageURL, "infos", "desc", Genre.POP, SmokeAndMirrors.ID),
+ new InfoTitle("Shots", SmokeAndMirrors.ImageURL, "infos", "desc", Genre.POP, SmokeAndMirrors.ID),
+ new InfoTitle("Gold", SmokeAndMirrors.ImageURL, "infos", "desc", Genre.POP, SmokeAndMirrors.ID),
+ new InfoTitle("Smoke and Mirrors", SmokeAndMirrors.ImageURL, "infos", "desc", Genre.POP, SmokeAndMirrors.ID),
+ new InfoTitle("I'm so sorry", SmokeAndMirrors.ImageURL, "infos", "desc", Genre.POP, SmokeAndMirrors.ID),
+ new InfoTitle("I bet my life", SmokeAndMirrors.ImageURL, "infos", "desc", Genre.POP, SmokeAndMirrors.ID),
+ new InfoTitle("Polaroid", SmokeAndMirrors.ImageURL, "infos", "desc", Genre.POP, SmokeAndMirrors.ID),
+ new InfoTitle("Friction", SmokeAndMirrors.ImageURL, "infos", "desc", Genre.POP, SmokeAndMirrors.ID),
+ new InfoTitle("It comes back to you", SmokeAndMirrors.ImageURL, "infos", "desc", Genre.POP, SmokeAndMirrors.ID),
+ new InfoTitle("Dream", SmokeAndMirrors.ImageURL, "infos", "desc", Genre.POP, SmokeAndMirrors.ID),
+ new InfoTitle("Trouble", SmokeAndMirrors.ImageURL, "infos", "desc", Genre.POP, SmokeAndMirrors.ID),
+ new InfoTitle("Summer", SmokeAndMirrors.ImageURL, "infos", "desc", Genre.POP, SmokeAndMirrors.ID),
+ new InfoTitle("Hopeless Opus", SmokeAndMirrors.ImageURL, "infos", "desc", Genre.POP, SmokeAndMirrors.ID),
+ new InfoTitle("The fall", SmokeAndMirrors.ImageURL, "infos", "desc", Genre.POP, SmokeAndMirrors.ID),
+ new InfoTitle("Thief", SmokeAndMirrors.ImageURL, "infos", "desc", Genre.POP, SmokeAndMirrors.ID),
+ new InfoTitle("The Unknown", SmokeAndMirrors.ImageURL, "infos", "desc", Genre.POP, SmokeAndMirrors.ID),
+ new InfoTitle("Second chances", SmokeAndMirrors.ImageURL, "infos", "desc", Genre.POP, SmokeAndMirrors.ID),
+ new InfoTitle("Release", SmokeAndMirrors.ImageURL, "infos", "desc", Genre.POP, SmokeAndMirrors.ID),
+ new InfoTitle("Warriors", SmokeAndMirrors.ImageURL, "infos", "desc", Genre.POP, SmokeAndMirrors.ID),
- new InfoTitle("Radioactive", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
- new InfoTitle("Tiptoe", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
- new InfoTitle("It's time", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
- new InfoTitle("Demons", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
- new InfoTitle("On top of the world", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
- new InfoTitle("Amsterdam", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
- new InfoTitle("Hear me", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
- new InfoTitle("Every night", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
- new InfoTitle("Bleeding out", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
- new InfoTitle("Underdog", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
- new InfoTitle("Nothing left to say / Rocks", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
- new InfoTitle("Cha-ching (till we grow older)", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
- new InfoTitle("Working man", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
- new InfoTitle("My fault", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
- new InfoTitle("Round and round", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
- new InfoTitle("The river", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
- new InfoTitle("America", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
- new InfoTitle("Selene", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
- new InfoTitle("Fallen", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
- new InfoTitle("Cover up", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
- new InfoTitle("Love of mine", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
- new InfoTitle("Bubble", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
- new InfoTitle("Tokyo", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
+ new InfoTitle("Radioactive", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
+ new InfoTitle("Tiptoe", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
+ new InfoTitle("It's time", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
+ new InfoTitle("Demons", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
+ new InfoTitle("On top of the world", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
+ new InfoTitle("Amsterdam", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
+ new InfoTitle("Hear me", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
+ new InfoTitle("Every night", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
+ new InfoTitle("Bleeding out", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
+ new InfoTitle("Underdog", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
+ new InfoTitle("Nothing left to say / Rocks", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
+ new InfoTitle("Cha-ching (till we grow older)", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
+ new InfoTitle("Working man", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
+ new InfoTitle("My fault", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
+ new InfoTitle("Round and round", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
+ new InfoTitle("The river", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
+ new InfoTitle("America", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
+ new InfoTitle("Selene", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
+ new InfoTitle("Fallen", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
+ new InfoTitle("Cover up", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
+ new InfoTitle("Love of mine", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
+ new InfoTitle("Bubble", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
+ new InfoTitle("Tokyo", NightVisions.ImageURL, "infos", "desc", Genre.POP, NightVisions.ID),
- new InfoTitle("Opening", AB.ImageURL, "infos", "desc", Genre.HIP_HOP, AB.ID),
- new InfoTitle("Ennemis, Pt. 2", AB.ImageURL, "infos", "desc", Genre.HIP_HOP, AB.ID),
- new InfoTitle("En face", AB.ImageURL, "infos", "desc", Genre.HIP_HOP, AB.ID),
- new InfoTitle("Trajectoire", AB.ImageURL, "infos", "desc", Genre.HIP_HOP, AB.ID),
- new InfoTitle("Vibe", AB.ImageURL, "infos", "desc", Genre.HIP_HOP, AB.ID),
- new InfoTitle("Lemonade", AB.ImageURL, "infos", "desc", Genre.HIP_HOP, AB.ID),
- new InfoTitle("Là-bas", AB.ImageURL, "infos", "desc", Genre.HIP_HOP, AB.ID),
- new InfoTitle("Sundance", AB.ImageURL, "infos", "desc", Genre.HIP_HOP, AB.ID),
- new InfoTitle("Milionaire", AB.ImageURL, "infos", "desc", Genre.HIP_HOP, AB.ID),
- new InfoTitle("Sans voir", AB.ImageURL, "infos", "desc", Genre.HIP_HOP, AB.ID),
- new InfoTitle("Crossfader", AB.ImageURL, "infos", "desc", Genre.HIP_HOP, AB.ID),
- new InfoTitle("Daruma", AB.ImageURL, "infos", "desc", Genre.HIP_HOP, AB.ID),
+ new InfoTitle("Opening", AB.ImageURL, "infos", "desc", Genre.HIP_HOP, AB.ID),
+ new InfoTitle("Ennemis, Pt. 2", AB.ImageURL, "infos", "desc", Genre.HIP_HOP, AB.ID),
+ new InfoTitle("En face", AB.ImageURL, "infos", "desc", Genre.HIP_HOP, AB.ID),
+ new InfoTitle("Trajectoire", AB.ImageURL, "infos", "desc", Genre.HIP_HOP, AB.ID),
+ new InfoTitle("Vibe", AB.ImageURL, "infos", "desc", Genre.HIP_HOP, AB.ID),
+ new InfoTitle("Lemonade", AB.ImageURL, "infos", "desc", Genre.HIP_HOP, AB.ID),
+ new InfoTitle("Là-bas", AB.ImageURL, "infos", "desc", Genre.HIP_HOP, AB.ID),
+ new InfoTitle("Sundance", AB.ImageURL, "infos", "desc", Genre.HIP_HOP, AB.ID),
+ new InfoTitle("Milionaire", AB.ImageURL, "infos", "desc", Genre.HIP_HOP, AB.ID),
+ new InfoTitle("Sans voir", AB.ImageURL, "infos", "desc", Genre.HIP_HOP, AB.ID),
+ new InfoTitle("Crossfader", AB.ImageURL, "infos", "desc", Genre.HIP_HOP, AB.ID),
+ new InfoTitle("Daruma", AB.ImageURL, "infos", "desc", Genre.HIP_HOP, AB.ID),
- new InfoTitle("Niveau 1", E445.ImageURL, "infos", "desc", Genre.HIP_HOP, E445.ID),
- new InfoTitle("Maladavexa", E445.ImageURL, "infos", "desc", Genre.HIP_HOP, E445.ID),
- new InfoTitle("Love64 (Interlude)", E445.ImageURL, "infos", "desc", Genre.HIP_HOP, E445.ID),
- new InfoTitle("Deadpornstars", E445.ImageURL, "infos", "desc", Genre.HIP_HOP, E445.ID),
- new InfoTitle("Jugements", E445.ImageURL, "infos", "desc", Genre.HIP_HOP, E445.ID),
- new InfoTitle("Insomnie", E445.ImageURL, "infos", "desc", Genre.HIP_HOP, E445.ID),
- new InfoTitle("Kodak White", E445.ImageURL, "infos", "desc", Genre.HIP_HOP, E445.ID),
- new InfoTitle("Kamehouse", E445.ImageURL, "infos", "desc", Genre.HIP_HOP, E445.ID),
+ new InfoTitle("Niveau 1", E445.ImageURL, "infos", "desc", Genre.HIP_HOP, E445.ID),
+ new InfoTitle("Maladavexa", E445.ImageURL, "infos", "desc", Genre.HIP_HOP, E445.ID),
+ new InfoTitle("Love64 (Interlude)", E445.ImageURL, "infos", "desc", Genre.HIP_HOP, E445.ID),
+ new InfoTitle("Deadpornstars", E445.ImageURL, "infos", "desc", Genre.HIP_HOP, E445.ID),
+ new InfoTitle("Jugements", E445.ImageURL, "infos", "desc", Genre.HIP_HOP, E445.ID),
+ new InfoTitle("Insomnie", E445.ImageURL, "infos", "desc", Genre.HIP_HOP, E445.ID),
+ new InfoTitle("Kodak White", E445.ImageURL, "infos", "desc", Genre.HIP_HOP, E445.ID),
+ new InfoTitle("Kamehouse", E445.ImageURL, "infos", "desc", Genre.HIP_HOP, E445.ID),
- new InfoTitle("Temps Mort", TM.ImageURL, "infos", "desc", Genre.HIP_HOP, TM.ID),
- new InfoTitle("Independants", TM.ImageURL, "infos", "desc", Genre.HIP_HOP, TM.ID),
- new InfoTitle("Ecoute bien", TM.ImageURL, "infos", "desc", Genre.HIP_HOP, TM.ID),
- new InfoTitle("Ma définition", TM.ImageURL, "infos", "desc", Genre.HIP_HOP, TM.ID),
- new InfoTitle("Jusqu'ici tout va bien", TM.ImageURL, "infos", "desc", Genre.HIP_HOP, TM.ID),
- new InfoTitle("Repose en paix", TM.ImageURL, "infos", "desc", Genre.HIP_HOP, TM.ID),
- new InfoTitle("Le Bitume avec une plume", TM.ImageURL, "infos", "desc", Genre.HIP_HOP, TM.ID),
- new InfoTitle("Animals", TM.ImageURL, "infos", "desc", Genre.HIP_HOP, TM.ID),
- new InfoTitle("Sans ratures", TM.ImageURL, "infos", "desc", Genre.HIP_HOP, TM.ID),
- new InfoTitle("100-8 zoo", TM.ImageURL, "infos", "desc", Genre.HIP_HOP, TM.ID),
- new InfoTitle("On m'a dit", TM.ImageURL, "infos", "desc", Genre.HIP_HOP, TM.ID),
- new InfoTitle("Nouvelle école", TM.ImageURL, "infos", "desc", Genre.HIP_HOP, TM.ID),
- new InfoTitle("De mauvaise augure", TM.ImageURL, "infos", "desc", Genre.HIP_HOP, TM.ID),
- new InfoTitle("Strass et paillettes", TM.ImageURL, "infos", "desc", Genre.HIP_HOP, TM.ID),
+ new InfoTitle("Temps Mort", TM.ImageURL, "infos", "desc", Genre.HIP_HOP, TM.ID),
+ new InfoTitle("Independants", TM.ImageURL, "infos", "desc", Genre.HIP_HOP, TM.ID),
+ new InfoTitle("Ecoute bien", TM.ImageURL, "infos", "desc", Genre.HIP_HOP, TM.ID),
+ new InfoTitle("Ma définition", TM.ImageURL, "infos", "desc", Genre.HIP_HOP, TM.ID),
+ new InfoTitle("Jusqu'ici tout va bien", TM.ImageURL, "infos", "desc", Genre.HIP_HOP, TM.ID),
+ new InfoTitle("Repose en paix", TM.ImageURL, "infos", "desc", Genre.HIP_HOP, TM.ID),
+ new InfoTitle("Le Bitume avec une plume", TM.ImageURL, "infos", "desc", Genre.HIP_HOP, TM.ID),
+ new InfoTitle("Animals", TM.ImageURL, "infos", "desc", Genre.HIP_HOP, TM.ID),
+ new InfoTitle("Sans ratures", TM.ImageURL, "infos", "desc", Genre.HIP_HOP, TM.ID),
+ new InfoTitle("100-8 zoo", TM.ImageURL, "infos", "desc", Genre.HIP_HOP, TM.ID),
+ new InfoTitle("On m'a dit", TM.ImageURL, "infos", "desc", Genre.HIP_HOP, TM.ID),
+ new InfoTitle("Nouvelle école", TM.ImageURL, "infos", "desc", Genre.HIP_HOP, TM.ID),
+ new InfoTitle("De mauvaise augure", TM.ImageURL, "infos", "desc", Genre.HIP_HOP, TM.ID),
+ new InfoTitle("Strass et paillettes", TM.ImageURL, "infos", "desc", Genre.HIP_HOP, TM.ID),
- new InfoTitle("Visions de vie", OP.ImageURL, "infos", "desc", Genre.HIP_HOP, OP.ID),
- new InfoTitle("Black Mafioso (Interlude)", OP.ImageURL, "infos", "desc", Genre.HIP_HOP, OP.ID),
- new InfoTitle("Hitman", OP.ImageURL, "infos", "desc", Genre.HIP_HOP, OP.ID),
- new InfoTitle("Qui peut le nier !", OP.ImageURL, "infos", "desc", Genre.HIP_HOP, OP.ID),
- new InfoTitle("Peur noire", OP.ImageURL, "infos", "desc", Genre.HIP_HOP, OP.ID),
- new InfoTitle("L'enfant seul", OP.ImageURL, "infos", "desc", Genre.HIP_HOP, OP.ID),
- new InfoTitle("Alias Jon Smoke", OP.ImageURL, "infos", "desc", Genre.HIP_HOP, OP.ID),
- new InfoTitle("Peu de gens le savent (Interlude)", OP.ImageURL, "infos", "desc", Genre.HIP_HOP, OP.ID),
- new InfoTitle("Amour & jalousie", OP.ImageURL, "infos", "desc", Genre.HIP_HOP, OP.ID),
- new InfoTitle("24 heures à vivre", OP.ImageURL, "infos", "desc", Genre.HIP_HOP, OP.ID),
- new InfoTitle("Sacré samedi soir", OP.ImageURL, "infos", "desc", Genre.HIP_HOP, OP.ID),
- new InfoTitle("Le jour où tu partiras", OP.ImageURL, "infos", "desc", Genre.HIP_HOP, OP.ID),
- new InfoTitle("Sortilège", OP.ImageURL, "infos", "desc", Genre.HIP_HOP, OP.ID),
- new InfoTitle("Black Cyrano de Bergerac (Interlude)", OP.ImageURL, "infos", "desc", Genre.HIP_HOP, OP.ID),
- new InfoTitle("Mensongeur", OP.ImageURL, "infos", "desc", Genre.HIP_HOP, OP.ID),
- new InfoTitle("La lettre", OP.ImageURL, "infos", "desc", Genre.HIP_HOP, OP.ID),
- new InfoTitle("La loi du point final", OP.ImageURL, "infos", "desc", Genre.HIP_HOP, OP.ID),
- new InfoTitle("Mourir 1000 fois", OP.ImageURL, "infos", "desc", Genre.HIP_HOP, OP.ID),
+ new InfoTitle("Visions de vie", OP.ImageURL, "infos", "desc", Genre.HIP_HOP, OP.ID),
+ new InfoTitle("Black Mafioso (Interlude)", OP.ImageURL, "infos", "desc", Genre.HIP_HOP, OP.ID),
+ new InfoTitle("Hitman", OP.ImageURL, "infos", "desc", Genre.HIP_HOP, OP.ID),
+ new InfoTitle("Qui peut le nier !", OP.ImageURL, "infos", "desc", Genre.HIP_HOP, OP.ID),
+ new InfoTitle("Peur noire", OP.ImageURL, "infos", "desc", Genre.HIP_HOP, OP.ID),
+ new InfoTitle("L'enfant seul", OP.ImageURL, "infos", "desc", Genre.HIP_HOP, OP.ID),
+ new InfoTitle("Alias Jon Smoke", OP.ImageURL, "infos", "desc", Genre.HIP_HOP, OP.ID),
+ new InfoTitle("Peu de gens le savent (Interlude)", OP.ImageURL, "infos", "desc", Genre.HIP_HOP, OP.ID),
+ new InfoTitle("Amour & jalousie", OP.ImageURL, "infos", "desc", Genre.HIP_HOP, OP.ID),
+ new InfoTitle("24 heures à vivre", OP.ImageURL, "infos", "desc", Genre.HIP_HOP, OP.ID),
+ new InfoTitle("Sacré samedi soir", OP.ImageURL, "infos", "desc", Genre.HIP_HOP, OP.ID),
+ new InfoTitle("Le jour où tu partiras", OP.ImageURL, "infos", "desc", Genre.HIP_HOP, OP.ID),
+ new InfoTitle("Sortilège", OP.ImageURL, "infos", "desc", Genre.HIP_HOP, OP.ID),
+ new InfoTitle("Black Cyrano de Bergerac (Interlude)", OP.ImageURL, "infos", "desc", Genre.HIP_HOP, OP.ID),
+ new InfoTitle("Mensongeur", OP.ImageURL, "infos", "desc", Genre.HIP_HOP, OP.ID),
+ new InfoTitle("La lettre", OP.ImageURL, "infos", "desc", Genre.HIP_HOP, OP.ID),
+ new InfoTitle("La loi du point final", OP.ImageURL, "infos", "desc", Genre.HIP_HOP, OP.ID),
+ new InfoTitle("Mourir 1000 fois", OP.ImageURL, "infos", "desc", Genre.HIP_HOP, OP.ID),
- new InfoTitle("L'école du micro d'argent", EMA.ImageURL, "infos", "desc", Genre.HIP_HOP, EMA.ID),
- new InfoTitle("Dangereux", EMA.ImageURL, "infos", "desc", Genre.HIP_HOP, EMA.ID),
- new InfoTitle("Nés sous la même étoile", EMA.ImageURL, "infos", "desc", Genre.HIP_HOP, EMA.ID),
- new InfoTitle("La Saga", EMA.ImageURL, "infos", "desc", Genre.HIP_HOP, EMA.ID),
- new InfoTitle("Petit frère", EMA.ImageURL, "infos", "desc", Genre.HIP_HOP, EMA.ID),
- new InfoTitle("Elle donne son corps avant son nom", EMA.ImageURL, "infos", "desc", Genre.HIP_HOP, EMA.ID),
- new InfoTitle("L'empire du côté obscur", EMA.ImageURL, "infos", "desc", Genre.HIP_HOP, EMA.ID),
- new InfoTitle("Regarde", EMA.ImageURL, "infos", "desc", Genre.HIP_HOP, EMA.ID),
- new InfoTitle("L'Enfer", EMA.ImageURL, "infos", "desc", Genre.HIP_HOP, EMA.ID),
- new InfoTitle("Quand tu allais, on revenait", EMA.ImageURL, "infos", "desc", Genre.HIP_HOP, EMA.ID),
- new InfoTitle("Chez le mac", EMA.ImageURL, "infos", "desc", Genre.HIP_HOP, EMA.ID),
- new InfoTitle("Un bon son brut pour les truands", EMA.ImageURL, "infos", "desc", Genre.HIP_HOP, EMA.ID),
- new InfoTitle("Bouger la tête", EMA.ImageURL, "infos", "desc", Genre.HIP_HOP, EMA.ID),
- new InfoTitle("Un cri court dans la nuit", EMA.ImageURL, "infos", "desc", Genre.HIP_HOP, EMA.ID),
- new InfoTitle("Libère mon imagination", EMA.ImageURL, "infos", "desc", Genre.HIP_HOP, EMA.ID),
- new InfoTitle("Demain, c'est loin", EMA.ImageURL, "infos", "desc", Genre.HIP_HOP, EMA.ID),
+ new InfoTitle("L'école du micro d'argent", EMA.ImageURL, "infos", "desc", Genre.HIP_HOP, EMA.ID),
+ new InfoTitle("Dangereux", EMA.ImageURL, "infos", "desc", Genre.HIP_HOP, EMA.ID),
+ new InfoTitle("Nés sous la même étoile", EMA.ImageURL, "infos", "desc", Genre.HIP_HOP, EMA.ID),
+ new InfoTitle("La Saga", EMA.ImageURL, "infos", "desc", Genre.HIP_HOP, EMA.ID),
+ new InfoTitle("Petit frère", EMA.ImageURL, "infos", "desc", Genre.HIP_HOP, EMA.ID),
+ new InfoTitle("Elle donne son corps avant son nom", EMA.ImageURL, "infos", "desc", Genre.HIP_HOP, EMA.ID),
+ new InfoTitle("L'empire du côté obscur", EMA.ImageURL, "infos", "desc", Genre.HIP_HOP, EMA.ID),
+ new InfoTitle("Regarde", EMA.ImageURL, "infos", "desc", Genre.HIP_HOP, EMA.ID),
+ new InfoTitle("L'Enfer", EMA.ImageURL, "infos", "desc", Genre.HIP_HOP, EMA.ID),
+ new InfoTitle("Quand tu allais, on revenait", EMA.ImageURL, "infos", "desc", Genre.HIP_HOP, EMA.ID),
+ new InfoTitle("Chez le mac", EMA.ImageURL, "infos", "desc", Genre.HIP_HOP, EMA.ID),
+ new InfoTitle("Un bon son brut pour les truands", EMA.ImageURL, "infos", "desc", Genre.HIP_HOP, EMA.ID),
+ new InfoTitle("Bouger la tête", EMA.ImageURL, "infos", "desc", Genre.HIP_HOP, EMA.ID),
+ new InfoTitle("Un cri court dans la nuit", EMA.ImageURL, "infos", "desc", Genre.HIP_HOP, EMA.ID),
+ new InfoTitle("Libère mon imagination", EMA.ImageURL, "infos", "desc", Genre.HIP_HOP, EMA.ID),
+ new InfoTitle("Demain, c'est loin", EMA.ImageURL, "infos", "desc", Genre.HIP_HOP, EMA.ID),
- new InfoTitle("Au DD", DF.ImageURL, "infos", "desc", Genre.HIP_HOP, DF.ID),
- new InfoTitle("Autre monde", DF.ImageURL, "infos", "desc", Genre.HIP_HOP, DF.ID),
- new InfoTitle("Chang", DF.ImageURL, "infos", "desc", Genre.HIP_HOP, DF.ID),
- new InfoTitle("Blanka", DF.ImageURL, "infos", "desc", Genre.HIP_HOP, DF.ID),
- new InfoTitle("91's", DF.ImageURL, "infos", "desc", Genre.HIP_HOP, DF.ID),
- new InfoTitle("À l'ammoniaque", DF.ImageURL, "infos", "desc", Genre.HIP_HOP, DF.ID),
- new InfoTitle("Celsius", DF.ImageURL, "infos", "desc", Genre.HIP_HOP, DF.ID),
- new InfoTitle("Deux frères", DF.ImageURL, "infos", "desc", Genre.HIP_HOP, DF.ID),
- new InfoTitle("Hasta la Vista", DF.ImageURL, "infos", "desc", Genre.HIP_HOP, DF.ID),
- new InfoTitle("Coeurs", DF.ImageURL, "infos", "desc", Genre.HIP_HOP, DF.ID),
- new InfoTitle("Shenmue", DF.ImageURL, "infos", "desc", Genre.HIP_HOP, DF.ID),
- new InfoTitle("Kuta Ubud", DF.ImageURL, "infos", "desc", Genre.HIP_HOP, DF.ID),
- new InfoTitle("Menace", DF.ImageURL, "infos", "desc", Genre.HIP_HOP, DF.ID),
- new InfoTitle("Zoulou Tchaing", DF.ImageURL, "infos", "desc", Genre.HIP_HOP, DF.ID),
- new InfoTitle("Déconnecté", DF.ImageURL, "infos", "desc", Genre.HIP_HOP, DF.ID),
- new InfoTitle("La misère est si belle", DF.ImageURL, "infos", "desc", Genre.HIP_HOP, DF.ID),
+ new InfoTitle("Au DD", DF.ImageURL, "infos", "desc", Genre.HIP_HOP, DF.ID),
+ new InfoTitle("Autre monde", DF.ImageURL, "infos", "desc", Genre.HIP_HOP, DF.ID),
+ new InfoTitle("Chang", DF.ImageURL, "infos", "desc", Genre.HIP_HOP, DF.ID),
+ new InfoTitle("Blanka", DF.ImageURL, "infos", "desc", Genre.HIP_HOP, DF.ID),
+ new InfoTitle("91's", DF.ImageURL, "infos", "desc", Genre.HIP_HOP, DF.ID),
+ new InfoTitle("À l'ammoniaque", DF.ImageURL, "infos", "desc", Genre.HIP_HOP, DF.ID),
+ new InfoTitle("Celsius", DF.ImageURL, "infos", "desc", Genre.HIP_HOP, DF.ID),
+ new InfoTitle("Deux frères", DF.ImageURL, "infos", "desc", Genre.HIP_HOP, DF.ID),
+ new InfoTitle("Hasta la Vista", DF.ImageURL, "infos", "desc", Genre.HIP_HOP, DF.ID),
+ new InfoTitle("Coeurs", DF.ImageURL, "infos", "desc", Genre.HIP_HOP, DF.ID),
+ new InfoTitle("Shenmue", DF.ImageURL, "infos", "desc", Genre.HIP_HOP, DF.ID),
+ new InfoTitle("Kuta Ubud", DF.ImageURL, "infos", "desc", Genre.HIP_HOP, DF.ID),
+ new InfoTitle("Menace", DF.ImageURL, "infos", "desc", Genre.HIP_HOP, DF.ID),
+ new InfoTitle("Zoulou Tchaing", DF.ImageURL, "infos", "desc", Genre.HIP_HOP, DF.ID),
+ new InfoTitle("Déconnecté", DF.ImageURL, "infos", "desc", Genre.HIP_HOP, DF.ID),
+ new InfoTitle("La misère est si belle", DF.ImageURL, "infos", "desc", Genre.HIP_HOP, DF.ID),
- new InfoTitle("DA", DLL.ImageURL, "infos", "desc", Genre.HIP_HOP, DLL.ID),
- new InfoTitle("Naha", DLL.ImageURL, "infos", "desc", Genre.HIP_HOP, DLL.ID),
- new InfoTitle("Dans la légende", DLL.ImageURL, "infos", "desc", Genre.HIP_HOP, DLL.ID),
- new InfoTitle("Mira", DLL.ImageURL, "infos", "desc", Genre.HIP_HOP, DLL.ID),
- new InfoTitle("J'suis QLF", DLL.ImageURL, "infos", "desc", Genre.HIP_HOP, DLL.ID),
- new InfoTitle("La vie est belle", DLL.ImageURL, "infos", "desc", Genre.HIP_HOP, DLL.ID),
- new InfoTitle("Kratos", DLL.ImageURL, "infos", "desc", Genre.HIP_HOP, DLL.ID),
- new InfoTitle("Luz de Luna", DLL.ImageURL, "infos", "desc", Genre.HIP_HOP, DLL.ID),
- new InfoTitle("Tu sais pas", DLL.ImageURL, "infos", "desc", Genre.HIP_HOP, DLL.ID),
- new InfoTitle("Sheita", DLL.ImageURL, "infos", "desc", Genre.HIP_HOP, DLL.ID),
- new InfoTitle("Humain", DLL.ImageURL, "infos", "desc", Genre.HIP_HOP, DLL.ID),
- new InfoTitle("Bambina", DLL.ImageURL, "infos", "desc", Genre.HIP_HOP, DLL.ID),
- new InfoTitle("Bené", DLL.ImageURL, "infos", "desc", Genre.HIP_HOP, DLL.ID),
- new InfoTitle("Uranus", DLL.ImageURL, "infos", "desc", Genre.HIP_HOP, DLL.ID),
- new InfoTitle("Onizuka", DLL.ImageURL, "infos", "desc", Genre.HIP_HOP, DLL.ID),
- new InfoTitle("Jusqu'au dernier gramme", DLL.ImageURL, "infos", "desc", Genre.HIP_HOP, DLL.ID),
+ new InfoTitle("DA", DLL.ImageURL, "infos", "desc", Genre.HIP_HOP, DLL.ID),
+ new InfoTitle("Naha", DLL.ImageURL, "infos", "desc", Genre.HIP_HOP, DLL.ID),
+ new InfoTitle("Dans la légende", DLL.ImageURL, "infos", "desc", Genre.HIP_HOP, DLL.ID),
+ new InfoTitle("Mira", DLL.ImageURL, "infos", "desc", Genre.HIP_HOP, DLL.ID),
+ new InfoTitle("J'suis QLF", DLL.ImageURL, "infos", "desc", Genre.HIP_HOP, DLL.ID),
+ new InfoTitle("La vie est belle", DLL.ImageURL, "infos", "desc", Genre.HIP_HOP, DLL.ID),
+ new InfoTitle("Kratos", DLL.ImageURL, "infos", "desc", Genre.HIP_HOP, DLL.ID),
+ new InfoTitle("Luz de Luna", DLL.ImageURL, "infos", "desc", Genre.HIP_HOP, DLL.ID),
+ new InfoTitle("Tu sais pas", DLL.ImageURL, "infos", "desc", Genre.HIP_HOP, DLL.ID),
+ new InfoTitle("Sheita", DLL.ImageURL, "infos", "desc", Genre.HIP_HOP, DLL.ID),
+ new InfoTitle("Humain", DLL.ImageURL, "infos", "desc", Genre.HIP_HOP, DLL.ID),
+ new InfoTitle("Bambina", DLL.ImageURL, "infos", "desc", Genre.HIP_HOP, DLL.ID),
+ new InfoTitle("Bené", DLL.ImageURL, "infos", "desc", Genre.HIP_HOP, DLL.ID),
+ new InfoTitle("Uranus", DLL.ImageURL, "infos", "desc", Genre.HIP_HOP, DLL.ID),
+ new InfoTitle("Onizuka", DLL.ImageURL, "infos", "desc", Genre.HIP_HOP, DLL.ID),
+ new InfoTitle("Jusqu'au dernier gramme", DLL.ImageURL, "infos", "desc", Genre.HIP_HOP, DLL.ID),
- new InfoTitle("Point de départ", FSR.ImageURL, "infos", "desc", Genre.HIP_HOP, FSR.ID),
- new InfoTitle("Ugotrip", FSR.ImageURL, "infos", "desc", Genre.HIP_HOP, FSR.ID),
- new InfoTitle("Alors dites pas", FSR.ImageURL, "infos", "desc", Genre.HIP_HOP, FSR.ID),
- new InfoTitle("Coma artificiel", FSR.ImageURL, "infos", "desc", Genre.HIP_HOP, FSR.ID),
- new InfoTitle("Fenêtre sur rue", FSR.ImageURL, "infos", "desc", Genre.HIP_HOP, FSR.ID),
- new InfoTitle("La ligne verte", FSR.ImageURL, "infos", "desc", Genre.HIP_HOP, FSR.ID),
- new InfoTitle("Eldorado", FSR.ImageURL, "infos", "desc", Genre.HIP_HOP, FSR.ID),
- new InfoTitle("Interlude", FSR.ImageURL, "infos", "desc", Genre.HIP_HOP, FSR.ID),
- new InfoTitle("Dojo", FSR.ImageURL, "infos", "desc", Genre.HIP_HOP, FSR.ID),
- new InfoTitle("Piège à loup", FSR.ImageURL, "infos", "desc", Genre.HIP_HOP, FSR.ID),
- new InfoTitle("Intact", FSR.ImageURL, "infos", "desc", Genre.HIP_HOP, FSR.ID),
- new InfoTitle("Dégradation", FSR.ImageURL, "infos", "desc", Genre.HIP_HOP, FSR.ID),
- new InfoTitle("Old Boy", FSR.ImageURL, "infos", "desc", Genre.HIP_HOP, FSR.ID),
- new InfoTitle("Point final", FSR.ImageURL, "infos", "desc", Genre.HIP_HOP, FSR.ID)
- };
- }
+ new InfoTitle("Point de départ", FSR.ImageURL, "infos", "desc", Genre.HIP_HOP, FSR.ID),
+ new InfoTitle("Ugotrip", FSR.ImageURL, "infos", "desc", Genre.HIP_HOP, FSR.ID),
+ new InfoTitle("Alors dites pas", FSR.ImageURL, "infos", "desc", Genre.HIP_HOP, FSR.ID),
+ new InfoTitle("Coma artificiel", FSR.ImageURL, "infos", "desc", Genre.HIP_HOP, FSR.ID),
+ new InfoTitle("Fenêtre sur rue", FSR.ImageURL, "infos", "desc", Genre.HIP_HOP, FSR.ID),
+ new InfoTitle("La ligne verte", FSR.ImageURL, "infos", "desc", Genre.HIP_HOP, FSR.ID),
+ new InfoTitle("Eldorado", FSR.ImageURL, "infos", "desc", Genre.HIP_HOP, FSR.ID),
+ new InfoTitle("Interlude", FSR.ImageURL, "infos", "desc", Genre.HIP_HOP, FSR.ID),
+ new InfoTitle("Dojo", FSR.ImageURL, "infos", "desc", Genre.HIP_HOP, FSR.ID),
+ new InfoTitle("Piège à loup", FSR.ImageURL, "infos", "desc", Genre.HIP_HOP, FSR.ID),
+ new InfoTitle("Intact", FSR.ImageURL, "infos", "desc", Genre.HIP_HOP, FSR.ID),
+ new InfoTitle("Dégradation", FSR.ImageURL, "infos", "desc", Genre.HIP_HOP, FSR.ID),
+ new InfoTitle("Old Boy", FSR.ImageURL, "infos", "desc", Genre.HIP_HOP, FSR.ID),
+ new InfoTitle("Point final", FSR.ImageURL, "infos", "desc", Genre.HIP_HOP, FSR.ID)
+ };
+ }
- ///
- /// Permet d'obtenir une liste des InfoTitle
- ///
- /// Retourne une liste des InfoTitle
- public ObservableCollection GetInfoTitles()
- {
- return infoTitles;
- }
+ ///
+ /// Permet d'obtenir une liste des InfoTitle
+ ///
+ /// Retourne une liste des InfoTitle
+ public ObservableCollection GetInfoTitles()
+ {
+ return infoTitles;
+ }
- ///
- /// Permet d'obtenir des InfoTitle selon les noms donnés en paramètre
- ///
- /// Liste des noms des InfoTitle recherchés
- /// Retourne la liste des InfoTitle correspondant aux noms passés en paramètre
- public List GetInfoTitlesByNames(List names)
- {
- List infos = new List();
- foreach(var name in names)
+ ///
+ /// Permet d'obtenir des InfoTitle selon les noms donnés en paramètre
+ ///
+ /// Liste des noms des InfoTitle recherchés
+ /// Retourne la liste des InfoTitle correspondant aux noms passés en paramètre
+ public List GetInfoTitlesByNames(List names)
{
- foreach(var titles in infoTitles)
+ List infos = new List();
+ foreach (var name in names)
{
- if (name == titles.Name)
+ foreach (var titles in infoTitles)
{
- infos.Add(titles);
+ if (name == titles.Name)
+ {
+ infos.Add(titles);
+ }
}
}
+ return infos;
}
- return infos;
- }
- ///
- /// Permet d'ajouter un InfoTitle à la liste des InfoTitle
- ///
- /// InfoTitle à ajouter
- public void AddInfoTitle(InfoTitle title)
- {
- infoTitles.Add(title);
- }
+ ///
+ /// Permet d'ajouter un InfoTitle à la liste des InfoTitle
+ ///
+ /// InfoTitle à ajouter
+ public void AddInfoTitle(InfoTitle title)
+ {
+ infoTitles.Add(title);
+ }
- ///
- /// Permet de retirer un InfoTitle de la liste des InfoTitle
- ///
- /// InfoTitle à retirer
- public void RemoveInfoTitle(InfoTitle title)
- {
- infoTitles.Remove(title);
- }
+ ///
+ /// Permet de retirer un InfoTitle de la liste des InfoTitle
+ ///
+ /// InfoTitle à retirer
+ public void RemoveInfoTitle(InfoTitle title)
+ {
+ infoTitles.Remove(title);
+ }
- ///
- /// Permet d'ajouter un artiste à la liste des feat d'un InfoTitle
- ///
- /// InfoTitle dans lequel ajouter le feat
- /// Artist à ajouter dans la liste des feats de l'InfoTitle
- public static void AddFeat(InfoTitle infoTitle, Artist artist)
- {
- infoTitle.AddFeat(artist);
- }
+ ///
+ /// Permet d'ajouter un artiste à la liste des feat d'un InfoTitle
+ ///
+ /// InfoTitle dans lequel ajouter le feat
+ /// Artist à ajouter dans la liste des feats de l'InfoTitle
+ public static void AddFeat(InfoTitle infoTitle, Artist artist)
+ {
+ infoTitle.AddFeat(artist);
+ }
- ///
- /// Permet de retirer un artiste de la liste des feat d'un InfoTitle
- ///
- /// InfoTitle depuis lequel retirer le feat
- /// Artist à retirer de la liste des feats de l'InfoTitle
- public static void RemoveFeat(InfoTitle infoTitle, Artist artist)
- {
- infoTitle.RemoveFeat(artist);
+ ///
+ /// Permet de retirer un artiste de la liste des feat d'un InfoTitle
+ ///
+ /// InfoTitle depuis lequel retirer le feat
+ /// Artist à retirer de la liste des feats de l'InfoTitle
+ public static void RemoveFeat(InfoTitle infoTitle, Artist artist)
+ {
+ infoTitle.RemoveFeat(artist);
+ }
}
-}
+}
\ No newline at end of file
diff --git a/Sources/Model/Stub/StubManager.cs b/Sources/Model/Stub/StubManager.cs
index 2917e1e..13766bf 100644
--- a/Sources/Model/Stub/StubManager.cs
+++ b/Sources/Model/Stub/StubManager.cs
@@ -1,537 +1,513 @@
using System.Collections.ObjectModel;
-namespace Model.Stub;
-
-public class StubManager : IDataManager
+namespace Model.Stub
{
- // Stubs
-
- public StubAlbum StubAlbum
+ public class StubManager : IDataManager
{
- get
+ // Stubs
+
+ public StubAlbum StubAlbum
{
- return stubAlbum;
+ get
+ {
+ return stubAlbum;
+ }
}
- }
- private readonly StubAlbum stubAlbum;
+ private readonly StubAlbum stubAlbum;
- public StubArtist StubArtist
- {
- get
+ public StubArtist StubArtist
{
- return stubArtist;
+ get
+ {
+ return stubArtist;
+ }
}
- }
- private readonly StubArtist stubArtist;
+ private readonly StubArtist stubArtist;
- public StubCustomTitle StubCustomTitle
- {
- get
+ public StubCustomTitle StubCustomTitle
{
- return stubCustomTitle;
+ get
+ {
+ return stubCustomTitle;
+ }
}
- }
- private readonly StubCustomTitle stubCustomTitle;
+ private readonly StubCustomTitle stubCustomTitle;
- public StubInfoTitle StubInfoTitle
- {
- get
+ public StubInfoTitle StubInfoTitle
{
- return stubInfoTitle;
+ get
+ {
+ return stubInfoTitle;
+ }
}
- }
- private readonly StubInfoTitle stubInfoTitle;
+ private readonly StubInfoTitle stubInfoTitle;
- public StubPlaylist StubPlaylist
- {
- get
+ public StubPlaylist StubPlaylist
{
- return stubPlaylist;
+ get
+ {
+ return stubPlaylist;
+ }
}
- }
- private readonly StubPlaylist stubPlaylist;
+ private readonly StubPlaylist stubPlaylist;
- ///
- /// Constructeut de la classe StubManager
- ///
- public StubManager()
- {
- stubInfoTitle = new StubInfoTitle();
- stubAlbum = StubInfoTitle.StubAlbum;
- stubArtist = StubAlbum.StubArtist;
- stubCustomTitle = new StubCustomTitle();
- stubPlaylist = new StubPlaylist();
- LoadSerialization();
- }
+ ///
+ /// Constructeut de la classe StubManager
+ ///
+ public StubManager()
+ {
+ stubInfoTitle = new StubInfoTitle();
+ stubAlbum = StubInfoTitle.StubAlbum;
+ stubArtist = StubAlbum.StubArtist;
+ stubCustomTitle = new StubCustomTitle();
+ stubPlaylist = new StubPlaylist();
+ LoadSerialization();
+ }
- ///
- /// Permet d'obtenir la liste des albums
- ///
- /// Retourne la liste des albums
- public ObservableCollection GetAlbums()
- {
- return StubAlbum.GetAlbums();
- }
+ ///
+ /// Permet d'obtenir la liste des albums
+ ///
+ /// Retourne la liste des albums
+ public ObservableCollection GetAlbums()
+ {
+ return StubAlbum.GetAlbums();
+ }
- ///
- /// Permet d'obtenir la liste des artistes
- ///
- /// Retourne la liste des artistes
- public List GetArtists()
- {
- return StubArtist.GetArtists();
- }
+ ///
+ /// Permet d'obtenir la liste des artistes
+ ///
+ /// Retourne la liste des artistes
+ public List GetArtists()
+ {
+ return StubArtist.GetArtists();
+ }
- ///
- /// Permet d'obtenir la liste des playlists
- ///
- /// Retourne la liste des playlists
- public ObservableCollection GetPlaylists()
- {
- return StubPlaylist.GetPlaylists();
- }
+ ///
+ /// Permet d'obtenir la liste des playlists
+ ///
+ /// Retourne la liste des playlists
+ public ObservableCollection GetPlaylists()
+ {
+ return StubPlaylist.GetPlaylists();
+ }
- ///
- /// Permet d'obtenir la liste des CustomTitles
- ///
- /// Retourne la liste des CustomTitles
- public ObservableCollection GetCustomTitles()
- {
- return StubCustomTitle.GetCustomTitles();
- }
+ ///
+ /// Permet d'obtenir la liste des CustomTitles
+ ///
+ /// Retourne la liste des CustomTitles
+ public ObservableCollection GetCustomTitles()
+ {
+ return StubCustomTitle.GetCustomTitles();
+ }
- ///
- /// Permet d'obtenir la liste des InfoTitles
- ///
- /// Retourne la liste des InfoTitles
- public ObservableCollection GetInfoTitles()
- {
- return StubInfoTitle.GetInfoTitles();
- }
+ ///
+ /// Permet d'obtenir la liste des InfoTitles
+ ///
+ /// Retourne la liste des InfoTitles
+ public ObservableCollection GetInfoTitles()
+ {
+ return StubInfoTitle.GetInfoTitles();
+ }
- ///
- /// Permet d'ajouter un objet Album à l'application
- ///
- /// Album à ajouter
- public void AddAlbum(Album album)
- {
- StubAlbum.AddAlbum(album);
- }
+ ///
+ /// Permet d'ajouter un objet Album à l'application
+ ///
+ /// Album à ajouter
+ public void AddAlbum(Album album)
+ {
+ StubAlbum.AddAlbum(album);
+ }
- ///
- /// Permet d'ajouter un objet CustomTitle à l'application
- ///
- /// CustomTitle à ajouter
- public void AddCustomTitle(CustomTitle title)
- {
- StubCustomTitle.AddCustomTitle(title);
- }
+ ///
+ /// Permet d'ajouter un objet CustomTitle à l'application
+ ///
+ /// CustomTitle à ajouter
+ public void AddCustomTitle(CustomTitle title)
+ {
+ StubCustomTitle.AddCustomTitle(title);
+ }
- ///
- /// Permet d'ajouter un objet InfoTitle à l'application
- ///
- /// InfoTitle à ajouter
- public void AddInfoTitle(InfoTitle title)
- {
- StubInfoTitle.AddInfoTitle(title);
- }
+ ///
+ /// Permet d'ajouter un objet InfoTitle à l'application
+ ///
+ /// InfoTitle à ajouter
+ public void AddInfoTitle(InfoTitle title)
+ {
+ StubInfoTitle.AddInfoTitle(title);
+ }
- ///
- /// Permet d'ajouter un artiste à la liste des feat d'un InfoTitle
- ///
- /// InfoTitle dans lequel ajouter le feat
- /// Artist à ajouter dans la liste des feats de l'InfoTitle
- public static void AddFeat(InfoTitle infoTitle, Artist artist)
- {
- StubInfoTitle.AddFeat(infoTitle, artist);
- }
+ ///
+ /// Permet d'ajouter un artiste à la liste des feat d'un InfoTitle
+ ///
+ /// InfoTitle dans lequel ajouter le feat
+ /// Artist à ajouter dans la liste des feats de l'InfoTitle
+ public static void AddFeat(InfoTitle infoTitle, Artist artist)
+ {
+ StubInfoTitle.AddFeat(infoTitle, artist);
+ }
- ///
- /// Permet d'ajouter un objet Playlist à l'application
- ///
- /// Playlist à ajouter
- public void AddPlaylist(Playlist playlist)
- {
- StubPlaylist.AddPlaylist(playlist);
- }
+ ///
+ /// Permet d'ajouter un objet Playlist à l'application
+ ///
+ /// Playlist à ajouter
+ public void AddPlaylist(Playlist playlist)
+ {
+ StubPlaylist.AddPlaylist(playlist);
+ }
- ///
- /// Permet d'ajouter un objet Artist à l'application
- ///
- /// Artist à ajouter
- public void AddArtist(Artist artist)
- {
- StubArtist.AddArtist(artist);
- }
+ ///
+ /// Permet d'ajouter un objet Artist à l'application
+ ///
+ /// Artist à ajouter
+ public void AddArtist(Artist artist)
+ {
+ StubArtist.AddArtist(artist);
+ }
- ///
- /// Permet de retirer un objet Album de l'application
- ///
- /// Album à retirer
- public void RemoveAlbum(Album album)
- {
- StubAlbum.RemoveAlbum(album);
- }
+ ///
+ /// Permet de retirer un objet Album de l'application
+ ///
+ /// Album à retirer
+ public void RemoveAlbum(Album album)
+ {
+ StubAlbum.RemoveAlbum(album);
+ }
- ///
- /// Permet de retirer un objet CustomTitle de l'application
- ///
- /// CustomTitle à retirer
- public void RemoveCustomTitle(CustomTitle title)
- {
- StubCustomTitle.RemoveCustomTitle(title);
- }
+ ///
+ /// Permet de retirer un objet CustomTitle de l'application
+ ///
+ /// CustomTitle à retirer
+ public void RemoveCustomTitle(CustomTitle title)
+ {
+ StubCustomTitle.RemoveCustomTitle(title);
+ }
- ///
- /// Permet de retirer un objet InfoTitle de l'application
- ///
- /// InfoTitle à retirer
- public void RemoveInfoTitle(InfoTitle title)
- {
- StubInfoTitle.RemoveInfoTitle(title);
- }
+ ///
+ /// Permet de retirer un objet InfoTitle de l'application
+ ///
+ /// InfoTitle à retirer
+ public void RemoveInfoTitle(InfoTitle title)
+ {
+ StubInfoTitle.RemoveInfoTitle(title);
+ }
- ///
- /// Permet de retirer un objet Playlist de l'application
- ///
- /// Playlist à retirer
- public void RemovePlaylist(Playlist playlist)
- {
- StubPlaylist.RemovePlaylist(playlist);
- }
+ ///
+ /// Permet de retirer un objet Playlist de l'application
+ ///
+ /// Playlist à retirer
+ public void RemovePlaylist(Playlist playlist)
+ {
+ StubPlaylist.RemovePlaylist(playlist);
+ }
- ///
- /// Permet de retirer un objet Artist de l'application
- ///
- /// Artist à retirer
- public void RemoveArtist(Artist artist)
- {
- StubArtist.RemoveArtist(artist);
- }
+ ///
+ /// Permet de retirer un objet Artist de l'application
+ ///
+ /// Artist à retirer
+ public void RemoveArtist(Artist artist)
+ {
+ StubArtist.RemoveArtist(artist);
+ }
- ///
- /// Permet de charger les données
- ///
- public void LoadSerialization()
- {
- foreach(InfoTitle infoTitle in StubInfoTitle.InfoTitles)
+ ///
+ /// Permet de charger les données
+ ///
+ public void LoadSerialization()
{
- GetAlbumById(infoTitle.AlbumID)?.AddTitle(infoTitle);
+ foreach (InfoTitle infoTitle in StubInfoTitle.InfoTitles)
+ {
+ GetAlbumById(infoTitle.AlbumID)?.AddTitle(infoTitle);
+ }
}
- }
- ///
- /// Permet de sauvegarder l'état de l'application
- ///
- public void SaveSerialization()
- {
- // Doesn't do anything because it's Stubs
- }
+ ///
+ /// Permet de sauvegarder l'état de l'application
+ ///
+ public void SaveSerialization()
+ {
+ // Doesn't do anything because it's Stubs
+ }
- ///
- /// Permet d'obtenir un objet CustomTitle à partir de son chemin d'accès
- ///
- /// Chemin d'accès de l'objet CustomTitle
- /// Retourne l'objet CustomTitle avec un chemin d'accès équivalent à celui donné en paramètre
- public CustomTitle GetCustomTitleByPath(string custom)
- {
- foreach (CustomTitle customTitle in StubCustomTitle.GetCustomTitles())
+ ///
+ /// Permet d'obtenir un objet CustomTitle à partir de son chemin d'accès
+ ///
+ /// Chemin d'accès de l'objet CustomTitle
+ /// Retourne l'objet CustomTitle avec un chemin d'accès équivalent à celui donné en paramètre
+ public CustomTitle GetCustomTitleByPath(string custom)
{
- if (customTitle.Path == custom)
+ foreach (CustomTitle customTitle in StubCustomTitle.GetCustomTitles())
{
- return customTitle;
+ if (customTitle.Path == custom)
+ {
+ return customTitle;
+ }
}
+ return null;
}
- return null;
- }
- ///
- /// Permet d'obtenir un objet InfoTitle à partir de son nom
- ///
- /// Nom de l'objet InfoTitle
- /// Retourne l'objet InfoTitle avec un nom équivalent à celui donné en paramètre
- public InfoTitle GetInfoTitleByName(string name)
- {
- foreach(InfoTitle title in StubInfoTitle.GetInfoTitles())
+ ///
+ /// Permet d'obtenir un objet InfoTitle à partir de son nom
+ ///
+ /// Nom de l'objet InfoTitle
+ /// Retourne l'objet InfoTitle avec un nom équivalent à celui donné en paramètre
+ public InfoTitle GetInfoTitleByName(string name)
{
- if (title.Name == name)
+ foreach (InfoTitle title in StubInfoTitle.GetInfoTitles())
{
- return title;
+ if (title.Name == name)
+ {
+ return title;
+ }
}
+ return null;
}
- return null;
- }
- ///
- /// Permet d'obtenir un objet Album à partir de son nom
- ///
- /// Nom de l'objet Album
- /// Retourne l'objet Album avec un nom équivalent à celui donné en paramètre
- public Album GetAlbumByName(string name)
- {
- foreach(Album album in StubAlbum.GetAlbums())
+ ///
+ /// Permet d'obtenir un objet Album à partir de son nom
+ ///
+ /// Nom de l'objet Album
+ /// Retourne l'objet Album avec un nom équivalent à celui donné en paramètre
+ public Album GetAlbumByName(string name)
{
- if (album.Name == name)
+ foreach (Album album in StubAlbum.GetAlbums())
{
- return album;
+ if (album.Name == name)
+ {
+ return album;
+ }
}
+ return null;
}
- return null;
- }
- ///
- /// Permet d'obtenir un objet Artist à partir de son nom
- ///
- /// Nom de l'objet Artist
- /// Retourne l'objet Artist avec un nom équivalent à celui donné en paramètre
- public Artist GetArtistByName(string name)
- {
- foreach(Artist artist in StubArtist.GetArtists())
+ ///
+ /// Permet d'obtenir un objet Artist à partir de son nom
+ ///
+ /// Nom de l'objet Artist
+ /// Retourne l'objet Artist avec un nom équivalent à celui donné en paramètre
+ public Artist GetArtistByName(string name)
{
- if (artist.Name == name)
+ foreach (Artist artist in StubArtist.GetArtists())
{
- return artist;
+ if (artist.Name == name)
+ {
+ return artist;
+ }
}
+ return null;
}
- return null;
- }
- ///
- /// Permet d'ajouter des objets Album à l'application
- ///
- /// Liste d'Album à ajouter
- public void AddAlbums(List albumsList)
- {
- foreach (Album a in albumsList)
+ ///
+ /// Permet d'ajouter des objets Album à l'application
+ ///
+ /// Liste d'Album à ajouter
+ public void AddAlbums(List albumsList)
{
- StubAlbum.AddAlbum(a);
+ foreach (Album a in albumsList)
+ {
+ StubAlbum.AddAlbum(a);
+ }
}
- }
- ///
- /// Permet d'ajouter des objets Artist à l'application
- ///
- /// Liste d'Artist à ajouter
- public void AddArtists(List artistsList)
- {
- foreach (Artist a in artistsList)
+ ///
+ /// Permet d'ajouter des objets Artist à l'application
+ ///
+ /// Liste d'Artist à ajouter
+ public void AddArtists(List artistsList)
{
- StubArtist.AddArtist(a);
+ foreach (Artist a in artistsList)
+ {
+ StubArtist.AddArtist(a);
+ }
}
- }
- ///
- /// Permet d'ajouter des objets Playlist à l'application
- ///
- /// Liste de Playlist à ajouter
- public void AddPlaylists(List playlistsList)
- {
- foreach (Playlist p in playlistsList)
+ ///
+ /// Permet d'ajouter des objets Playlist à l'application
+ ///
+ /// Liste de Playlist à ajouter
+ public void AddPlaylists(List playlistsList)
{
- StubPlaylist.AddPlaylist(p);
+ foreach (Playlist p in playlistsList)
+ {
+ StubPlaylist.AddPlaylist(p);
+ }
}
- }
- ///
- /// Permet d'ajouter des objets CustomTitle à l'application
- ///
- /// Liste de CustomTitle à ajouter
- public void AddCustomTitles(List customTitlesList)
- {
- foreach (CustomTitle ct in customTitlesList)
+ ///
+ /// Permet d'ajouter des objets CustomTitle à l'application
+ ///
+ /// Liste de CustomTitle à ajouter
+ public void AddCustomTitles(List customTitlesList)
{
- StubCustomTitle.AddCustomTitle(ct);
+ foreach (CustomTitle ct in customTitlesList)
+ {
+ StubCustomTitle.AddCustomTitle(ct);
+ }
}
- }
- ///
- /// Permet d'ajouter des objets InfoTitle à l'application
- ///
- /// Liste d'InfoTitle à ajouter
- public void AddInfoTitles(List infoTitlesList)
- {
- foreach (InfoTitle it in infoTitlesList)
+ ///
+ /// Permet d'ajouter des objets InfoTitle à l'application
+ ///
+ /// Liste d'InfoTitle à ajouter
+ public void AddInfoTitles(List infoTitlesList)
{
- StubInfoTitle.AddInfoTitle(it);
+ foreach (InfoTitle it in infoTitlesList)
+ {
+ StubInfoTitle.AddInfoTitle(it);
+ }
}
- }
- ///
- /// Permet d'obtenir un objet Playlist à partir de son nom
- ///
- /// Nom de l'objet Playlist
- /// Retourne l'objet Playlist avec un nom équivalent à celui donné en paramètre
- public Playlist GetPlaylistByName(string name)
- {
- foreach (Playlist p in StubPlaylist.Playlists)
+ ///
+ /// Permet d'obtenir un objet Playlist à partir de son nom
+ ///
+ /// Nom de l'objet Playlist
+ /// Retourne l'objet Playlist avec un nom équivalent à celui donné en paramètre
+ public Playlist GetPlaylistByName(string name)
{
- if (p.Name == name)
+ foreach (Playlist p in StubPlaylist.Playlists)
{
- return p;
+ if (p.Name == name)
+ {
+ return p;
+ }
}
+ return null;
}
- return null;
- }
-
- ///
- /// Modifie un objet CustomTitle avec les informations données en paramètre
- ///
- /// CustomTitle à modifier
- /// Nom de l'objet CustomTitle
- /// Chemin d'accès de l'image de l'objet CustomTitle
- /// Informations de l'objet CustomTitle
- /// Chemin d'accès de l'objet CustomTitle
- public void UpdateCustomTitle(CustomTitle title, string name, string url, string info, string path)
- {
- title.Name = name;
- title.ImageURL = url;
- title.Information = info;
- title.Path = path;
- }
- ///
- /// Modifie un objet CustomTitle avec les informations données en paramètre
- ///
- /// Chemin d'accès du CustomTitle à modifier
- /// Nom de l'objet CustomTitle
- /// Chemin d'accès de l'image de l'objet CustomTitle
- /// Informations de l'objet CustomTitle
- /// Chemin d'accès de l'objet CustomTitle
- public void UpdateCustomTitleByPath(string path, string name, string newUrl, string info, string newPath)
- {
- CustomTitle title = GetCustomTitleByPath(path);
- if (title != null)
+ ///
+ /// Modifie un objet CustomTitle avec les informations données en paramètre
+ ///
+ /// CustomTitle à modifier
+ /// Nom de l'objet CustomTitle
+ /// Chemin d'accès de l'image de l'objet CustomTitle
+ /// Informations de l'objet CustomTitle
+ /// Chemin d'accès de l'objet CustomTitle
+ public void UpdateCustomTitle(CustomTitle title, string name, string url, string info, string path)
{
title.Name = name;
- title.ImageURL = newUrl;
+ title.ImageURL = url;
title.Information = info;
- title.Path = newPath;
+ title.Path = path;
}
- }
- ///
- /// Modifie un objet InfoTitle avec les informations données en paramètre
- ///
- /// InfoTitle à modifier
- /// Nom de l'objet InfoTitle
- /// Chemin d'accès de l'image de l'objet InfoTitle
- /// Informations de l'objet InfoTitle
- /// Artist de l'objet InfoTitle
- /// Description de l'objet InfoTitle
- /// Genre de l'objet InfoTitle
- public void UpdateInfoTitle(InfoTitle title, string name, string url, string info, Artist artist, string description, Genre genre)
- {
- title.Name = name;
- title.ImageURL = url;
- title.Information = info;
- title.Description = description;
- title.Genre = genre;
- }
+ ///
+ /// Modifie un objet CustomTitle avec les informations données en paramètre
+ ///
+ /// Chemin d'accès du CustomTitle à modifier
+ /// Nom de l'objet CustomTitle
+ /// Chemin d'accès de l'image de l'objet CustomTitle
+ /// Informations de l'objet CustomTitle
+ /// Chemin d'accès de l'objet CustomTitle
+ public void UpdateCustomTitleByPath(string path, string name, string newUrl, string info, string newPath)
+ {
+ CustomTitle title = GetCustomTitleByPath(path);
+ if (title != null)
+ {
+ title.Name = name;
+ title.ImageURL = newUrl;
+ title.Information = info;
+ title.Path = newPath;
+ }
+ }
- ///
- /// Modifie un objet InfoTitle avec les informations données en paramètre
- ///
- /// Nom de l'objet InfoTitle à modifier
- /// Chemin d'accès de l'image de l'objet InfoTitle
- /// Informations de l'objet InfoTitle
- /// Artist de l'objet InfoTitle
- /// Description de l'objet InfoTitle
- /// Genre de l'objet InfoTitle
- public void UpdateInfoTitleByName(string name, string newUrl, string info, Artist artist, string description, Genre genre)
- {
- InfoTitle title = GetInfoTitleByName(name);
- if (title != null)
+ ///
+ /// Modifie un objet InfoTitle avec les informations données en paramètre
+ ///
+ /// InfoTitle à modifier
+ /// Nom de l'objet InfoTitle
+ /// Chemin d'accès de l'image de l'objet InfoTitle
+ /// Informations de l'objet InfoTitle
+ /// Artist de l'objet InfoTitle
+ /// Description de l'objet InfoTitle
+ /// Genre de l'objet InfoTitle
+ public void UpdateInfoTitle(InfoTitle title, string name, string url, string info, Artist artist, string description, Genre genre)
{
title.Name = name;
- title.ImageURL = newUrl;
+ title.ImageURL = url;
title.Information = info;
title.Description = description;
title.Genre = genre;
}
- }
- ///
- /// Modifie un objet Album avec les informations données en paramètre
- ///
- /// Album à modifier
- /// Nom de l'objet Album
- /// Chemin d'accès de l'image de l'objet Album
- /// Artist de l'objet Album
- /// Description de l'objet Album
- /// Informations de l'objet Album
- public void UpdateAlbum(Album album, string name, string url, Artist artist, string description, string info)
- {
- album.Name = name;
- album.ImageURL = url;
- album.Artist = artist;
- album.Description = description;
- album.Information = info;
- }
+ ///
+ /// Modifie un objet InfoTitle avec les informations données en paramètre
+ ///
+ /// Nom de l'objet InfoTitle à modifier
+ /// Chemin d'accès de l'image de l'objet InfoTitle
+ /// Informations de l'objet InfoTitle
+ /// Artist de l'objet InfoTitle
+ /// Description de l'objet InfoTitle
+ /// Genre de l'objet InfoTitle
+ public void UpdateInfoTitleByName(string name, string newUrl, string info, Artist artist, string description, Genre genre)
+ {
+ InfoTitle title = GetInfoTitleByName(name);
+ if (title != null)
+ {
+ title.Name = name;
+ title.ImageURL = newUrl;
+ title.Information = info;
+ title.Description = description;
+ title.Genre = genre;
+ }
+ }
- ///
- /// Modifie un objet Album avec les informations données en paramètre
- ///
- /// Nom de l'objet Album à modifier
- /// Chemin d'accès de l'image de l'objet Album
- /// Artist de l'objet Album
- /// Description de l'objet Album
- /// Informations de l'objet Album
- public void UpdateAlbumByName(string name, string newUrl, Artist artist, string description, string info)
- {
- Album album = GetAlbumByName(name);
- if (album != null)
+ ///
+ /// Modifie un objet Album avec les informations données en paramètre
+ ///
+ /// Album à modifier
+ /// Nom de l'objet Album
+ /// Chemin d'accès de l'image de l'objet Album
+ /// Artist de l'objet Album
+ /// Description de l'objet Album
+ /// Informations de l'objet Album
+ public void UpdateAlbum(Album album, string name, string url, Artist artist, string description, string info)
{
album.Name = name;
- album.ImageURL = newUrl;
+ album.ImageURL = url;
album.Artist = artist;
album.Description = description;
album.Information = info;
}
- }
- ///
- /// Modifie un objet Album avec les informations données en paramètre
- ///
- /// Album à modifier
- /// Nom de l'objet Album
- /// Chemin d'accès de l'image de l'objet Album
- /// Nom de l'artiste de l'objet Album
- /// Description de l'objet Album
- /// Informations de l'objet Album
- public void UpdateAlbumByArtistName(Album album, string name, string url, string artist, string description, string info)
- {
- album.Name = name;
- album.ImageURL = url;
- Artist artist2 = GetArtistByName(artist);
- if (artist2 != null)
+ ///
+ /// Modifie un objet Album avec les informations données en paramètre
+ ///
+ /// Nom de l'objet Album à modifier
+ /// Chemin d'accès de l'image de l'objet Album
+ /// Artist de l'objet Album
+ /// Description de l'objet Album
+ /// Informations de l'objet Album
+ public void UpdateAlbumByName(string name, string newUrl, Artist artist, string description, string info)
{
- album.Artist = artist2;
+ Album album = GetAlbumByName(name);
+ if (album != null)
+ {
+ album.Name = name;
+ album.ImageURL = newUrl;
+ album.Artist = artist;
+ album.Description = description;
+ album.Information = info;
+ }
}
- album.Description = description;
- album.Information = info;
- }
- ///
- /// Modifie un objet Album avec les informations données en paramètre
- ///
- /// Nom de l'objet Album à modifier
- /// Chemin d'accès de l'image de l'objet Album
- /// Nom de l'artiste de l'objet Album
- /// Description de l'objet Album
- /// Informations de l'objet Album
- public void UpdateAlbumByNameByArtistName(string name, string newUrl, string artist, string description, string info)
- {
- Album album = GetAlbumByName(name);
- if (album != null)
+ ///
+ /// Modifie un objet Album avec les informations données en paramètre
+ ///
+ /// Album à modifier
+ /// Nom de l'objet Album
+ /// Chemin d'accès de l'image de l'objet Album
+ /// Nom de l'artiste de l'objet Album
+ /// Description de l'objet Album
+ /// Informations de l'objet Album
+ public void UpdateAlbumByArtistName(Album album, string name, string url, string artist, string description, string info)
{
album.Name = name;
- album.ImageURL = newUrl;
+ album.ImageURL = url;
Artist artist2 = GetArtistByName(artist);
if (artist2 != null)
{
@@ -540,307 +516,332 @@ public class StubManager : IDataManager
album.Description = description;
album.Information = info;
}
- }
- ///
- /// Modifie un objet Playlist avec les informations données en paramètre
- ///
- /// Playlist à modifier
- /// Nom de l'objet Playlist
- /// Description de l'objet Playlist
- /// Chemin d'accès de l'image de l'objet Playlist
- public void UpdatePlaylist(Playlist playlist, string name, string description, string url)
- {
- playlist.Name = name;
- playlist.Description = description;
- playlist.ImageURL = url;
- }
+ ///
+ /// Modifie un objet Album avec les informations données en paramètre
+ ///
+ /// Nom de l'objet Album à modifier
+ /// Chemin d'accès de l'image de l'objet Album
+ /// Nom de l'artiste de l'objet Album
+ /// Description de l'objet Album
+ /// Informations de l'objet Album
+ public void UpdateAlbumByNameByArtistName(string name, string newUrl, string artist, string description, string info)
+ {
+ Album album = GetAlbumByName(name);
+ if (album != null)
+ {
+ album.Name = name;
+ album.ImageURL = newUrl;
+ Artist artist2 = GetArtistByName(artist);
+ if (artist2 != null)
+ {
+ album.Artist = artist2;
+ }
+ album.Description = description;
+ album.Information = info;
+ }
+ }
- ///
- /// Modifie un objet Playlist avec les informations données en paramètre
- ///
- /// Nom de l'objet Playlist à modifier
- /// Description de l'objet Playlist
- /// Chemin d'accès de l'image de l'objet Playlist
- public void UpdatePlaylistByName(string name, string description, string newUrl)
- {
- Playlist playlist = GetPlaylistByName(name);
- if (playlist != null)
+ ///
+ /// Modifie un objet Playlist avec les informations données en paramètre
+ ///
+ /// Playlist à modifier
+ /// Nom de l'objet Playlist
+ /// Description de l'objet Playlist
+ /// Chemin d'accès de l'image de l'objet Playlist
+ public void UpdatePlaylist(Playlist playlist, string name, string description, string url)
{
playlist.Name = name;
playlist.Description = description;
- playlist.ImageURL = newUrl;
+ playlist.ImageURL = url;
}
- }
- ///
- /// Modifie un objet Artist avec les informations données en paramètre
- ///
- /// Artiste à modifier
- /// Nom de l'objet Artist
- public void UpdateArtist(Artist artist, string name)
- {
- artist.Name = name;
- }
+ ///
+ /// Modifie un objet Playlist avec les informations données en paramètre
+ ///
+ /// Nom de l'objet Playlist à modifier
+ /// Description de l'objet Playlist
+ /// Chemin d'accès de l'image de l'objet Playlist
+ public void UpdatePlaylistByName(string name, string description, string newUrl)
+ {
+ Playlist playlist = GetPlaylistByName(name);
+ if (playlist != null)
+ {
+ playlist.Name = name;
+ playlist.Description = description;
+ playlist.ImageURL = newUrl;
+ }
+ }
- ///
- /// Modifie un objet Artist avec les informations données en paramètre
- ///
- /// Nom de l'objet Artist à modifier
- /// Nouveau nom de l'objet Artist
- public void UpdateArtistByName(string name, string newName)
- {
- Artist artist = GetArtistByName(newName);
- if (artist != null)
+ ///
+ /// Modifie un objet Artist avec les informations données en paramètre
+ ///
+ /// Artiste à modifier
+ /// Nom de l'objet Artist
+ public void UpdateArtist(Artist artist, string name)
{
- artist.Name = newName;
+ artist.Name = name;
}
- }
- ///
- /// Permet de retirer des objets Album de l'application
- ///
- /// Liste des objets Album à retirer de l'application
- public void RemoveAlbums(List albumsList)
- {
- foreach (Album album in albumsList)
+ ///
+ /// Modifie un objet Artist avec les informations données en paramètre
+ ///
+ /// Nom de l'objet Artist à modifier
+ /// Nouveau nom de l'objet Artist
+ public void UpdateArtistByName(string name, string newName)
{
- StubAlbum.RemoveAlbum(album);
+ Artist artist = GetArtistByName(newName);
+ if (artist != null)
+ {
+ artist.Name = newName;
+ }
}
- }
- ///
- /// Permet de retirer des objets Artist de l'application
- ///
- /// Liste des objets Artist à retirer de l'application
- public void RemoveArtists(List artistsList)
- {
- foreach (Artist artist in artistsList)
+ ///
+ /// Permet de retirer des objets Album de l'application
+ ///
+ /// Liste des objets Album à retirer de l'application
+ public void RemoveAlbums(List albumsList)
{
- StubArtist.RemoveArtist(artist);
+ foreach (Album album in albumsList)
+ {
+ StubAlbum.RemoveAlbum(album);
+ }
}
- }
- ///
- /// Permet de retirer des objets Playlist de l'application
- ///
- /// Liste des objets Playlist à retirer de l'application
- public void RemovePlaylists(List playlistsList)
- {
- foreach (Playlist playlist in playlistsList)
+ ///
+ /// Permet de retirer des objets Artist de l'application
+ ///
+ /// Liste des objets Artist à retirer de l'application
+ public void RemoveArtists(List artistsList)
{
- StubPlaylist.RemovePlaylist(playlist);
+ foreach (Artist artist in artistsList)
+ {
+ StubArtist.RemoveArtist(artist);
+ }
}
- }
- ///
- /// Permet de retirer des objets CustomTitle de l'application
- ///
- /// Liste des objets CustomTitle à retirer de l'application
- public void RemoveCustomTitles(List customTitlesList)
- {
- foreach (CustomTitle customTitle in customTitlesList)
+ ///
+ /// Permet de retirer des objets Playlist de l'application
+ ///
+ /// Liste des objets Playlist à retirer de l'application
+ public void RemovePlaylists(List playlistsList)
{
- StubCustomTitle.RemoveCustomTitle(customTitle);
+ foreach (Playlist playlist in playlistsList)
+ {
+ StubPlaylist.RemovePlaylist(playlist);
+ }
}
- }
- ///
- /// Permet de retirer des objets InfoTitle de l'application
- ///
- /// Liste des objets InfoTitle à retirer de l'application
- public void RemoveInfoTitles(List infoTitlesList)
- {
- foreach (InfoTitle infoTitle in infoTitlesList)
+ ///
+ /// Permet de retirer des objets CustomTitle de l'application
+ ///
+ /// Liste des objets CustomTitle à retirer de l'application
+ public void RemoveCustomTitles(List customTitlesList)
{
- StubInfoTitle.RemoveInfoTitle(infoTitle);
+ foreach (CustomTitle customTitle in customTitlesList)
+ {
+ StubCustomTitle.RemoveCustomTitle(customTitle);
+ }
}
- }
- ///