Skip to content
Permalink
Browse files

search now returns url

  • Loading branch information
Jeremy Mill
Jeremy Mill committed Dec 10, 2015
1 parent 2736dcd commit ad0e6f225a029fda1689d82bf5cfc86271a11538
Showing with 25 additions and 0 deletions.
  1. +25 −0 TeamDBAwesome/TeamDBAwesome/Controllers/SearchController.cs
@@ -71,6 +71,31 @@ public HttpResponseMessage Get(string search="")
MySqlService service = new MySqlService();
SearchResult result = service.Search(dbsearch);

foreach(Track track in result.Album)
{
track.url = "http://a1310.phobos.apple.com/us/r1000/167/Music3/v4/00/23/38/0023383d-1616-fbe2-b3a3-7f2de268911b/mzaf_7209253486009554987.plus.aac.p.m4a";
}
foreach (Track track in result.Media)
{
track.url = "http://a1310.phobos.apple.com/us/r1000/167/Music3/v4/00/23/38/0023383d-1616-fbe2-b3a3-7f2de268911b/mzaf_7209253486009554987.plus.aac.p.m4a";
}
foreach (Track track in result.Artist)
{
track.url = "http://a1310.phobos.apple.com/us/r1000/167/Music3/v4/00/23/38/0023383d-1616-fbe2-b3a3-7f2de268911b/mzaf_7209253486009554987.plus.aac.p.m4a";
}
foreach (Track track in result.Track)
{
track.url = "http://a1310.phobos.apple.com/us/r1000/167/Music3/v4/00/23/38/0023383d-1616-fbe2-b3a3-7f2de268911b/mzaf_7209253486009554987.plus.aac.p.m4a";
}
foreach (Track track in result.Composer)
{
track.url = "http://a1310.phobos.apple.com/us/r1000/167/Music3/v4/00/23/38/0023383d-1616-fbe2-b3a3-7f2de268911b/mzaf_7209253486009554987.plus.aac.p.m4a";
}
foreach (Track track in result.Genre)
{
track.url = "http://a1310.phobos.apple.com/us/r1000/167/Music3/v4/00/23/38/0023383d-1616-fbe2-b3a3-7f2de268911b/mzaf_7209253486009554987.plus.aac.p.m4a";
}

string serialized = JsonConvert.SerializeObject(result);
message.Content = new StringContent(serialized);

0 comments on commit ad0e6f2

Please sign in to comment.
You can’t perform that action at this time.