CUETools 2.1.1

* Local Database for verification results and metadata
* FlaCuda replaced with FLACCL
This commit is contained in:
chudov
2011-03-08 15:37:43 +00:00
parent 51639e3c7b
commit 052cb096c4
65 changed files with 2839 additions and 1037 deletions

View File

@@ -43,7 +43,7 @@ namespace CUETools.Processor
{
get
{
string cache = System.IO.Path.Combine(System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "CUE Tools"), "MetadataCache");
string cache = Path.Combine(SettingsShared.GetProfileDir("CUE Tools", System.Windows.Forms.Application.ExecutablePath), "MetadataCache");
if (!Directory.Exists(cache))
Directory.CreateDirectory(cache);
return cache;
@@ -67,6 +67,27 @@ namespace CUETools.Processor
public string Catalog { get; set; }
public List<CUETrackMetadata> Tracks { get; set; }
[XmlIgnore]
public string DiscNumber01
{
get
{
uint td = 0, dn = 0;
if (uint.TryParse(TotalDiscs, out td) && uint.TryParse(DiscNumber, out dn) && td > 9 && dn > 0)
return string.Format("{0:00}", dn);
return DiscNumber;
}
}
[XmlIgnore]
public string DiscNumberAndTotal
{
get
{
return (TotalDiscs != "" && TotalDiscs != "1" ? DiscNumber01 + "/" + TotalDiscs : (DiscNumber != "" && DiscNumber != "1" ? DiscNumber01 : ""));
}
}
public void Save()
{
TextWriter writer = new StreamWriter(Path.Combine(MetadataPath, Id + ".xml"));
@@ -272,7 +293,7 @@ namespace CUETools.Processor
public CUEMetadataEntry(CUEMetadata metadata, CDImageLayout TOC, string key)
{
this.metadata = metadata;
this.metadata = new CUEMetadata(metadata);
this.TOC = TOC;
this.ImageKey = key;
}