Esempio n. 1
0
        /// <summary>
        ///  fill from tag
        /// </summary>
        /// <param name="idx"></param>
        public override void Fill()
        {
            TagV2Ext     tag       = new TagV2Ext(v2);
            UnknownFrame unk_frame = tag.GetUnknownFrame("IPLS");

            if (unk_frame != null)
            {
                InvolvedPeopleFrame frame = new InvolvedPeopleFrame(unk_frame);

                string[] people    = frame.Person;
                string[] functions = frame.Function;

                int len = people.Length;
                for (int i = 0; i < len; ++i)
                {
                    ListViewItem item = new ListViewItem(people[i]);
                    item.SubItems.Add(functions[i]);
                    personList.Items.Add(item);
                }

                if (personList.Items.Count > 0)
                {
                    ListViewItem item = personList.Items[0];
                    txtName.Text     = item.Text;
                    txtFunction.Text = item.SubItems[1].Text;
                }
            }
        }
Esempio n. 2
0
 /// <summary>
 ///  fill from tag
 /// </summary>
 /// <param name="idx"></param>
 public override void Fill()
 {
     if (v2 != null)
     {
         if (multi_edit)
         {
             Coalesce();
         }
         TagV2Ext tag = new TagV2Ext(v2);
         txtBand.Text      = tag.TPE2;
         txtRemixed.Text   = tag.TPE4;
         txtWriter.Text    = tag.TEXT;
         txtPublisher.Text = tag.TPUB;
         txtEncoded.Text   = tag.TENC;
         txtSubTitle.Text  = tag.TIT3;
         cmbMediaType.Text = tag.TMED;
         if (!multi_edit)
         {
             txtTrackLength.Text = tag.TLEN;
         }
         txtCopyright.Text    = v2.Copyright;
         txtContentGroup.Text = v2.Grouping;
         txtConductor.Text    = v2.Conductor;
         txtComposer.Text     = v2.FirstComposer;
     }
 }
Esempio n. 3
0
        ///  ID3v1 edit
        /// </summary>
        /// <param name="item">the item</param>
        public override void EditItem(TagListViewItem item)
        {
            // call base first
            base.EditItem(item);


            if (item.Id3v2 != null)
            {
                TagV2Ext tag = new TagV2Ext(item.Id3v2);
                if (!multi_edit || ckOrginalAlbum.Checked)
                {
                    tag.TOAL = txtOrginalAlbum.Text;
                }
                if (!multi_edit || ckOrginalFileName.Checked)
                {
                    tag.TOFN = txtOrginalFileName.Text;
                }
                if (!multi_edit || ckOrginalLyricsWriter.Checked)
                {
                    tag.TOLY = txtOrginalLyricsWriter.Text;
                }
                if (!multi_edit || ckOriginalArtist.Checked)
                {
                    tag.TOPE = txtOriginalArtist.Text;
                }
                if (!multi_edit || ckOriginalReleaseDate.Checked)
                {
                    tag.TORY = txtOriginalReleaseDate.Text;
                }
                if (!multi_edit || ckOriginalOwner.Checked)
                {
                    tag.TOWN = txtOriginalOwner.Text;
                }
            }
        }
Esempio n. 4
0
 ///  ID3v1 edit
 /// </summary>
 /// <param name="item">the item</param>
 public override void EditItem(TagListViewItem item)
 {
     // call base first
     base.EditItem(item);
     if (item.Id3v2 != null)
     {
         TagV2Ext tag = new TagV2Ext(item.Id3v2);
     }
 }
Esempio n. 5
0
        /// <summary>
        /// merge like values, hide unlike values
        /// </summary>
        public override void Coalesce()
        {
            base.Coalesce();

            FileInfo fi = (FileInfo)lv.SelectedItems[0].Tag;

            TagLib.File      first_tag_file = TagLib.File.Create(fi.FullName);
            TagLib.Id3v2.Tag first_tag      = tag_file.GetTag(TagLib.TagTypes.Id3v2) as TagLib.Id3v2.Tag;
            TagV2Ext         first_tag_ext  = new TagV2Ext(first_tag);

            foreach (ListViewItem item in lv.SelectedItems)
            {
                fi             = (FileInfo)item.Tag;
                first_tag_file = TagLib.File.Create(fi.FullName);
                TagLib.Tag tag     = tag_file.GetTag(TagLib.TagTypes.Id3v1);
                TagV2Ext   tag_ext = new TagV2Ext(first_tag);

                if (tag != null)
                {
                    if (first_tag_ext.TPE2 != tag_ext.TPE2)
                    {
                        first_tag_ext.TPE2 = string.Empty;
                    }
                    if (first_tag_ext.TPE4 != tag_ext.TPE4)
                    {
                        first_tag_ext.TPE4 = string.Empty;
                    }
                    if (first_tag_ext.TEXT != tag_ext.TEXT)
                    {
                        first_tag_ext.TEXT = string.Empty;
                    }
                    if (first_tag_ext.TPUB != tag_ext.TPUB)
                    {
                        first_tag_ext.TPUB = string.Empty;
                    }
                    if (first_tag_ext.TENC != tag_ext.TENC)
                    {
                        first_tag_ext.TENC = string.Empty;
                    }
                    if (first_tag_ext.TIT3 != tag_ext.TIT3)
                    {
                        first_tag_ext.TIT3 = string.Empty;
                    }
                    if (first_tag_ext.TMED != tag_ext.TMED)
                    {
                        first_tag_ext.TMED = string.Empty;
                    }
                    if (first_tag_ext.TLEN != tag_ext.TLEN)
                    {
                        first_tag_ext.TLEN = string.Empty;
                    }
                }
            }
            v2 = first_tag;
        }
Esempio n. 6
0
        /// <summary>
        ///  fill from tag
        /// </summary>
        /// <param name="idx"></param>
        public override void Fill()
        {
            TagV2Ext tag = new TagV2Ext(v2);

            txtOrginalAlbum.Text        = tag.TOAL;
            txtOrginalFileName.Text     = tag.TOFN;
            txtOrginalLyricsWriter.Text = tag.TOLY;
            txtOriginalArtist.Text      = tag.TOPE;
            txtOriginalReleaseDate.Text = tag.TORY;
            //txtOriginalReleaseDate.Text = tag.TDOR;
            txtOriginalOwner.Text = tag.TOWN;
        }
Esempio n. 7
0
        /// <summary>
        /// merge like values, hide unlike values
        /// </summary>
        public override void Coalesce()
        {
            FileInfo fi = (FileInfo)lv.SelectedItems[0].Tag;

            TagLib.File      first_tag_file = TagLib.File.Create(fi.FullName);
            TagLib.Id3v2.Tag first_tag      = tag_file.GetTag(TagLib.TagTypes.Id3v2) as TagLib.Id3v2.Tag;
            TagV2Ext         first_tag_ext  = new TagV2Ext(first_tag);

            foreach (ListViewItem item in lv.SelectedItems)
            {
                fi             = (FileInfo)item.Tag;
                first_tag_file = TagLib.File.Create(fi.FullName);
                TagLib.Tag tag     = tag_file.GetTag(TagLib.TagTypes.Id3v1);
                TagV2Ext   tag_ext = new TagV2Ext(first_tag);
                if (tag != null)
                {
                    if (first_tag_ext.WCOP != tag_ext.WCOP)
                    {
                        first_tag_ext.WCOP = string.Empty;
                    }
                    if (first_tag_ext.WOAF != tag_ext.WOAF)
                    {
                        first_tag_ext.WOAF = string.Empty;
                    }
                    if (first_tag_ext.WOAR != tag_ext.WOAR)
                    {
                        first_tag_ext.WOAR = string.Empty;
                    }
                    if (first_tag_ext.WOAS != tag_ext.WOAS)
                    {
                        first_tag_ext.WOAS = string.Empty;
                    }
                    if (first_tag_ext.WORS != tag_ext.WORS)
                    {
                        first_tag_ext.WORS = string.Empty;
                    }
                    if (first_tag_ext.WPAY != tag_ext.WPAY)
                    {
                        first_tag_ext.WPAY = string.Empty;
                    }
                    if (first_tag_ext.WPUB != tag_ext.WPUB)
                    {
                        first_tag_ext.WPUB = string.Empty;
                    }
                    if (first_tag_ext.WCOM != tag_ext.WCOM)
                    {
                        first_tag_ext.WCOM = string.Empty;
                    }
                }
            }
            v2 = first_tag;
        }
Esempio n. 8
0
        /// <summary>
        ///  fill from tag
        /// </summary>
        /// <param name="idx"></param>
        public override void Fill()
        {
            TagV2Ext tag = new TagV2Ext(v2);

            txtCopyrightURL.Text    = tag.WCOP;
            txtFileURL.Text         = tag.WOAF;
            txtArtistURL.Text       = tag.WOAR;
            txtAudioSourceURL.Text  = tag.WOAS;
            txtRadioStationURL.Text = tag.WORS;
            txtPaymentURL.Text      = tag.WPAY;
            txtPublisherURL.Text    = tag.WPUB;
            txtCommercialURL.Text   = tag.WCOM;
        }
Esempio n. 9
0
        /// <summary>
        /// merge like values, hide unlike values
        /// </summary>
        public override void Coalesce()
        {
            FileInfo fi = (FileInfo)lv.SelectedItems[0].Tag;

            TagLib.File      first_tag_file = TagLib.File.Create(fi.FullName);
            TagLib.Id3v2.Tag first_tag      = tag_file.GetTag(TagLib.TagTypes.Id3v2) as TagLib.Id3v2.Tag;
            TagV2Ext         first_tag_ext  = new TagV2Ext(first_tag);

            foreach (ListViewItem item in lv.SelectedItems)
            {
                fi             = (FileInfo)item.Tag;
                first_tag_file = TagLib.File.Create(fi.FullName);
                TagLib.Tag tag     = tag_file.GetTag(TagLib.TagTypes.Id3v1);
                TagV2Ext   tag_ext = new TagV2Ext(first_tag);

                if (tag != null)
                {
                    if (first_tag_ext.TOAL != tag_ext.TOAL)
                    {
                        first_tag_ext.TOAL = string.Empty;
                    }
                    if (first_tag_ext.TOFN != tag_ext.TOFN)
                    {
                        first_tag_ext.TOFN = string.Empty;
                    }
                    if (first_tag_ext.TOLY != tag_ext.TOLY)
                    {
                        first_tag_ext.TOLY = string.Empty;
                    }
                    if (first_tag_ext.TOPE != tag_ext.TOPE)
                    {
                        first_tag_ext.TOPE = string.Empty;
                    }
                    if (first_tag_ext.TORY != tag_ext.TORY)
                    {
                        first_tag_ext.TORY = string.Empty;
                    }
                    if (first_tag_ext.TOWN != tag_ext.TOWN)
                    {
                        first_tag_ext.TOWN = string.Empty;
                    }
                }
            }
            v2 = first_tag;
        }
Esempio n. 10
0
        /// <summary>
        /// merge like values, hide unlike values
        /// </summary>
        public override void Coalesce()
        {
            FileInfo fi = (FileInfo)lv.SelectedItems[0].Tag;

            TagLib.File      first_tag_file = TagLib.File.Create(fi.FullName);
            TagLib.Id3v2.Tag first_tag      = tag_file.GetTag(TagLib.TagTypes.Id3v2) as TagLib.Id3v2.Tag;
            TagV2Ext         first_tag_ext  = new TagV2Ext(first_tag);

            foreach (ListViewItem item in lv.SelectedItems)
            {
                fi             = (FileInfo)item.Tag;
                first_tag_file = TagLib.File.Create(fi.FullName);
                TagLib.Tag tag     = tag_file.GetTag(TagLib.TagTypes.Id3v1);
                TagV2Ext   tag_ext = new TagV2Ext(first_tag);
                if (tag != null)
                {
                }
            }
            v2 = first_tag;
        }
Esempio n. 11
0
 ///  ID3v1 edit
 /// </summary>
 /// <param name="item">the item</param>
 public override void EditItem(TagListViewItem item)
 {
     // call base first
     base.EditItem(item);
     if (item.Id3v2 != null)
     {
         TagV2Ext tag = new TagV2Ext(item.Id3v2);
         if (!multi_edit || ckCopyrightURL.Checked)
         {
             tag.WCOP = txtCopyrightURL.Text;
         }
         if (!multi_edit || ckFileURL.Checked)
         {
             tag.WOAF = txtFileURL.Text;
         }
         if (!multi_edit || ckArtistURL.Checked)
         {
             tag.WOAR = txtArtistURL.Text;
         }
         if (!multi_edit || ckAudioSourceURL.Checked)
         {
             tag.WOAS = txtAudioSourceURL.Text;
         }
         if (!multi_edit || ckRadioStationURL.Checked)
         {
             tag.WORS = txtRadioStationURL.Text;
         }
         if (!multi_edit || ckPaymentURL.Checked)
         {
             tag.WPAY = txtPaymentURL.Text;
         }
         if (!multi_edit || ckPublisherURL.Checked)
         {
             tag.WPUB = txtPublisherURL.Text;
         }
         if (!multi_edit || ckCommercialURL.Checked)
         {
             tag.WCOM = txtCommercialURL.Text;
         }
     }
 }
Esempio n. 12
0
        /// <summary>
        ///  ID3v1 edit
        /// </summary>
        /// <param name="item">the item</param>
        public override void EditItem(TagListViewItem item)
        {
            // call base first
            base.EditItem(item);

            if (v2 != null)
            {
                TagV2Ext tag = new TagV2Ext(item.Id3v2);
                tag.TPE2             = txtBand.Text;
                tag.TPE4             = txtRemixed.Text;
                tag.TEXT             = txtWriter.Text;
                tag.TPUB             = txtPublisher.Text;
                tag.TENC             = txtEncoded.Text;
                tag.TIT3             = txtSubTitle.Text;
                tag.TMED             = cmbMediaType.Text;
                tag.TLEN             = txtTrackLength.Text;
                item.Id3v2.Copyright = txtCopyright.Text;
                item.Id3v2.Grouping  = txtContentGroup.Text;
                item.Id3v2.Conductor = txtConductor.Text;
                item.Id3v2.Composers = Functions.GetArray(this.txtComposer.Text);;
            }
        }