mirror of
https://github.com/claunia/cuetools.net.git
synced 2025-12-16 18:14:25 +00:00
* removed 'submit' script
* added advanced options ctdb.submit, ctdb.server * musicbrainz NGS metadata can now be used in filename templates, including %discname%, %label%, %releasedate%, %country%, %releasedateandlabel%, %discnumberandname% * CUERipper now sends CD barcode when submitting
This commit is contained in:
@@ -116,9 +116,9 @@ namespace CUEPlayer
|
||||
{
|
||||
DataSet1.PlaylistRow row = dataSet.Playlist.AddPlaylistRow(
|
||||
path,
|
||||
cue.Artist,
|
||||
cue.Tracks[iTrack].Title,
|
||||
cue.Title,
|
||||
cue.Metadata.Artist,
|
||||
cue.Metadata.Tracks[iTrack].Title,
|
||||
cue.Metadata.Title,
|
||||
(int)cue.TOC[cue.TOC.FirstAudio + iTrack].Length / 75,
|
||||
iTrack + 1);
|
||||
listViewTracks.Items.Add(ToItem(row));
|
||||
|
||||
@@ -53,8 +53,8 @@ namespace CUERipper
|
||||
}
|
||||
|
||||
string[] OutputPathUseTemplates = {
|
||||
"%music%\\%artist%\\[%year% - ]%album%\\%artist% - %album%.cue",
|
||||
"%music%\\%artist%\\[%year% - ]%album%[ - %edition%]$ifgreater($max(%discnumber%,%totaldiscs%),1, - cd %discnumber%,)[' ('%unique%')']\\%artist% - %album%[ - %edition%].cue"
|
||||
"%music%\\%artist%\\[%year% - ]%album%\\%artist% - %album%[ '('disc %discnumberandname%')'].cue",
|
||||
"%music%\\%artist%\\[%year% - ]%album%[ '('disc %discnumberandname%')'][' ('%releasedateandlabel%')'][' ('%unique%')']\\%artist% - %album%.cue"
|
||||
};
|
||||
|
||||
//// Calculate the graphics path that representing the figure in the bitmap
|
||||
@@ -379,8 +379,9 @@ namespace CUERipper
|
||||
(int)cueSheet.ArVerify.WorstConfidence() + 1,
|
||||
audioSource.CorrectionQuality == 0 ? 0 :
|
||||
100 - (int)(7 * Math.Log(audioSource.ErrorsCount + 1)), // ErrorsCount==1 ~= 95, ErrorsCount==max ~= 5;
|
||||
cueSheet.Artist,
|
||||
cueSheet.Title);
|
||||
cueSheet.Metadata.Artist,
|
||||
cueSheet.Metadata.Title,
|
||||
cueSheet.TOC.Barcode);
|
||||
bool canFix = false;
|
||||
if (cueSheet.CTDB.QueryExceptionStatus == WebExceptionStatus.Success && audioSource.ErrorsCount != 0)
|
||||
{
|
||||
@@ -634,7 +635,7 @@ namespace CUERipper
|
||||
cueSheet.Action = CUEAction.Encode;
|
||||
|
||||
this.BeginInvoke((MethodInvoker)delegate() { toolStripStatusLabel1.Text = Properties.Resources.LookingUpVia + " CTDB..."; });
|
||||
cueSheet.UseCUEToolsDB(true, "CUERipper " + CUESheet.CUEToolsVersion, selectedDriveInfo.drive.ARName, true, false);
|
||||
cueSheet.UseCUEToolsDB("CUERipper " + CUESheet.CUEToolsVersion, selectedDriveInfo.drive.ARName, true, false);
|
||||
cueSheet.CTDB.UploadHelper.onProgress += new EventHandler<Krystalware.UploadHelper.UploadProgressEventArgs>(UploadProgress);
|
||||
this.BeginInvoke((MethodInvoker)delegate() { toolStripStatusLabel1.Text = Properties.Resources.LookingUpVia + " AccurateRip..."; });
|
||||
cueSheet.UseAccurateRip();
|
||||
|
||||
@@ -515,7 +515,7 @@ namespace CUETools.AccurateRip
|
||||
int posA = (int)_toc[iTrack + _toc.FirstAudio - 1].Start * 588 + (iTrack > 1 ? oi : prefixSamples);
|
||||
int posB = iTrack < _toc.AudioTracks ?
|
||||
(int)_toc[iTrack + 1 + _toc.FirstAudio - 1].Start * 588 + oi :
|
||||
(int)_toc.AudioLength * 588 - suffixSamples;
|
||||
(int)_toc.Leadout * 588 - suffixSamples;
|
||||
uint crcA, crcB;
|
||||
if (oi > 0)
|
||||
{
|
||||
|
||||
@@ -253,7 +253,7 @@ namespace CUETools.CDImage
|
||||
|
||||
public CDImageLayout(CDImageLayout src)
|
||||
{
|
||||
_catalog = src._catalog;
|
||||
_barcode = src._barcode;
|
||||
_audioTracks = src._audioTracks;
|
||||
_firstAudio = src._firstAudio;
|
||||
_tracks = new List<CDTrack>();
|
||||
@@ -348,6 +348,14 @@ namespace CUETools.CDImage
|
||||
}
|
||||
}
|
||||
|
||||
public int LastAudio
|
||||
{
|
||||
get
|
||||
{
|
||||
return _audioTracks + _firstAudio;
|
||||
}
|
||||
}
|
||||
|
||||
public uint Leadout
|
||||
{
|
||||
get
|
||||
@@ -364,15 +372,15 @@ namespace CUETools.CDImage
|
||||
}
|
||||
}
|
||||
|
||||
public string Catalog
|
||||
public string Barcode
|
||||
{
|
||||
get
|
||||
{
|
||||
return _catalog;
|
||||
return _barcode;
|
||||
}
|
||||
set
|
||||
{
|
||||
_catalog = value;
|
||||
_barcode = value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -381,10 +389,9 @@ namespace CUETools.CDImage
|
||||
get
|
||||
{
|
||||
StringBuilder mbSB = new StringBuilder();
|
||||
mbSB.AppendFormat("{0} {1}", 1 + _firstAudio, AudioTracks + _firstAudio);
|
||||
mbSB.AppendFormat(" {0}", _tracks[_firstAudio + (int)AudioTracks - 1].End + 1 + 150);
|
||||
for (int iTrack = 0; iTrack < AudioTracks; iTrack++)
|
||||
mbSB.AppendFormat(" {0}", _tracks[_firstAudio + iTrack].Start + 150);
|
||||
mbSB.AppendFormat("{0} {1} {2}", 1, LastAudio, _tracks[LastAudio - 1].End + 1 + 150);
|
||||
for (int iTrack = 0; iTrack < LastAudio; iTrack++)
|
||||
mbSB.AppendFormat(" {0}", _tracks[iTrack].Start + 150);
|
||||
return mbSB.ToString();
|
||||
}
|
||||
}
|
||||
@@ -394,11 +401,11 @@ namespace CUETools.CDImage
|
||||
get
|
||||
{
|
||||
StringBuilder mbSB = new StringBuilder();
|
||||
mbSB.AppendFormat("{0:X2}{1:X2}", 1 + _firstAudio, AudioTracks + _firstAudio);
|
||||
mbSB.AppendFormat("{0:X8}", _tracks[_firstAudio + (int)AudioTracks - 1].End + 1 + 150);
|
||||
for (int iTrack = 0; iTrack < AudioTracks; iTrack++)
|
||||
mbSB.AppendFormat("{0:X8}", _tracks[_firstAudio + iTrack].Start + 150);
|
||||
mbSB.Append(new string('0', (99 - (int)AudioTracks) * 8));
|
||||
mbSB.AppendFormat("{0:X2}{1:X2}", 1, LastAudio);
|
||||
mbSB.AppendFormat("{0:X8}", _tracks[LastAudio - 1].End + 1 + 150);
|
||||
for (int iTrack = 0; iTrack < LastAudio ; iTrack++)
|
||||
mbSB.AppendFormat("{0:X8}", _tracks[iTrack].Start + 150);
|
||||
mbSB.Append(new string('0', (99 - LastAudio) * 8));
|
||||
byte[] hashBytes = (new SHA1CryptoServiceProvider()).ComputeHash(Encoding.ASCII.GetBytes(mbSB.ToString()));
|
||||
return Convert.ToBase64String(hashBytes).Replace('+', '.').Replace('/', '_').Replace('=', '-');
|
||||
}
|
||||
@@ -520,7 +527,7 @@ namespace CUETools.CDImage
|
||||
return TimeToString("{0:00}:{1:00}:{2:00}", t);
|
||||
}
|
||||
|
||||
string _catalog;
|
||||
string _barcode;
|
||||
IList<CDTrack> _tracks;
|
||||
int _audioTracks;
|
||||
int _firstAudio;
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace CUETools.CTDB.EACPlugin
|
||||
|
||||
private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
|
||||
{
|
||||
this.ctdb.ContactDB(this.agent, null, true, false);
|
||||
this.ctdb.ContactDB(null, this.agent, null, true, false);
|
||||
}
|
||||
|
||||
private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
|
||||
|
||||
@@ -49,12 +49,12 @@ namespace CUETools.CTDB.EACPlugin
|
||||
this.ctdb.UploadHelper.onProgress += UploadProgress;
|
||||
if (this.agent != null)
|
||||
{
|
||||
this.ctdb.ContactDB(this.agent, this.drivename, false, false);
|
||||
this.ctdb.ContactDB(null, this.agent, this.drivename, false, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ctdb.DoVerify();
|
||||
this.ctdb.Submit(this.confidence, this.quality, this.artist, this.title);
|
||||
this.ctdb.Submit(this.confidence, this.quality, this.artist, this.title, null);
|
||||
}
|
||||
this.ctdb.UploadHelper.onProgress -= UploadProgress;
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ namespace AudioDataPlugIn
|
||||
var form = new FormSubmitParity(ctdb, "EAC" + m_data.HostVersion + " CTDB 2.1.2", m_drivename);
|
||||
//ctdb.ContactDB("EAC" + m_data.HostVersion + " CTDB 2.1.2", m_drivename, false, false);
|
||||
form.ShowDialog();
|
||||
ctdb.Init(true, ar);
|
||||
ctdb.Init(ar);
|
||||
this.sequence_ok = true;
|
||||
this.m_start_pos = 0;
|
||||
this.m_length = 0;
|
||||
|
||||
@@ -18,7 +18,8 @@ namespace CUETools.CTDB
|
||||
{
|
||||
public class CUEToolsDB
|
||||
{
|
||||
const string urlbase = "http://db.cuetools.net";
|
||||
const string defaultServer = "http://db.cuetools.net";
|
||||
string urlbase;
|
||||
string userAgent;
|
||||
string driveName;
|
||||
|
||||
@@ -56,10 +57,11 @@ namespace CUETools.CTDB
|
||||
}
|
||||
}
|
||||
|
||||
public void ContactDB(string userAgent, string driveName, bool musicbrainz, bool fuzzy)
|
||||
public void ContactDB(string server, string userAgent, string driveName, bool musicbrainz, bool fuzzy)
|
||||
{
|
||||
this.driveName = driveName;
|
||||
this.userAgent = userAgent + " (" + Environment.OSVersion.VersionString + ")" + (driveName != null ? " (" + driveName + ")" : "");
|
||||
this.urlbase = "http://" + (server ?? defaultServer);
|
||||
this.total = 0;
|
||||
|
||||
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(urlbase
|
||||
@@ -220,23 +222,20 @@ namespace CUETools.CTDB
|
||||
return uuidInfo;
|
||||
}
|
||||
|
||||
public string Submit(int confidence, int quality, string artist, string title)
|
||||
public string Submit(int confidence, int quality, string artist, string title, string barcode)
|
||||
{
|
||||
if (this.QueryExceptionStatus != WebExceptionStatus.Success &&
|
||||
(this.QueryExceptionStatus != WebExceptionStatus.ProtocolError || this.QueryResponseStatus != HttpStatusCode.NotFound))
|
||||
return this.DBStatus;
|
||||
DBEntry confirm = null;
|
||||
foreach (DBEntry entry in this.Entries)
|
||||
if (entry.toc.TrackOffsets == this.toc.TrackOffsets && !entry.hasErrors)
|
||||
confirm = entry;
|
||||
DBEntry confirm = this.MatchingEntry;
|
||||
if (confirm != null) confidence = 1;
|
||||
DoSubmit(confidence, quality, artist, title, false, confirm);
|
||||
DoSubmit(confidence, quality, artist, title, barcode, false, confirm);
|
||||
if (subResult == "parity needed")
|
||||
DoSubmit(confidence, quality, artist, title, true, confirm);
|
||||
DoSubmit(confidence, quality, artist, title, barcode, true, confirm);
|
||||
return subResult;
|
||||
}
|
||||
|
||||
protected string DoSubmit(int confidence, int quality, string artist, string title, bool upload, DBEntry confirm)
|
||||
protected string DoSubmit(int confidence, int quality, string artist, string title, string barcode, bool upload, DBEntry confirm)
|
||||
{
|
||||
UploadFile[] files;
|
||||
if (upload)
|
||||
@@ -282,8 +281,8 @@ namespace CUETools.CTDB
|
||||
form.Add("confidence", confidence.ToString());
|
||||
form.Add("userid", GetUUID());
|
||||
form.Add("quality", quality.ToString());
|
||||
if (driveName != null)
|
||||
form.Add("drivename", driveName);
|
||||
if (driveName != null && driveName != "") form.Add("drivename", driveName);
|
||||
if (barcode != null && barcode != "") form.Add("barcode", barcode);
|
||||
if (artist != null && artist != "") form.Add("artist", artist);
|
||||
if (title != null && title != "") form.Add("title", title);
|
||||
|
||||
@@ -419,7 +418,20 @@ namespace CUETools.CTDB
|
||||
}
|
||||
}
|
||||
|
||||
public void Init(bool encode, AccurateRipVerify ar)
|
||||
public DBEntry MatchingEntry
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.QueryExceptionStatus != WebExceptionStatus.Success)
|
||||
return null;
|
||||
foreach (DBEntry entry in this.Entries)
|
||||
if (entry.toc.ToString() == this.toc.ToString() && !entry.hasErrors)
|
||||
return entry;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public void Init(AccurateRipVerify ar)
|
||||
{
|
||||
int npar = 8;
|
||||
foreach (DBEntry entry in entries)
|
||||
@@ -681,30 +693,11 @@ namespace CUETools.CTDB
|
||||
Write(temp);
|
||||
}
|
||||
|
||||
public void Write(long value)
|
||||
{
|
||||
byte[] temp = new byte[8];
|
||||
temp[7] = (byte)((value) & 0xff);
|
||||
temp[6] = (byte)((value >> 8) & 0xff);
|
||||
temp[5] = (byte)((value >> 16) & 0xff);
|
||||
temp[4] = (byte)((value >> 24) & 0xff);
|
||||
temp[3] = (byte)((value >> 32) & 0xff);
|
||||
temp[2] = (byte)((value >> 40) & 0xff);
|
||||
temp[1] = (byte)((value >> 48) & 0xff);
|
||||
temp[0] = (byte)((value >> 56) & 0xff);
|
||||
Write(temp);
|
||||
}
|
||||
|
||||
public void Write(string value)
|
||||
{
|
||||
Write(Encoding.UTF8.GetBytes(value));
|
||||
}
|
||||
|
||||
public void Write(DateTime value)
|
||||
{
|
||||
Write(value.ToFileTimeUtc());
|
||||
}
|
||||
|
||||
public void Write(byte[] value)
|
||||
{
|
||||
stream.Write(value, 0, value.Length);
|
||||
|
||||
@@ -23,6 +23,7 @@ namespace CUETools.Processor
|
||||
Barcode = "";
|
||||
ReleaseDate = "";
|
||||
Label = "";
|
||||
Country = "";
|
||||
Tracks = new List<CUETrackMetadata>();
|
||||
}
|
||||
|
||||
@@ -74,6 +75,8 @@ namespace CUETools.Processor
|
||||
public string ReleaseDate { get; set; }
|
||||
[DefaultValue("")]
|
||||
public string Label { get; set; }
|
||||
[DefaultValue("")]
|
||||
public string Country { get; set; }
|
||||
public List<CUETrackMetadata> Tracks { get; set; }
|
||||
|
||||
[XmlIgnore]
|
||||
@@ -97,6 +100,28 @@ namespace CUETools.Processor
|
||||
}
|
||||
}
|
||||
|
||||
[XmlIgnore]
|
||||
public string ReleaseDateAndLabel
|
||||
{
|
||||
get
|
||||
{
|
||||
return Label == "" && ReleaseDate == "" && Country == "" ? ""
|
||||
: Country
|
||||
+ (Country != "" && Label != "" ? " - " : "") + Label
|
||||
+ (Label + Country != "" && ReleaseDate != "" ? " - " : "") + ReleaseDate;
|
||||
}
|
||||
}
|
||||
|
||||
[XmlIgnore]
|
||||
public string DiscNumberAndName
|
||||
{
|
||||
get
|
||||
{
|
||||
return DiscNumberAndTotal == "" ? ""
|
||||
: DiscNumberAndTotal + (DiscName != "" ? " - " + DiscName : "");
|
||||
}
|
||||
}
|
||||
|
||||
public void Save()
|
||||
{
|
||||
TextWriter writer = new StreamWriter(Path.Combine(MetadataPath, Id + ".xml"));
|
||||
@@ -124,6 +149,7 @@ namespace CUETools.Processor
|
||||
if ((overwrite || Barcode == "") && metadata.Barcode != "") Barcode = metadata.Barcode;
|
||||
if ((overwrite || ReleaseDate == "") && metadata.ReleaseDate != "") ReleaseDate = metadata.ReleaseDate;
|
||||
if ((overwrite || Label == "") && metadata.Label != "") Label = metadata.Label;
|
||||
if ((overwrite || Country == "") && metadata.Country != "") Country = metadata.Country;
|
||||
for (int i = 0; i < Tracks.Count; i++)
|
||||
{
|
||||
if ((overwrite || Tracks[i].Title == "") && metadata.Tracks[i].Title != "") Tracks[i].Title = metadata.Tracks[i].Title;
|
||||
@@ -152,6 +178,7 @@ namespace CUETools.Processor
|
||||
Barcode != metadata.Barcode ||
|
||||
ReleaseDate != metadata.ReleaseDate ||
|
||||
Label != metadata.Label ||
|
||||
Country != metadata.Country ||
|
||||
Tracks.Count != metadata.Tracks.Count
|
||||
)
|
||||
return false;
|
||||
@@ -183,6 +210,7 @@ namespace CUETools.Processor
|
||||
Title = metadata.Title;
|
||||
Barcode = metadata.Barcode;
|
||||
ReleaseDate = metadata.ReleaseDate;
|
||||
Country = metadata.Country;
|
||||
Label = metadata.Label;
|
||||
for (int i = 0; i < Tracks.Count; i++)
|
||||
{
|
||||
@@ -201,6 +229,7 @@ namespace CUETools.Processor
|
||||
ReleaseDate = ev.Date ?? "";
|
||||
Year = (ev.Date ?? "").Substring(0, 4);
|
||||
Barcode = ev.Barcode ?? "";
|
||||
Country = ev.Country;
|
||||
Label = ((ev.Label == null ? null : ev.Label.GetName()) ?? "") + (ev.Label == null ? "" : " ") + (ev.CatalogNumber ?? "");
|
||||
}
|
||||
Artist = release.GetArtist();
|
||||
@@ -238,7 +267,8 @@ namespace CUETools.Processor
|
||||
this.DiscName = cdEntry.discname ?? "";
|
||||
this.Barcode = cdEntry.barcode ?? "";
|
||||
this.ReleaseDate = cdEntry.releasedate ?? "";
|
||||
this.Label = cdEntry.country ?? "";
|
||||
this.Country = cdEntry.country ?? "";
|
||||
this.Label = "";
|
||||
if (cdEntry.label != null)
|
||||
foreach (var l in cdEntry.label)
|
||||
this.Label = (this.Label == "" ? "" : this.Label + ": ") + (l.name ?? "") + (l.name != null && l.catno != null ? " " : "") + (l.catno ?? "");
|
||||
@@ -362,8 +392,8 @@ namespace CUETools.Processor
|
||||
return string.Format("{0}{1} - {2}{3}{4}", metadata.Year != "" ? metadata.Year + ": " : "",
|
||||
metadata.Artist == "" ? "Unknown Artist" : metadata.Artist,
|
||||
metadata.Title == "" ? "Unknown Title" : metadata.Title,
|
||||
metadata.DiscNumberAndTotal != "" ? " (disc " + metadata.DiscNumberAndTotal + (metadata.DiscName != "" ? ": " + metadata.DiscName : "") + ")" : "",
|
||||
metadata.Label == "" && metadata.ReleaseDate == "" ? "" : " (" + metadata.Label + (metadata.Label != "" && metadata.ReleaseDate != "" ? ": " : "" ) + metadata.ReleaseDate + ")");
|
||||
metadata.DiscNumberAndName == "" ? "" : " (disc " + metadata.DiscNumberAndName + ")",
|
||||
metadata.ReleaseDateAndLabel == "" ? "" : " (" + metadata.ReleaseDateAndLabel + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -275,6 +275,18 @@ namespace CUETools.Processor
|
||||
}
|
||||
|
||||
public static class General {
|
||||
public static string GetCUELine(List<CUELine> list, string command)
|
||||
{
|
||||
var line = General.FindCUELine(list, command);
|
||||
return (line == null || line.Params.Count < 2) ? String.Empty : line.Params[1];
|
||||
}
|
||||
|
||||
public static string GetCUELine(List<CUELine> list, string command, string command2)
|
||||
{
|
||||
var line = General.FindCUELine(list, command, command2);
|
||||
return (line == null || line.Params.Count < 3) ? String.Empty : line.Params[2];
|
||||
}
|
||||
|
||||
public static CUELine FindCUELine(List<CUELine> list, string command) {
|
||||
command = command.ToUpper();
|
||||
foreach (CUELine line in list) {
|
||||
@@ -318,6 +330,12 @@ namespace CUETools.Processor
|
||||
|
||||
public static void SetCUELine(List<CUELine> list, string command, string value, bool quoted)
|
||||
{
|
||||
if (value == "")
|
||||
{
|
||||
General.DelCUELine(list, command);
|
||||
return;
|
||||
}
|
||||
|
||||
CUELine line = General.FindCUELine(list, command);
|
||||
if (line == null)
|
||||
{
|
||||
@@ -339,6 +357,12 @@ namespace CUETools.Processor
|
||||
|
||||
public static void SetCUELine(List<CUELine> list, string command, string command2, string value, bool quoted)
|
||||
{
|
||||
if (value == "")
|
||||
{
|
||||
General.DelCUELine(list, command, command2);
|
||||
return;
|
||||
}
|
||||
|
||||
CUELine line = General.FindCUELine(list, command, command2);
|
||||
if (line == null)
|
||||
{
|
||||
@@ -1120,6 +1144,10 @@ namespace CUETools.Processor
|
||||
[DefaultValue(false)]
|
||||
[DisplayName("Create TOC files")]
|
||||
public bool CreateTOC { get; set; }
|
||||
[DefaultValue(true), Category("CTDB"), DisplayName("Submit to CTDB")]
|
||||
public bool CTDBSubmit { get; set; }
|
||||
[DefaultValue("db.cuetools.net"), Category("CTDB"), DisplayName("CTDB Server")]
|
||||
public string CTDBServer { get; set; }
|
||||
|
||||
public enum ProxyMode
|
||||
{
|
||||
@@ -1359,12 +1387,6 @@ processor._useCUEToolsDBFix = true;
|
||||
processor.Action = CUEAction.Encode;
|
||||
return processor.Go();
|
||||
"));
|
||||
scripts.Add("submit", new CUEToolsScript("submit", true,
|
||||
new CUEAction[] { CUEAction.Verify },
|
||||
@"
|
||||
string status = processor.Go();
|
||||
"));
|
||||
|
||||
defaultVerifyScript = "default";
|
||||
defaultEncodeScript = "default";
|
||||
}
|
||||
@@ -1690,7 +1712,10 @@ string status = processor.Go();
|
||||
conditions.Add((CUEAction)sr.LoadInt32(string.Format("CustomScript{0}Condition{1}", nScripts, nCondition), 0, null));
|
||||
CUEToolsScript script;
|
||||
if (!scripts.TryGetValue(name, out script))
|
||||
{
|
||||
if (name != "submit")
|
||||
scripts.Add(name, new CUEToolsScript(name, false, conditions, code));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!script.builtin)
|
||||
@@ -1885,7 +1910,6 @@ string status = processor.Go();
|
||||
internal bool _useAccurateRip = false;
|
||||
internal bool _useCUEToolsDB = false;
|
||||
private bool _useCUEToolsDBFix = false;
|
||||
private bool _useCUEToolsDBSibmit = false;
|
||||
private bool _processed = false;
|
||||
private uint? _minDataTrackLength;
|
||||
private string _accurateRipId;
|
||||
@@ -1921,6 +1945,7 @@ string status = processor.Go();
|
||||
private int _padding = 8192;
|
||||
private IWebProxy proxy;
|
||||
private CUEMetadata taglibMetadata;
|
||||
private CUEMetadata cueMetadata;
|
||||
private bool _useLocalDB;
|
||||
private CUEToolsLocalDB _localDB;
|
||||
|
||||
@@ -1965,6 +1990,7 @@ string status = processor.Go();
|
||||
_trackFilenames.Add(string.Format("{0:00}.wav", iTrack + 1));
|
||||
_tracks.Add(new TrackInfo());
|
||||
}
|
||||
cueMetadata = new CUEMetadata(TOC.TOCID, (int)TOC.AudioTracks);
|
||||
_arVerify = new AccurateRipVerify(_toc, proxy);
|
||||
_isCD = true;
|
||||
SourceInfo cdInfo;
|
||||
@@ -2032,58 +2058,18 @@ string status = processor.Go();
|
||||
}
|
||||
}
|
||||
|
||||
public void CopyMetadata(CUESheet metadata)
|
||||
{
|
||||
TotalDiscs = metadata.TotalDiscs;
|
||||
DiscNumber = metadata.DiscNumber;
|
||||
Year = metadata.Year;
|
||||
Genre = metadata.Genre;
|
||||
Artist = metadata.Artist;
|
||||
Title = metadata.Title;
|
||||
Catalog = metadata.Catalog;
|
||||
for (int i = 0; i < Tracks.Count; i++)
|
||||
{
|
||||
Tracks[i].Title = metadata.Tracks[i].Title;
|
||||
Tracks[i].Artist = metadata.Tracks[i].Artist;
|
||||
}
|
||||
}
|
||||
|
||||
public void CopyMetadata(CUEMetadata metadata)
|
||||
{
|
||||
TotalDiscs = metadata.TotalDiscs;
|
||||
DiscNumber = metadata.DiscNumber;
|
||||
Year = metadata.Year;
|
||||
Genre = metadata.Genre;
|
||||
Artist = metadata.Artist;
|
||||
Title = metadata.Title;
|
||||
Catalog = metadata.Barcode;
|
||||
for (int i = 0; i < Tracks.Count; i++)
|
||||
{
|
||||
Tracks[i].Title = metadata.Tracks[i].Title;
|
||||
Tracks[i].Artist = metadata.Tracks[i].Artist;
|
||||
// ISRC?
|
||||
}
|
||||
if (this.cueMetadata == null)
|
||||
this.cueMetadata = new CUEMetadata(TOC.TOCID, (int)TOC.AudioTracks);
|
||||
this.cueMetadata.CopyMetadata(metadata);
|
||||
}
|
||||
|
||||
public CUEMetadata Metadata
|
||||
{
|
||||
get
|
||||
{
|
||||
CUEMetadata metadata = new CUEMetadata(TOC.TOCID, (int)TOC.AudioTracks);
|
||||
metadata.TotalDiscs = TotalDiscs;
|
||||
metadata.DiscNumber = DiscNumber;
|
||||
metadata.Year = Year;
|
||||
metadata.Genre = Genre;
|
||||
metadata.Artist = Artist;
|
||||
metadata.Title = Title;
|
||||
metadata.Barcode = Catalog;
|
||||
for (int i = 0; i < Tracks.Count; i++)
|
||||
{
|
||||
metadata.Tracks[i].Title = Tracks[i].Title;
|
||||
metadata.Tracks[i].Artist = Tracks[i].Artist;
|
||||
// ISRC?
|
||||
}
|
||||
return metadata;
|
||||
return cueMetadata;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2255,15 +2241,14 @@ string status = processor.Go();
|
||||
|
||||
if (useCUE)
|
||||
{
|
||||
CUEMetadata meta = Metadata;
|
||||
if (dbmeta == null || !dbmeta.Contains(meta))
|
||||
if (dbmeta == null || !dbmeta.Contains(cueMetadata))
|
||||
{
|
||||
if (meta.Contains(taglibMetadata) || !taglibMetadata.Contains(meta))
|
||||
Releases.Add(new CUEMetadataEntry(meta, TOC, "cue"));
|
||||
if (cueMetadata.Contains(taglibMetadata) || !taglibMetadata.Contains(cueMetadata))
|
||||
Releases.Add(new CUEMetadataEntry(new CUEMetadata(cueMetadata), TOC, "cue"));
|
||||
}
|
||||
if (dbmeta == null || !dbmeta.Contains(taglibMetadata))
|
||||
{
|
||||
if (!meta.Contains(taglibMetadata))
|
||||
if (!cueMetadata.Contains(taglibMetadata))
|
||||
Releases.Add(new CUEMetadataEntry(new CUEMetadata(taglibMetadata), TOC, "tags"));
|
||||
}
|
||||
}
|
||||
@@ -2280,7 +2265,7 @@ string status = processor.Go();
|
||||
{
|
||||
ShowProgress("Looking up album via CTDB...", 0.0, null, null);
|
||||
var ctdb = new CUEToolsDB(TOC, proxy);
|
||||
ctdb.ContactDB("CUETools " + CUEToolsVersion, null, true, true);
|
||||
ctdb.ContactDB(_config.advanced.CTDBServer, "CUETools " + CUEToolsVersion, null, true, true);
|
||||
foreach (var meta in ctdb.Metadata)
|
||||
{
|
||||
CUEMetadata metadata = new CUEMetadata(TOC.TOCID, (int)TOC.AudioTracks);
|
||||
@@ -2718,12 +2703,15 @@ string status = processor.Go();
|
||||
|
||||
using (sr)
|
||||
{
|
||||
while ((lineStr = sr.ReadLine()) != null) {
|
||||
while ((lineStr = sr.ReadLine()) != null)
|
||||
{
|
||||
CUELine line = new CUELine(lineStr);
|
||||
if (line.Params.Count > 0) {
|
||||
if (line.Params.Count > 0)
|
||||
{
|
||||
command = line.Params[0].ToUpper();
|
||||
|
||||
if (command == "FILE") {
|
||||
if (command == "FILE")
|
||||
{
|
||||
fileType = line.Params[2].ToUpper();
|
||||
fileIsBinary = (fileType == "BINARY") || (fileType == "MOTOROLA");
|
||||
if (fileIsBinary)
|
||||
@@ -2883,7 +2871,8 @@ string status = processor.Go();
|
||||
_sources.Add(sourceInfo);
|
||||
absoluteFileStartTime += pregapLength;
|
||||
}
|
||||
else if (command == "POSTGAP") {
|
||||
else if (command == "POSTGAP")
|
||||
{
|
||||
throw new Exception("POSTGAP command isn't supported.");
|
||||
}
|
||||
//else if ((command == "REM") &&
|
||||
@@ -2969,7 +2958,7 @@ string status = processor.Go();
|
||||
{
|
||||
if (indexes[i + 1].Time - indexes[i].Time < 0)
|
||||
throw new Exception("Indexes must be in chronological order.");
|
||||
if ((indexes[i+1].Track != indexes[i].Track || indexes[i+1].Index != indexes[i].Index + 1) &&
|
||||
if ((indexes[i + 1].Track != indexes[i].Track || indexes[i + 1].Index != indexes[i].Index + 1) &&
|
||||
(indexes[i + 1].Track != indexes[i].Track + 1 || indexes[i].Index < 1 || indexes[i + 1].Index > 1))
|
||||
throw new Exception("Indexes must be in chronological order.");
|
||||
if (indexes[i].Index == 1 && (i == 0 || indexes[i - 1].Index != 0))
|
||||
@@ -2998,9 +2987,10 @@ string status = processor.Go();
|
||||
_htoaFilename = _hasHTOAFilename ? Path.GetFileName(_sourcePaths[0]) : "01.00.wav";
|
||||
|
||||
_hasTrackFilenames = !_hasEmbeddedCUESheet && !_hasSingleFilename && (_sourcePaths.Count == TrackCount || _hasHTOAFilename);
|
||||
for (i = 0; i < TrackCount; i++) {
|
||||
_trackFilenames.Add( _hasTrackFilenames ? Path.GetFileName(
|
||||
_sourcePaths[i + (_hasHTOAFilename ? 1 : 0)]) : String.Format("{0:00}.wav", i + 1) );
|
||||
for (i = 0; i < TrackCount; i++)
|
||||
{
|
||||
_trackFilenames.Add(_hasTrackFilenames ? Path.GetFileName(
|
||||
_sourcePaths[i + (_hasHTOAFilename ? 1 : 0)]) : String.Format("{0:00}.wav", i + 1));
|
||||
}
|
||||
if (!_hasEmbeddedCUESheet && _hasSingleFilename)
|
||||
{
|
||||
@@ -3025,15 +3015,29 @@ string status = processor.Go();
|
||||
null) ?? "";
|
||||
}
|
||||
|
||||
cueMetadata = new CUEMetadata(TOC.TOCID, (int)TOC.AudioTracks);
|
||||
cueMetadata.Artist = General.GetCUELine(_attributes, "PERFORMER");
|
||||
cueMetadata.Title = General.GetCUELine(_attributes, "TITLE");
|
||||
cueMetadata.Barcode = General.GetCUELine(_attributes, "CATALOG");
|
||||
cueMetadata.Year = General.GetCUELine(_attributes, "REM", "DATE");
|
||||
cueMetadata.DiscNumber = General.GetCUELine(_attributes, "REM", "DISCNUMBER");
|
||||
cueMetadata.TotalDiscs = General.GetCUELine(_attributes, "REM", "TOTALDISCS");
|
||||
cueMetadata.Genre = General.GetCUELine(_attributes, "REM", "GENRE");
|
||||
for (i = 0; i < Tracks.Count; i ++)
|
||||
{
|
||||
cueMetadata.Tracks[i].Artist = General.GetCUELine(Tracks[i].Attributes, "PERFORMER");
|
||||
cueMetadata.Tracks[i].Title = General.GetCUELine(Tracks[i].Attributes, "TITLE");
|
||||
cueMetadata.Tracks[i].ISRC = General.GetCUELine(Tracks[i].Attributes, "ISRC");
|
||||
}
|
||||
// Now, TOC.TOCID might change!!!
|
||||
|
||||
if (_config.fillUpCUE)
|
||||
{
|
||||
CUEMetadata meta = Metadata; // new CUEMetadata(Metadata);
|
||||
meta.Merge(taglibMetadata, _config.overwriteCUEData);
|
||||
CopyMetadata(meta);
|
||||
cueMetadata.Merge(taglibMetadata, _config.overwriteCUEData);
|
||||
for (i = 0; i < TrackCount; i++)
|
||||
{
|
||||
if (_tracks[i].Title == "" && _hasTrackFilenames)
|
||||
_tracks[i].Title = Path.GetFileNameWithoutExtension(_trackFilenames[i]).TrimStart(" .-_0123456789".ToCharArray());
|
||||
if (cueMetadata.Tracks[i].Title == "" && _hasTrackFilenames)
|
||||
cueMetadata.Tracks[i].Title = Path.GetFileNameWithoutExtension(_trackFilenames[i]).TrimStart(" .-_0123456789".ToCharArray());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3159,7 +3163,7 @@ string status = processor.Go();
|
||||
tocFromLog[iTrack].IsAudio = false;
|
||||
}
|
||||
tocFromLog.FirstAudio += dtracks;
|
||||
tocFromLog.AudioTracks -= (uint) dtracks;
|
||||
tocFromLog.AudioTracks -= (uint)dtracks;
|
||||
}
|
||||
}
|
||||
if (tocFromLog.AudioTracks == _toc.AudioTracks
|
||||
@@ -3239,15 +3243,19 @@ string status = processor.Go();
|
||||
_albumArt.ForEach(t => _padding += _albumArt[0].Data.Count);
|
||||
if (_config.embedLog && _eacLog != null)
|
||||
_padding += _eacLog.Length;
|
||||
|
||||
cueMetadata.Id = TOC.TOCID;
|
||||
taglibMetadata.Id = TOC.TOCID;
|
||||
// TODO: It should also be set when assigning a DataTrack!!!
|
||||
}
|
||||
|
||||
public void UseCUEToolsDB(bool submit, string userAgent, string driveName, bool meta, bool fuzzy)
|
||||
public void UseCUEToolsDB(string userAgent, string driveName, bool meta, bool fuzzy)
|
||||
{
|
||||
ShowProgress((string)"Contacting CUETools database...", 0, null, null);
|
||||
|
||||
_CUEToolsDB = new CUEToolsDB(_toc, proxy);
|
||||
_CUEToolsDB.UploadHelper.onProgress += new EventHandler<Krystalware.UploadHelper.UploadProgressEventArgs>(UploadProgress);
|
||||
_CUEToolsDB.ContactDB(userAgent, driveName, meta, fuzzy);
|
||||
_CUEToolsDB.ContactDB(_config.advanced.CTDBServer, userAgent, driveName, meta, fuzzy);
|
||||
|
||||
if (!_toc[_toc.TrackCount].IsAudio && DataTrackLength == 0)
|
||||
foreach (DBEntry e in _CUEToolsDB.Entries)
|
||||
@@ -3259,7 +3267,6 @@ string status = processor.Go();
|
||||
|
||||
ShowProgress("", 0.0, null, null);
|
||||
_useCUEToolsDB = true;
|
||||
_useCUEToolsDBSibmit = submit;
|
||||
}
|
||||
|
||||
public void UseAccurateRip()
|
||||
@@ -3542,17 +3549,23 @@ string status = processor.Go();
|
||||
catch { }
|
||||
}
|
||||
vars.Add("music", Environment.GetFolderPath(Environment.SpecialFolder.MyMusic));
|
||||
string artist = cueSheet == null ? "Artist" : cueSheet.Artist == "" ? "Unknown Artist" : cueSheet.Artist;
|
||||
string album = cueSheet == null ? "Album" : cueSheet.Title == "" ? "Unknown Title" : cueSheet.Title;
|
||||
string artist = cueSheet == null ? "Artist" : cueSheet.Metadata.Artist == "" ? "Unknown Artist" : cueSheet.Metadata.Artist;
|
||||
string album = cueSheet == null ? "Album" : cueSheet.Metadata.Title == "" ? "Unknown Title" : cueSheet.Metadata.Title;
|
||||
vars.Add("artist", General.EmptyStringToNull(_config.CleanseString(artist)));
|
||||
vars.Add("album", General.EmptyStringToNull(_config.CleanseString(album)));
|
||||
|
||||
if (cueSheet != null)
|
||||
{
|
||||
vars.Add("year", General.EmptyStringToNull(cueSheet.Year));
|
||||
vars.Add("catalog", General.EmptyStringToNull(cueSheet.Catalog));
|
||||
vars.Add("discnumber", General.EmptyStringToNull(cueSheet.DiscNumber01));
|
||||
vars.Add("totaldiscs", General.EmptyStringToNull(cueSheet.TotalDiscs));
|
||||
vars.Add("year", General.EmptyStringToNull(_config.CleanseString(cueSheet.Metadata.Year)));
|
||||
vars.Add("catalog", General.EmptyStringToNull(_config.CleanseString(cueSheet.Metadata.Barcode)));
|
||||
vars.Add("label", General.EmptyStringToNull(_config.CleanseString(cueSheet.Metadata.Label)));
|
||||
vars.Add("country", General.EmptyStringToNull(_config.CleanseString(cueSheet.Metadata.Country)));
|
||||
vars.Add("releasedate", General.EmptyStringToNull(_config.CleanseString(cueSheet.Metadata.ReleaseDate)));
|
||||
vars.Add("discname", General.EmptyStringToNull(_config.CleanseString(cueSheet.Metadata.DiscName)));
|
||||
vars.Add("discnumber", General.EmptyStringToNull(_config.CleanseString(cueSheet.Metadata.DiscNumber01)));
|
||||
vars.Add("totaldiscs", General.EmptyStringToNull(_config.CleanseString(cueSheet.Metadata.TotalDiscs)));
|
||||
vars.Add("releasedateandlabel", General.EmptyStringToNull(_config.CleanseString(cueSheet.Metadata.ReleaseDateAndLabel)));
|
||||
vars.Add("discnumberandname", General.EmptyStringToNull(_config.CleanseString(cueSheet.Metadata.DiscNumberAndName.Replace("/", " of "))));
|
||||
NameValueCollection tags = cueSheet.Tags;
|
||||
if (tags != null)
|
||||
foreach (string tag in tags.AllKeys)
|
||||
@@ -3598,13 +3611,13 @@ string status = processor.Go();
|
||||
|
||||
NameValueCollection vars = new NameValueCollection();
|
||||
vars.Add("unique", null);
|
||||
vars.Add("album artist", General.EmptyStringToNull(_config.CleanseString(Artist)));
|
||||
vars.Add("artist", General.EmptyStringToNull(_config.CleanseString(Artist)));
|
||||
vars.Add("album", General.EmptyStringToNull(_config.CleanseString(Title)));
|
||||
vars.Add("year", General.EmptyStringToNull(_config.CleanseString(Year)));
|
||||
vars.Add("catalog", General.EmptyStringToNull(_config.CleanseString(Catalog)));
|
||||
vars.Add("discnumber", General.EmptyStringToNull(_config.CleanseString(DiscNumber01)));
|
||||
vars.Add("totaldiscs", General.EmptyStringToNull(_config.CleanseString(TotalDiscs)));
|
||||
vars.Add("album artist", General.EmptyStringToNull(_config.CleanseString(Metadata.Artist)));
|
||||
vars.Add("artist", General.EmptyStringToNull(_config.CleanseString(Metadata.Artist)));
|
||||
vars.Add("album", General.EmptyStringToNull(_config.CleanseString(Metadata.Title)));
|
||||
vars.Add("year", General.EmptyStringToNull(_config.CleanseString(Metadata.Year)));
|
||||
vars.Add("catalog", General.EmptyStringToNull(_config.CleanseString(Metadata.Barcode)));
|
||||
vars.Add("discnumber", General.EmptyStringToNull(_config.CleanseString(Metadata.DiscNumber01)));
|
||||
vars.Add("totaldiscs", General.EmptyStringToNull(_config.CleanseString(Metadata.TotalDiscs)));
|
||||
vars.Add("filename", Path.GetFileNameWithoutExtension(outputPath));
|
||||
vars.Add("tracknumber", null);
|
||||
vars.Add("title", null);
|
||||
@@ -3645,8 +3658,8 @@ string status = processor.Go();
|
||||
else
|
||||
{
|
||||
string trackStr = htoa ? "01.00" : String.Format("{0:00}", iTrack + 1);
|
||||
string artist = Tracks[htoa ? 0 : iTrack].Artist;
|
||||
string title = htoa ? "(HTOA)" : Tracks[iTrack].Title;
|
||||
string artist = Metadata.Tracks[htoa ? 0 : iTrack].Artist;
|
||||
string title = htoa ? "(HTOA)" : Metadata.Tracks[iTrack].Title;
|
||||
|
||||
vars["tracknumber"] = trackStr;
|
||||
vars["artist"] = General.EmptyStringToNull(_config.CleanseString(artist)) ?? vars["album artist"];
|
||||
@@ -3849,7 +3862,7 @@ string status = processor.Go();
|
||||
|
||||
logWriter.WriteLine(eacHeader,
|
||||
DateTime.Now,
|
||||
Artist, Title,
|
||||
Metadata.Artist, Metadata.Title,
|
||||
_ripper.EACName,
|
||||
_ripper.CorrectionQuality > 0 ? "Secure" : "Burst",
|
||||
_ripper.DriveOffset,
|
||||
@@ -4089,6 +4102,20 @@ string status = processor.Go();
|
||||
|
||||
uint timeRelativeToFileStart = 0;
|
||||
|
||||
General.SetCUELine(_attributes, "PERFORMER", Metadata.Artist, true);
|
||||
General.SetCUELine(_attributes, "TITLE", Metadata.Title, true);
|
||||
General.SetCUELine(_attributes, "CATALOG", Metadata.Barcode, false);
|
||||
General.SetCUELine(_attributes, "REM", "DATE", Metadata.Year, false);
|
||||
General.SetCUELine(_attributes, "REM", "DISCNUMBER", Metadata.DiscNumber, false);
|
||||
General.SetCUELine(_attributes, "REM", "TOTALDISCS", Metadata.TotalDiscs, false);
|
||||
General.SetCUELine(_attributes, "REM", "GENRE", Metadata.Genre, true);
|
||||
for (i = 0; i < Tracks.Count; i++)
|
||||
{
|
||||
General.SetCUELine(Tracks[i].Attributes, "PERFORMER", Metadata.Tracks[i].Artist, true);
|
||||
General.SetCUELine(Tracks[i].Attributes, "TITLE", Metadata.Tracks[i].Title, true);
|
||||
General.SetCUELine(Tracks[i].Attributes, "ISRC", Metadata.Tracks[i].ISRC, false);
|
||||
}
|
||||
|
||||
using (sw)
|
||||
{
|
||||
if (_config.writeArTagsOnEncode)
|
||||
@@ -4416,7 +4443,7 @@ string status = processor.Go();
|
||||
|
||||
bool fNeedAlbumArtist = false;
|
||||
for (int iTrack = 1; iTrack < TrackCount; iTrack++)
|
||||
if (_tracks[iTrack].Artist != _tracks[0].Artist)
|
||||
if (Metadata.Tracks[iTrack].Artist != Metadata.Tracks[0].Artist)
|
||||
fNeedAlbumArtist = true;
|
||||
|
||||
if (OutputStyle == CUEStyle.SingleFileWithCUE || OutputStyle == CUEStyle.SingleFile)
|
||||
@@ -4434,19 +4461,19 @@ string status = processor.Go();
|
||||
if (_config.writeBasicTagsFromCUEData)
|
||||
{
|
||||
uint temp;
|
||||
if (fileInfo.Tag.Album == null && Title != "")
|
||||
fileInfo.Tag.Album = Title;
|
||||
if (fNeedAlbumArtist && fileInfo.Tag.AlbumArtists.Length == 0 && Artist != "")
|
||||
fileInfo.Tag.AlbumArtists = new string[] { Artist };
|
||||
if (!fNeedAlbumArtist && fileInfo.Tag.Performers.Length == 0 && Artist != "")
|
||||
fileInfo.Tag.Performers = new string[] { Artist };
|
||||
if (fileInfo.Tag.Genres.Length == 0 && Genre != "")
|
||||
fileInfo.Tag.Genres = new string[] { Genre };
|
||||
if (fileInfo.Tag.DiscCount == 0 && TotalDiscs != "" && uint.TryParse(TotalDiscs, out temp))
|
||||
if (fileInfo.Tag.Album == null && Metadata.Title != "")
|
||||
fileInfo.Tag.Album = Metadata.Title;
|
||||
if (fNeedAlbumArtist && fileInfo.Tag.AlbumArtists.Length == 0 && Metadata.Artist != "")
|
||||
fileInfo.Tag.AlbumArtists = new string[] { Metadata.Artist };
|
||||
if (!fNeedAlbumArtist && fileInfo.Tag.Performers.Length == 0 && Metadata.Artist != "")
|
||||
fileInfo.Tag.Performers = new string[] { Metadata.Artist };
|
||||
if (fileInfo.Tag.Genres.Length == 0 && Metadata.Genre != "")
|
||||
fileInfo.Tag.Genres = new string[] { Metadata.Genre };
|
||||
if (fileInfo.Tag.DiscCount == 0 && Metadata.TotalDiscs != "" && uint.TryParse(Metadata.TotalDiscs, out temp))
|
||||
fileInfo.Tag.DiscCount = temp;
|
||||
if (fileInfo.Tag.Disc == 0 && DiscNumber != "" && uint.TryParse(DiscNumber, out temp))
|
||||
if (fileInfo.Tag.Disc == 0 && Metadata.DiscNumber != "" && uint.TryParse(Metadata.DiscNumber, out temp))
|
||||
fileInfo.Tag.Disc = temp;
|
||||
if (fileInfo.Tag.Year == 0 && Year != "" && uint.TryParse(Year, out temp))
|
||||
if (fileInfo.Tag.Year == 0 && Metadata.Year != "" && uint.TryParse(Metadata.Year, out temp))
|
||||
fileInfo.Tag.Year = temp;
|
||||
}
|
||||
|
||||
@@ -4497,23 +4524,23 @@ string status = processor.Go();
|
||||
uint temp;
|
||||
fileInfo.Tag.TrackCount = (uint)TrackCount;
|
||||
fileInfo.Tag.Track = (uint)iTrack + 1;
|
||||
if (fileInfo.Tag.Title == null && _tracks[iTrack].Title != "")
|
||||
fileInfo.Tag.Title = _tracks[iTrack].Title;
|
||||
if (fileInfo.Tag.Album == null && Title != "")
|
||||
fileInfo.Tag.Album = Title;
|
||||
if (fileInfo.Tag.Performers.Length == 0 && _tracks[iTrack].Artist != "")
|
||||
fileInfo.Tag.Performers = new string[] { _tracks[iTrack].Artist };
|
||||
if (fileInfo.Tag.Performers.Length == 0 && Artist != "")
|
||||
fileInfo.Tag.Performers = new string[] { Artist };
|
||||
if (fNeedAlbumArtist && fileInfo.Tag.AlbumArtists.Length == 0 && Artist != "")
|
||||
fileInfo.Tag.AlbumArtists = new string[] { Artist };
|
||||
if (fileInfo.Tag.Genres.Length == 0 && Genre != "")
|
||||
fileInfo.Tag.Genres = new string[] { Genre };
|
||||
if (fileInfo.Tag.DiscCount == 0 && TotalDiscs != "" && uint.TryParse(TotalDiscs, out temp))
|
||||
if (fileInfo.Tag.Title == null && Metadata.Tracks[iTrack].Title != "")
|
||||
fileInfo.Tag.Title = Metadata.Tracks[iTrack].Title;
|
||||
if (fileInfo.Tag.Album == null && Metadata.Title != "")
|
||||
fileInfo.Tag.Album = Metadata.Title;
|
||||
if (fileInfo.Tag.Performers.Length == 0 && Metadata.Tracks[iTrack].Artist != "")
|
||||
fileInfo.Tag.Performers = new string[] { Metadata.Tracks[iTrack].Artist };
|
||||
if (fileInfo.Tag.Performers.Length == 0 && Metadata.Artist != "")
|
||||
fileInfo.Tag.Performers = new string[] { Metadata.Artist };
|
||||
if (fNeedAlbumArtist && fileInfo.Tag.AlbumArtists.Length == 0 && Metadata.Artist != "")
|
||||
fileInfo.Tag.AlbumArtists = new string[] { Metadata.Artist };
|
||||
if (fileInfo.Tag.Genres.Length == 0 && Metadata.Genre != "")
|
||||
fileInfo.Tag.Genres = new string[] { Metadata.Genre };
|
||||
if (fileInfo.Tag.DiscCount == 0 && Metadata.TotalDiscs != "" && uint.TryParse(Metadata.TotalDiscs, out temp))
|
||||
fileInfo.Tag.DiscCount = temp;
|
||||
if (fileInfo.Tag.Disc == 0 && DiscNumber != "" && uint.TryParse(DiscNumber, out temp))
|
||||
if (fileInfo.Tag.Disc == 0 && Metadata.DiscNumber != "" && uint.TryParse(Metadata.DiscNumber, out temp))
|
||||
fileInfo.Tag.Disc = temp;
|
||||
if (fileInfo.Tag.Year == 0 && Year != "" && uint.TryParse(Year, out temp))
|
||||
if (fileInfo.Tag.Year == 0 && Metadata.Year != "" && uint.TryParse(Metadata.Year, out temp))
|
||||
fileInfo.Tag.Year = temp;
|
||||
}
|
||||
|
||||
@@ -4561,7 +4588,7 @@ string status = processor.Go();
|
||||
if (!entry.InputPaths.Contains(path))
|
||||
entry.InputPaths.Add(path);
|
||||
if (entry.Metadata == null)
|
||||
entry.Metadata = Metadata;
|
||||
entry.Metadata = new CUEMetadata(cueMetadata);
|
||||
_localDB.Dirty = true;
|
||||
return entry;
|
||||
}
|
||||
@@ -4624,7 +4651,7 @@ string status = processor.Go();
|
||||
{
|
||||
foreach (string tpl in _config.advanced.CoverArtFiles)
|
||||
{
|
||||
string name = tpl.Replace("%album%", Title).Replace("%artist%", Artist);
|
||||
string name = tpl.Replace("%album%", Metadata.Title).Replace("%artist%", Metadata.Artist);
|
||||
string imgPath = Path.Combine(_isArchive ? _archiveCUEpath : _inputDir, name);
|
||||
bool exists = _isArchive ? _archiveContents.Contains(imgPath) : File.Exists(imgPath);
|
||||
if (exists)
|
||||
@@ -4645,7 +4672,7 @@ string status = processor.Go();
|
||||
// TODO: archive case
|
||||
foreach (string tpl in _config.advanced.CoverArtFiles)
|
||||
{
|
||||
string name = tpl.Replace("%album%", Title).Replace("%artist%", Artist);
|
||||
string name = tpl.Replace("%album%", Metadata.Title).Replace("%artist%", Metadata.Artist);
|
||||
List<string> matching = allfiles.FindAll(s => Path.GetFileName(s) == name);
|
||||
if (matching.Count == 1)
|
||||
{
|
||||
@@ -5048,7 +5075,7 @@ string status = processor.Go();
|
||||
if (_useCUEToolsDB && !_useCUEToolsDBFix)
|
||||
{
|
||||
_CUEToolsDB.TOC = _toc; // This might be unnecessary, because they point to the same structure - if we modify _toc, _CUEToolsDB.TOC gets updated. Unless we set cueSheet.TOC...
|
||||
_CUEToolsDB.Init(_useCUEToolsDBSibmit, _arVerify);
|
||||
_CUEToolsDB.Init(_arVerify);
|
||||
}
|
||||
|
||||
ShowProgress(String.Format("{2} track {0:00} ({1:00}%)...", 0, 0, noOutput ? "Verifying" : "Writing"), 0.0, null, null);
|
||||
@@ -5128,7 +5155,7 @@ string status = processor.Go();
|
||||
double trackPercent = (double)currentOffset / trackLength;
|
||||
ShowProgress(String.Format("{2} track {0:00} ({1:00}%)...", iIndex > 0 ? iTrack + 1 : iTrack, (int)(100*trackPercent),
|
||||
noOutput ? "Verifying" : "Writing"), (int)diskOffset, (int)diskLength,
|
||||
_isCD ? string.Format("{0}: {1:00} - {2}", audioSource.Path, iTrack + 1, _tracks[iTrack].Title) : audioSource.Path, discardOutput ? null : audioDest.Path);
|
||||
_isCD ? string.Format("{0}: {1:00} - {2}", audioSource.Path, iTrack + 1, Metadata.Tracks[iTrack].Title) : audioSource.Path, discardOutput ? null : audioDest.Path);
|
||||
}
|
||||
|
||||
copyCount = audioSource.Read(sampleBuffer, copyCount);
|
||||
@@ -5213,7 +5240,7 @@ string status = processor.Go();
|
||||
if (_useCUEToolsDB && !_useCUEToolsDBFix)
|
||||
{
|
||||
_CUEToolsDB.TOC = _toc;
|
||||
_CUEToolsDB.Init(_useCUEToolsDBSibmit, _arVerify);
|
||||
_CUEToolsDB.Init(_arVerify);
|
||||
}
|
||||
|
||||
ShowProgress(String.Format("Verifying ({0:00}%)...", 0), 0.0, null, null);
|
||||
@@ -5322,12 +5349,13 @@ string status = processor.Go();
|
||||
return;
|
||||
|
||||
_toc = (CDImageLayout)_ripper.TOC.Clone();
|
||||
if (_toc.Catalog != null)
|
||||
Catalog = _toc.Catalog;
|
||||
if (_toc.Barcode != null)
|
||||
Metadata.Barcode = _toc.Barcode;
|
||||
for (int iTrack = 0; iTrack < _toc.AudioTracks; iTrack++)
|
||||
{
|
||||
if (_toc[_toc.FirstAudio + iTrack].ISRC != null)
|
||||
General.SetCUELine(_tracks[iTrack].Attributes, "ISRC", _toc[_toc.FirstAudio + iTrack].ISRC, false);
|
||||
Metadata.Tracks[iTrack].ISRC = _toc[_toc.FirstAudio + iTrack].ISRC;
|
||||
//General.SetCUELine(_tracks[iTrack].Attributes, "ISRC", _toc[_toc.FirstAudio + iTrack].ISRC, false);
|
||||
if (_toc[_toc.FirstAudio + iTrack].DCP || _toc[_toc.FirstAudio + iTrack].PreEmphasis)
|
||||
_tracks[iTrack].Attributes.Add(new CUELine("FLAGS" + (_toc[_toc.FirstAudio + iTrack].PreEmphasis ? " PRE" : "") + (_toc[_toc.FirstAudio + iTrack].DCP ? " DCP" : "")));
|
||||
}
|
||||
@@ -5761,6 +5789,14 @@ string status = processor.Go();
|
||||
}
|
||||
}
|
||||
|
||||
public string AccurateRipId
|
||||
{
|
||||
get
|
||||
{
|
||||
return _accurateRipId;
|
||||
}
|
||||
}
|
||||
|
||||
public string ArLogFileName
|
||||
{
|
||||
get
|
||||
@@ -5794,117 +5830,6 @@ string status = processor.Go();
|
||||
}
|
||||
}
|
||||
|
||||
public string Artist {
|
||||
get {
|
||||
CUELine line = General.FindCUELine(_attributes, "PERFORMER");
|
||||
return (line == null || line.Params.Count < 2) ? String.Empty : line.Params[1];
|
||||
}
|
||||
set {
|
||||
General.SetCUELine(_attributes, "PERFORMER", value, true);
|
||||
}
|
||||
}
|
||||
|
||||
public string Year
|
||||
{
|
||||
get
|
||||
{
|
||||
CUELine line = General.FindCUELine(_attributes, "REM", "DATE");
|
||||
return ( line == null || line.Params.Count < 3 ) ? String.Empty : line.Params[2];
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value != "")
|
||||
General.SetCUELine(_attributes, "REM", "DATE", value, false);
|
||||
else
|
||||
General.DelCUELine(_attributes, "REM", "DATE");
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
public string DiscNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
CUELine line = General.FindCUELine(_attributes, "REM", "DISCNUMBER");
|
||||
return (line == null || line.Params.Count < 3) ? String.Empty : line.Params[2];
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value != "")
|
||||
General.SetCUELine(_attributes, "REM", "DISCNUMBER", value, false);
|
||||
else
|
||||
General.DelCUELine(_attributes, "REM", "DISCNUMBER");
|
||||
}
|
||||
}
|
||||
|
||||
public string TotalDiscs
|
||||
{
|
||||
get
|
||||
{
|
||||
CUELine line = General.FindCUELine(_attributes, "REM", "TOTALDISCS");
|
||||
return (line == null || line.Params.Count < 3) ? String.Empty : line.Params[2];
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value != "")
|
||||
General.SetCUELine(_attributes, "REM", "TOTALDISCS", value, false);
|
||||
else
|
||||
General.DelCUELine(_attributes, "REM", "TOTALDISCS");
|
||||
}
|
||||
}
|
||||
|
||||
public string Genre
|
||||
{
|
||||
get
|
||||
{
|
||||
CUELine line = General.FindCUELine(_attributes, "REM", "GENRE");
|
||||
return (line == null || line.Params.Count < 3) ? String.Empty : line.Params[2];
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value != "")
|
||||
General.SetCUELine(_attributes, "REM", "GENRE", value, true);
|
||||
else
|
||||
General.DelCUELine(_attributes, "REM", "GENRE");
|
||||
}
|
||||
}
|
||||
|
||||
public string Catalog
|
||||
{
|
||||
get
|
||||
{
|
||||
CUELine line = General.FindCUELine(_attributes, "CATALOG");
|
||||
return (line == null || line.Params.Count < 2) ? String.Empty : line.Params[1];
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value != "")
|
||||
General.SetCUELine(_attributes, "CATALOG", value, false);
|
||||
else
|
||||
General.DelCUELine(_attributes, "CATALOG");
|
||||
}
|
||||
}
|
||||
|
||||
public string Title {
|
||||
get {
|
||||
CUELine line = General.FindCUELine(_attributes, "TITLE");
|
||||
return (line == null || line.Params.Count < 2) ? String.Empty : line.Params[1];
|
||||
}
|
||||
set {
|
||||
General.SetCUELine(_attributes, "TITLE", value, true);
|
||||
}
|
||||
}
|
||||
|
||||
public int WriteOffset {
|
||||
get {
|
||||
return _writeOffset;
|
||||
@@ -6338,38 +6263,9 @@ string status = processor.Go();
|
||||
return Go();
|
||||
case "only if found":
|
||||
return ArVerify.ExceptionStatus != WebExceptionStatus.Success ? WriteReport() : Go();
|
||||
case "submit":
|
||||
{
|
||||
if (!_useCUEToolsDB)
|
||||
return "CUETools DB not enabled";
|
||||
if (ArVerify.ARStatus != null)
|
||||
return "AccurateRip: " + ArVerify.ARStatus + ", will not submit";
|
||||
if (ArVerify.WorstTotal() < 2)
|
||||
return "AccurateRip: confidence too low, will not submit";
|
||||
//if (CTDB.AccResult == HttpStatusCode.OK)
|
||||
//return "CUEToolsDB: disc already present in database";
|
||||
if (CTDB.QueryExceptionStatus != WebExceptionStatus.Success &&
|
||||
(CTDB.QueryExceptionStatus != WebExceptionStatus.ProtocolError || CTDB.QueryResponseStatus != HttpStatusCode.NotFound))
|
||||
return "CUEToolsDB: " + CTDB.DBStatus;
|
||||
if (_accurateRipId != null && AccurateRipVerify.CalculateAccurateRipId(_toc) != _accurateRipId)
|
||||
return string.Format("CUEToolsDB: Using preserved id {0}, actual id is {1}", _accurateRipId, AccurateRipVerify.CalculateAccurateRipId(_toc));
|
||||
_useCUEToolsDBSibmit = true;
|
||||
string status = Go();
|
||||
if (CTDB.QueryExceptionStatus == WebExceptionStatus.Success)
|
||||
foreach (DBEntry entry in CTDB.Entries)
|
||||
if (entry.toc.TrackOffsets == _toc.TrackOffsets && !entry.hasErrors)
|
||||
return "CUEToolsDB: " + CTDB.Status;
|
||||
if (ArVerify.WorstConfidence() < 1)
|
||||
{
|
||||
CTDB.SubStatus = "will not submit";
|
||||
return GenerateAccurateRipStatus();
|
||||
}
|
||||
CTDB.Submit((int)ArVerify.WorstConfidence(), 100, Artist, Title);
|
||||
return GenerateAccurateRipStatus();
|
||||
}
|
||||
case "repair":
|
||||
{
|
||||
UseCUEToolsDB(false, "CUETools " + CUEToolsVersion, null, false, true);
|
||||
UseCUEToolsDB("CUETools " + CUEToolsVersion, null, false, true);
|
||||
Action = CUEAction.Verify;
|
||||
if (CTDB.DBStatus != null)
|
||||
return CTDB.DBStatus;
|
||||
@@ -6692,28 +6588,6 @@ string status = processor.Go();
|
||||
return _attributes;
|
||||
}
|
||||
}
|
||||
|
||||
public string Artist {
|
||||
get {
|
||||
CUELine line = General.FindCUELine(_attributes, "PERFORMER");
|
||||
return (line == null || line.Params.Count < 2) ? String.Empty : line.Params[1];
|
||||
}
|
||||
set
|
||||
{
|
||||
General.SetCUELine(_attributes, "PERFORMER", value, true);
|
||||
}
|
||||
}
|
||||
|
||||
public string Title {
|
||||
get {
|
||||
CUELine line = General.FindCUELine(_attributes, "TITLE");
|
||||
return (line == null || line.Params.Count < 2) ? String.Empty : line.Params[1];
|
||||
}
|
||||
set
|
||||
{
|
||||
General.SetCUELine(_attributes, "TITLE", value, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct IndexInfo {
|
||||
|
||||
@@ -217,8 +217,8 @@ namespace CUETools.ConsoleRipper
|
||||
cueWriter.WriteLine("REM COMMENT \"{0}\"", audioSource.RipperVersion);
|
||||
if (release != null && release.GetEvents().Count > 0)
|
||||
cueWriter.WriteLine("REM DATE {0}", release.GetEvents()[0].Date.Substring(0, 4));
|
||||
if (audioSource.TOC.Catalog != null)
|
||||
cueWriter.WriteLine("CATALOG {0}", audioSource.TOC.Catalog);
|
||||
if (audioSource.TOC.Barcode != null)
|
||||
cueWriter.WriteLine("CATALOG {0}", audioSource.TOC.Barcode);
|
||||
if (release != null)
|
||||
{
|
||||
cueWriter.WriteLine("PERFORMER \"{0}\"", release.GetArtist());
|
||||
|
||||
@@ -591,7 +591,7 @@ namespace CUETools.Ripper.SCSI
|
||||
{
|
||||
string catalog = Encoding.ASCII.GetString(_subchannelBuffer, 9, 13);
|
||||
if (catalog.ToString() != "0000000000000")
|
||||
_toc2.Catalog = catalog.ToString();
|
||||
_toc2.Barcode = catalog.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -686,13 +686,13 @@ namespace CUETools.Ripper.SCSI
|
||||
if (!isrc.ToString().Contains("#") && isrc.ToString() != "000000000000")
|
||||
_toc2[iTrack].ISRC = isrc.ToString();
|
||||
}
|
||||
if (adr == 2 && _toc2.Catalog == null)
|
||||
if (adr == 2 && _toc2.Barcode == null)
|
||||
{
|
||||
StringBuilder catalog = new StringBuilder();
|
||||
StringBuilder barcode = new StringBuilder();
|
||||
for (int i = 1; i < 8; i++)
|
||||
catalog.AppendFormat("{0:x2}", _subchannelBuffer[offs + i]);
|
||||
if (catalog.ToString() != "0000000000000")
|
||||
_toc2.Catalog = catalog.ToString(0, 13);
|
||||
barcode.AppendFormat("{0:x2}", _subchannelBuffer[offs + i]);
|
||||
if (barcode.ToString() != "0000000000000")
|
||||
_toc2.Barcode = barcode.ToString(0, 13);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ using System.Diagnostics;
|
||||
using CUETools.Processor;
|
||||
using CUETools.CDImage;
|
||||
using CUETools.Compression;
|
||||
using CUETools.AccurateRip;
|
||||
|
||||
namespace JDP {
|
||||
public partial class frmCUETools : Form {
|
||||
@@ -432,7 +433,8 @@ namespace JDP {
|
||||
Image motdImage = null;
|
||||
string profilePath;
|
||||
string [] OutputPathUseTemplates = {
|
||||
"%music%\\Converted\\%artist%\\[%year% - ]%album%[ - %edition%]$ifgreater($max(%discnumber%,%totaldiscs%),1, - cd %discnumber%,)[' ('%unique%')']\\%artist% - %album%[ - %edition%].cue",
|
||||
"%music%\\Converted\\%artist%\\[%year% - ]%album%[ '('disc %discnumberandname%')'][' ('%releasedateandlabel%')'][' ('%unique%')']\\%artist% - %album%.cue",
|
||||
"%music%\\Converted\\%artist%\\[%year% - ]%album%[' ('%releasedateandlabel%')'][' ('%unique%')']\\%artist% - %album%[ '('disc %discnumberandname%')'].cue",
|
||||
"[%directoryname%\\]%filename%-new[%unique%].cue",
|
||||
"[%directoryname%\\]new[%unique%]\\%filename%.cue"
|
||||
};
|
||||
@@ -873,7 +875,7 @@ namespace JDP {
|
||||
if (useLocalDB)
|
||||
cueSheet.UseLocalDB(_localDB);
|
||||
if (useCUEToolsDB)
|
||||
cueSheet.UseCUEToolsDB(false, "CUETools " + CUESheet.CUEToolsVersion, null, false, true);
|
||||
cueSheet.UseCUEToolsDB("CUETools " + CUESheet.CUEToolsVersion, null, false, true);
|
||||
if (useAR)
|
||||
cueSheet.UseAccurateRip();
|
||||
|
||||
@@ -973,38 +975,29 @@ namespace JDP {
|
||||
if (outputExists.Count == 0)
|
||||
{
|
||||
cueSheet.UsePregapForFirstTrackInSingleFile = _usePregapForFirstTrackInSingleFile && !outputAudio;
|
||||
if (script == null)
|
||||
if (script == null || (script.builtin && script.name == "default"))
|
||||
{
|
||||
status = cueSheet.Go();
|
||||
if (cueSheet.Config.advanced.CTDBSubmit
|
||||
&& useAR
|
||||
&& useCUEToolsDB
|
||||
&& cueSheet.ArVerify.ARStatus == null
|
||||
&& cueSheet.ArVerify.WorstConfidence() >= 2
|
||||
&& (cueSheet.AccurateRipId == null || AccurateRipVerify.CalculateAccurateRipId(cueSheet.TOC) == cueSheet.AccurateRipId)
|
||||
&& cueSheet.CTDB.MatchingEntry == null
|
||||
&& (cueSheet.CTDB.QueryExceptionStatus == WebExceptionStatus.Success
|
||||
|| (cueSheet.CTDB.QueryExceptionStatus == WebExceptionStatus.ProtocolError && cueSheet.CTDB.QueryResponseStatus == HttpStatusCode.NotFound)
|
||||
)
|
||||
)
|
||||
{
|
||||
cueSheet.CTDB.Submit((int)cueSheet.ArVerify.WorstConfidence(), 100, cueSheet.Metadata.Artist, cueSheet.Metadata.Title, cueSheet.Metadata.Barcode);
|
||||
if (cueSheet.CTDB.SubStatus != null)
|
||||
status += ", submit: " + cueSheet.CTDB.SubStatus;
|
||||
}
|
||||
}
|
||||
else
|
||||
status = cueSheet.ExecuteScript(script);
|
||||
|
||||
//if (useCUEToolsDB)
|
||||
//{
|
||||
// if (cueSheet.CTDB.AccResult == HttpStatusCode.NotFound &&
|
||||
// cueSheet.ArVerify.ARStatus == null &&
|
||||
// cueSheet.ArVerify.WorstConfidence() > 2
|
||||
// )
|
||||
// {
|
||||
// this.Invoke((MethodInvoker)delegate()
|
||||
// {
|
||||
// dlgRes = MessageBox.Show(this, "Disc is not present in CUETools Database, " +
|
||||
// "do you want to submit it?", "Overwrite?", (_batchPaths.Count == 0) ?
|
||||
// MessageBoxButtons.YesNo : MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
|
||||
// if (dlgRes == DialogResult.Cancel)
|
||||
// SetupControls(false);
|
||||
// });
|
||||
// if (dlgRes == DialogResult.Cancel)
|
||||
// {
|
||||
// cueSheet.Close();
|
||||
// return;
|
||||
// }
|
||||
// if (dlgRes == DialogResult.Yes)
|
||||
// {
|
||||
// cueSheet.CTDB.Submit((int)cueSheet.ArVerify.WorstConfidence(), (int)cueSheet.ArVerify.WorstTotal());
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
if (_batchPaths.Count > 0)
|
||||
{
|
||||
_batchProcessed++;
|
||||
|
||||
@@ -207,8 +207,9 @@ namespace JDP
|
||||
listMetadata.Items.Add(new ListViewItem(new string[] { r.metadata.TotalDiscs, "Total Discs" }));
|
||||
listMetadata.Items.Add(new ListViewItem(new string[] { r.metadata.DiscName, "Disc Name" }));
|
||||
listMetadata.Items.Add(new ListViewItem(new string[] { r.metadata.Barcode, "Barcode" }));
|
||||
listMetadata.Items.Add(new ListViewItem(new string[] { r.metadata.ReleaseDate, "ReleaseDate" }));
|
||||
listMetadata.Items.Add(new ListViewItem(new string[] { r.metadata.ReleaseDate, "Release Date" }));
|
||||
listMetadata.Items.Add(new ListViewItem(new string[] { r.metadata.Label, "Label" }));
|
||||
listMetadata.Items.Add(new ListViewItem(new string[] { r.metadata.Country, "Country" }));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -293,6 +294,7 @@ namespace JDP
|
||||
case 7: r.metadata.Barcode = e.Label; break;
|
||||
case 8: r.metadata.ReleaseDate = e.Label; break;
|
||||
case 9: r.metadata.Label = e.Label; break;
|
||||
case 10: r.metadata.Country = e.Label; break;
|
||||
}
|
||||
item.Text = r.ToString();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user