private void UpdateTagInfo(string mp3File, string mp3MusicRootPath, bool useDirInfo, ref OperationResult op) { OperationResult _op = new OperationResult(); try { bool badfile = false; MP3FileDataType mp3 = BCHMP3Utilities.ConvertFileNameToMP3InfoBCHFrmtWithDirInfo(mp3File, mp3MusicRootPath, ref _op); if (!_op.Success) { badfile = true; } if (_op.Success) { BCHMP3Utilities.SaveMp3IdInfo(mp3, ref _op); } if (!_op.Success && !badfile) { badfile = true; } } catch (Exception ex) { _op.AddException(ex); } op.AddOperationResult(ref _op); }
public List <string> EditMP3Tags(List <string> mp3Files, string mp3MusicRootPath, bool useFileInfo, ref OperationResult op) { int cnt = 0; bool badfile = false; List <string> badMp3List = new List <string>(); foreach (string mp3File in mp3Files) { badfile = false; cnt++; this.CurrentCount = cnt; OperationResult _op = new OperationResult(); try { MP3FileDataType mp3 = BCHMP3Utilities.ConvertFileNameToMP3InfoBCHFrmtWithDirInfo(mp3File, mp3MusicRootPath, ref _op); if (!_op.Success) { badMp3List.Add(mp3File); badfile = true; } if (_op.Success) { BCHMP3Utilities.SaveMp3IdInfo(mp3, ref _op); } if (!_op.Success && !badfile) { badfile = true; badMp3List.Add(mp3File); } } catch (Exception ex) { _op.AddException(ex); if (!badfile) { badfile = true; badMp3List.Add(mp3File); } } op.AddOperationResult(ref _op); } return(badMp3List); }