问题
This is driving me nut. I'm trying to save the picture description of a picture in a MP3 (i tried the same process with the picture type with 0 success). i cant manage to save this information, here is my code :
foreach (var so in mp)
{
int tries = 50;
using (TagLib.File fill = TagLib.File.Create(so.Item1))
{
fill.Tag.Pictures[i].Description = (string)cont.SelectedItem;
try
{
fill.Save(); }
catch (Exception e)
{
if (tries != 0)
{
System.Threading.Thread.Sleep(50);
Console.WriteLine(e);
tries--;
}
else throw;
}
}
}
so.Item1 is the path of each of the files i would like to process (all the songs in an album). cont is a Combobox control.
"i" is used for one specific image in the Mp3 file that can contain several images(that's the reason why i need description)
During the step by step process, it goes to the fill.Save everytime and never to the catch.
Edit : The exceptions i had are due to something else, but have nothing to do with the Saving process.
What am i doing wrong ?
thanks in advance
来源:https://stackoverflow.com/questions/60714856/taglib-save-mp3-picture-information