* support for new metadata sources via CTDB

* CUETools: GUI tweaks for large screen resolutions on windows 7
* CUETools.Codecs.LAMEEncoder: fix VBR header update for filenames with unicode characters
* CUERipper: more string messages for SCSI errors when ripping
This commit is contained in:
chudov
2011-09-08 18:25:54 +00:00
parent 02d37c8bfc
commit 8b19665038
28 changed files with 4316 additions and 4105 deletions

View File

@@ -83,12 +83,19 @@ namespace CUETools.Codecs.LAME
DeInit(true);
if (needTag)
{
bool utf8Required = Encoding.Default.GetString(Encoding.Default.GetBytes(_path)) != _path;
var tempDir = System.IO.Path.Combine(System.IO.Path.GetPathRoot(_path), "Temp");
var tempName = utf8Required ? System.IO.Path.Combine(tempDir, Guid.NewGuid().ToString()) : _path;
try
{
Lame_encDll.beWriteInfoTag(m_hLameStream, _path);
if (utf8Required && !Directory.Exists(tempDir)) Directory.CreateDirectory(tempDir);
if (utf8Required) File.Move(_path, tempName);
Lame_encDll.beWriteInfoTag(m_hLameStream, tempName);
if (utf8Required) File.Move(tempName, _path);
}
catch
{
if (utf8Required) File.Move(tempName, _path);
}
}
}