Esempio n. 1
0
 public MetaDataEventArgs(MetaData data)
 {
     this.MetaData = data;
 }
        private string GetStatusTextLong(MetaData metaData)
        {
            if (metaData == null)
                return "No metadata lookup";

            switch (metaData.Status) {
                case MetaDataStatus.Rejected:
                    return "The metadata lookup succeeded but its results were rejected";
                case MetaDataStatus.Accepted:
                    return "The metadata lookup succeeded and its results were accepted";
                case MetaDataStatus.Waiting:
                    return "The metadata lookup is waiting to execute.";
                case MetaDataStatus.Failed:
                    return "The metadata lookup failed";
                case MetaDataStatus.Success:
                    return "The metadata lookup succeeded";
                case MetaDataStatus.Failed_ConverterFailed:
                    return "Failed. The audio decoder for this file failed to convert it to WAV format.";
                case MetaDataStatus.Failed_Lookup:
                    return "Failed. This song was not found in the online database.";
                case MetaDataStatus.Failed_MissingFile:
                    return "Failed. The media file for this song was missing or inaccessible.";
                case MetaDataStatus.Failed_NoData:
                    return "Failed. The online database contains this song, but no title or artist has been registered for it.";
                case MetaDataStatus.Failed_UnknownFileType:
                    return "Failed. The media file for this song has no decoder registered for it.";
                case MetaDataStatus.InProgress_Converting:
                    return "In progress. A copy of the media file is being converted to WAV format...";
                case MetaDataStatus.InProgress_Fetching:
                    return "In progress. Information about the song is being fetched from the online database...";
                case MetaDataStatus.InProgress_Fingerprinting:
                    return "In progress. An audio fingerprint is being calculated for this song...";
                default:
                    return metaData.Status.ToString();
            }
        }
 private void SetSongMetaData(MetaData metaData)
 {
     this.mapMetaData[metaData.Song] = metaData;
 }
        private string GetStatusText(MetaData metaData)
        {
            if (metaData == null)
                return String.Empty;

            switch (metaData.Status) {
                case MetaDataStatus.Success:
                    if (metaData.IsDataUnchanged)
                        return "Success - Data unchanged";
                    else
                        return "Success";
                case MetaDataStatus.Failed_ConverterFailed:
                    return "Converter failed";
                case MetaDataStatus.Failed_Lookup:
                    return "Lookup failed";
                case MetaDataStatus.Failed_MissingFile:
                    return "Failed - File missing";
                case MetaDataStatus.Failed_NoData:
                    return "No data available";
                case MetaDataStatus.Failed_UnknownFileType:
                    return "Unknown file type";
                case MetaDataStatus.InProgress_Converting:
                    return "Conversion in progress";
                case MetaDataStatus.InProgress_Fetching:
                    return "Fetch in progress";
                case MetaDataStatus.InProgress_Fingerprinting:
                    return "Fingerprinting in progress";
                default:
                    return metaData.Status.ToString();
            }
        }