Cover art functionality added. Left TODO's on where to continue on. #50

This commit is contained in:
amazing-username
2019-07-12 23:13:32 -04:00
parent 226ca44206
commit 026a528a81
6 changed files with 110 additions and 33 deletions
@@ -101,6 +101,20 @@ namespace Icarus.Controllers.Utilities
return song;
}
public byte[] RetrieveCoverArtBytes(Song song)
{
Console.WriteLine("Fetching image");
var tag = TagLib.File.Create(song.SongPath);
byte[] imgBytes = tag.Tag.Pictures[0].Data.Data;
if (imgBytes == null)
{
Console.WriteLine("Null image");
return null;
}
return imgBytes;
}
public void UpdateMetadata(Song song)
{
try