Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
da378f5fbf |
@@ -46,6 +46,22 @@ namespace MusicPlayer
|
|||||||
return GetSongsByArgs("album=" + year);
|
return GetSongsByArgs("album=" + year);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<Song> GetAllSongs()
|
||||||
|
{
|
||||||
|
List<Song> allsongslist = new List<Song>();
|
||||||
|
JObject o = nw.SendString("getallsongs?");
|
||||||
|
if (o["result"].ToString() == "OK")
|
||||||
|
{
|
||||||
|
dynamic songs = o["songs"];
|
||||||
|
for (int i = 0; i < songs.Count; i++)
|
||||||
|
{
|
||||||
|
allsongslist.Add(new Song(songs[i][0].ToString(), songs[i][3].ToString(), songs[i][5].ToString(), songs[i][4].ToString(), this));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return allsongslist;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public List<Song> GetSongsByArgs(string args)
|
public List<Song> GetSongsByArgs(string args)
|
||||||
{
|
{
|
||||||
List<Song> songslist = new List<Song>();
|
List<Song> songslist = new List<Song>();
|
||||||
|
|||||||
@@ -27,14 +27,18 @@ namespace MusicPlayer
|
|||||||
// {
|
// {
|
||||||
// Console.WriteLine(s.Name);
|
// Console.WriteLine(s.Name);
|
||||||
// });
|
// });
|
||||||
api.GetSongsByGenre("Melodic Death Metal").ForEach(s =>
|
// api.GetSongsByGenre("Melodic Death Metal").ForEach(s =>
|
||||||
{
|
// {
|
||||||
Console.WriteLine(s.Name);
|
// Console.WriteLine(s.Name);
|
||||||
});
|
// });
|
||||||
// api.GetSongsByAlbum("Stronger").ForEach(s =>
|
// api.GetSongsByAlbum("Stronger").ForEach(s =>
|
||||||
// {
|
// {
|
||||||
// Console.WriteLine(s.Name);
|
// Console.WriteLine(s.Name);
|
||||||
// });
|
// });
|
||||||
|
api.GetAllSongs().ForEach(s =>
|
||||||
|
{
|
||||||
|
Console.WriteLine(s.Name);
|
||||||
|
});
|
||||||
MainForm form = new MainForm();
|
MainForm form = new MainForm();
|
||||||
new Main(nw, api, form);
|
new Main(nw, api, form);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user