Merge branch 'developer' into gui
Conflicts: MusicPlayer/MusicPlayer/Program.cs
This commit is contained in:
@@ -28,12 +28,46 @@ namespace MusicPlayer
|
|||||||
|
|
||||||
public List<Artist> GetArtists()
|
public List<Artist> GetArtists()
|
||||||
{
|
{
|
||||||
return null;
|
List<Artist> artistlist = new List<Artist>();
|
||||||
|
|
||||||
|
JObject o = nw.SendString("getartists?id=hallo");
|
||||||
|
if (o["result"].ToString() == "OK")
|
||||||
|
{
|
||||||
|
for (int i = 0; i < o["artists"].Count(); i++) {
|
||||||
|
artistlist.Add(new Artist(o["artists"][i][0].ToString()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return artistlist;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Album> GetAlbums()
|
public List<Album> GetAlbums()
|
||||||
{
|
{
|
||||||
return null;
|
List<Album> albumlist = new List<Album>();
|
||||||
|
|
||||||
|
JObject o = nw.SendString("getalbums?id=hallo");
|
||||||
|
if (o["result"].ToString() == "OK")
|
||||||
|
{
|
||||||
|
for (int i = 0; i < o["albums"].Count(); i++)
|
||||||
|
{
|
||||||
|
albumlist.Add(new Album(o["albums"][i][0].ToString()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return albumlist;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Year> GetYears()
|
||||||
|
{
|
||||||
|
List<Year> yearlist = new List<Year> ();
|
||||||
|
JObject o = nw.SendString("getyears?id=hallo");
|
||||||
|
if (o["result"].ToString() == "OK")
|
||||||
|
{
|
||||||
|
for (int i = 0; i < o["years"].Count(); i++)
|
||||||
|
{
|
||||||
|
yearlist.Add(new Year(o["years"][i][0].ToString()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return yearlist;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,6 +72,7 @@
|
|||||||
<Compile Include="SongsTable.cs">
|
<Compile Include="SongsTable.cs">
|
||||||
<SubType>Component</SubType>
|
<SubType>Component</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Year.cs" />
|
||||||
<EmbeddedResource Include="MainForm.resx">
|
<EmbeddedResource Include="MainForm.resx">
|
||||||
<DependentUpon>MainForm.cs</DependentUpon>
|
<DependentUpon>MainForm.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
namespace MusicPlayer
|
||||||
|
{
|
||||||
|
public class Year
|
||||||
|
{
|
||||||
|
public string year { get; set; }
|
||||||
|
|
||||||
|
public Year(string year)
|
||||||
|
{
|
||||||
|
this.year = year;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user