Пример #1
0
        public CTDBResponseMeta(CTDBResponseMeta src)
        {
            this.source     = src.source;
            this.id         = src.id;
            this.artist     = src.artist;
            this.album      = src.album;
            this.year       = src.year;
            this.genre      = src.genre;
            this.extra      = src.extra;
            this.discnumber = src.discnumber;
            this.disccount  = src.disccount;
            this.discname   = src.discname;
            this.infourl    = src.infourl;
            this.barcode    = src.barcode;
            if (src.coverart != null)
            {
                this.coverart = new CTDBResponseMetaImage[src.coverart.Length];
                for (int i = 0; i < src.coverart.Length; i++)
                {
                    this.coverart[i] = new CTDBResponseMetaImage(src.coverart[i]);
                }
            }

            if (src.track != null)
            {
                this.track = new CTDBResponseMetaTrack[src.track.Length];
                for (int i = 0; i < src.track.Length; i++)
                {
                    this.track[i] = new CTDBResponseMetaTrack(src.track[i]);
                }
            }

            if (src.label != null)
            {
                this.label = new CTDBResponseMetaLabel[src.label.Length];
                for (int i = 0; i < src.label.Length; i++)
                {
                    this.label[i] = new CTDBResponseMetaLabel(src.label[i]);
                }
            }

            if (src.release != null)
            {
                this.release = new CTDBResponseMetaRelease[src.release.Length];
                for (int i = 0; i < src.release.Length; i++)
                {
                    this.release[i] = new CTDBResponseMetaRelease(src.release[i]);
                }
            }
        }
Пример #2
0
        public CTDBResponseMeta(CTDBResponseMeta src)
        {
            this.source = src.source;
            this.id = src.id;
            this.artist = src.artist;
            this.album = src.album;
            this.year = src.year;
            this.genre = src.genre;
            this.extra = src.extra;
            this.country = src.country;
            this.releasedate = src.releasedate;
            this.discnumber = src.discnumber;
            this.disccount = src.disccount;
            this.discname = src.discname;
            this.infourl = src.infourl;
            this.barcode = src.barcode;
            if (src.coverart != null)
            {
                this.coverart = new CTDBResponseMetaImage[src.coverart.Length];
                for (int i = 0; i < src.coverart.Length; i++)
                    this.coverart[i] = new CTDBResponseMetaImage(src.coverart[i]);
            }

            if (src.track != null)
            {
                this.track = new CTDBResponseMetaTrack[src.track.Length];
                for (int i = 0; i < src.track.Length; i++)
                    this.track[i] = new CTDBResponseMetaTrack(src.track[i]);
            }

            if (src.label != null)
            {
                this.label = new CTDBResponseMetaLabel[src.label.Length];
                for (int i = 0; i < src.label.Length; i++)
                    this.label[i] = new CTDBResponseMetaLabel(src.label[i]);
            }
        }
Пример #3
0
 public int GetFreeDBMusicType(CTDBResponseMeta meta)
 {
     int pos = meta.id.IndexOf('/');
     if (meta.source != "freedb" || pos < 0)
         return -1;
     string freedbtype = meta.id.Substring(0, pos);
     switch (freedbtype.ToUpper())
     {
         case "BLUES":
             return 0;
         case "CLASSICAL":
             return 1;
         case "COUNTRY":
             return 2;
         case "DATA":
             return 3;
         case "FOLK":
             return 4;
         case "JAZZ":
             return 5;
         case "NEWAGE":
             return 6;
         case "REGGAE":
             return 7;
         case "ROCK":
             return 8;
         case "SOUNDTRACK":
             return 9;
         case "MISC":
             return 10;
         default:
             return -1;
     }
 }
Пример #4
0
		private CUEMetadataEntry CreateCUESheet(ICDRipper audioSource, CTDBResponseMeta release)
		{
			CUEMetadataEntry entry = new CUEMetadataEntry(audioSource.TOC, release.source);
			entry.metadata.FillFromCtdb(release, entry.TOC.FirstAudio - 1);
			return entry;
		}