{"id":261,"date":"2013-05-30T18:37:38","date_gmt":"2013-05-30T18:37:38","guid":{"rendered":"http:\/\/www.mahmuttalhakoz.com\/blog\/?p=261"},"modified":"2013-05-31T08:43:35","modified_gmt":"2013-05-31T08:43:35","slug":"mp3-tag-islemleri","status":"publish","type":"post","link":"https:\/\/www.mahmuttalhakoz.com\/blog\/index.php\/2013\/05\/30\/mp3-tag-islemleri\/","title":{"rendered":"Mp3 Tag Islemleri"},"content":{"rendered":"<p><a href=\"https:\/\/www.mahmuttalhakoz.com\/blog\/wp-content\/uploads\/2013\/05\/mp3_functions.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.mahmuttalhakoz.com\/blog\/wp-content\/uploads\/2013\/05\/mp3_functions.png\" alt=\"Mp3 Tag Islemleri\" width=\"278\" height=\"275\" class=\"aligncenter size-full wp-image-264\" \/><\/a><\/p>\n<p>Mp3 dosyasinin taglarini okumak icin oncelikle TagLib.DLL dosyasini indirmeniz gerekiyor. Referanslara ekledikten sonra asagidaki sekilde taglara ulasabilirsiniz;<br \/>\n<code><br \/>\n        private void button1_Click(object sender, EventArgs e)<br \/>\n        {<br \/>\n            foreach (Control c in this.Controls)<br \/>\n            {<br \/>\n                if (c is Label)<br \/>\n                {<br \/>\n                    c.Text = string.Empty;<br \/>\n                }<br \/>\n            }<br \/>\n            DialogResult result = openFileDialog1.ShowDialog();<br \/>\n            if (result == DialogResult.OK)<br \/>\n            {<br \/>\n                try<br \/>\n                {<br \/>\n                    string yol = openFileDialog1.FileName;<br \/>\n                    TagLib.File mp3 = TagLib.File.Create(yol);<\/p>\n<p>                    lblDosya.Text = \"Dosya Adi : \" + openFileDialog1.SafeFileName;<br \/>\n                    lblSanatci.Text = \"Sanatci Adi : \" + GetAllStringsFromArrary(mp3.Tag.AlbumArtists, \",\");<br \/>\n                    lblAlbum.Text = \"Album Adi : \" + mp3.Tag.Album;<br \/>\n                    lblUzunluk.Text = \"Uzunluk : \" + mp3.Properties.Duration.ToString();<br \/>\n                    lblBaslik.Text = \"Baslik : \" + mp3.Tag.Title;<br \/>\n                    lblTrack.Text = \"Track : \" + mp3.Tag.Track.ToString();<br \/>\n                    lblYil.Text = \"Yil : \"+ mp3.Tag.Year.ToString();<br \/>\n                    lblBesteciler.Text = \"Besteciler : \"+ GetAllStringsFromArrary(mp3.Tag.Composers, \",\");<br \/>\n                    lblTur.Text = \"Tur : \"+ GetAllStringsFromArrary(mp3.Tag.Genres, \",\");<br \/>\n                }<br \/>\n                catch (Exception ex)<br \/>\n                {<br \/>\n                    MessageBox.Show(\"Hata olustu!\");<br \/>\n                    throw;<br \/>\n                }<\/p>\n<p>            }<br \/>\n        }<\/p>\n<p>        public string GetAllStringsFromArrary(string[] strArray, string strDelimeter)<br \/>\n        {<br \/>\n            string strFinal = string.Empty;<\/p>\n<p>            for (int i = 0; i < strArray.Length; i++)\n            {\n                strFinal += strArray[i];\n\n                if (i != strArray.Length - 1)\n                {\n                    strFinal += strDelimeter;\n                }\n            }\n            return strFinal;\n\n\n        }\n<\/code><\/p>\n<p><strong>Ayni sekilde yeni degerler de atayabilirsiniz;<\/strong><\/p>\n<p><code><br \/>\nmp3.Tag.Album = \"AlbumAdi\";<br \/>\nmp3.Tag.Year = 2013;<br \/>\n<\/code><\/p>\n<p>Ayrica diger taglari da TagLib ile bulabilirsiniz;<br \/>\n<code><br \/>\nMessageBox.Show(\"Bit Rate : \" + mp3.Properties.AudioBitrate.ToString());<br \/>\n<\/code><\/p>\n<p>Ornek uygulamayi <a href=\"http:\/\/www.mahmuttalhakoz.com\/other\/Mp3_Functions.rar\" title=\"buradan\" target=\"_blank\">buradan <\/a>indirebilirsiniz, TagLib.Dll dosyasini da ayrica <a href=\"http:\/\/www.mahmuttalhakoz.com\/other\/taglib-sharp.rar\" title=\"buradan\" target=\"_blank\">buradan <\/a>indirebilirsiniz.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Mp3 dosyasinin taglarini okumak icin oncelikle TagLib.DLL dosyasini indirmeniz gerekiyor.<span class=\"more-dots\"><a href=\"https:\/\/www.mahmuttalhakoz.com\/blog\/index.php\/2013\/05\/30\/mp3-tag-islemleri\/\">[ &#8230; ]<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[11,122,124,126,123,120,125,121],"class_list":["post-261","post","type-post","status-publish","format-standard","hentry","category-csharp","tag-c","tag-c-mp3","tag-c-mp3-islemleri","tag-c-mp3-kac-bit","tag-c-mp3-tag-islemleri","tag-mp3-functions","tag-mp3-tag-functions","tag-mp3-tag-islemleri"],"_links":{"self":[{"href":"https:\/\/www.mahmuttalhakoz.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/261","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mahmuttalhakoz.com\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mahmuttalhakoz.com\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mahmuttalhakoz.com\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mahmuttalhakoz.com\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=261"}],"version-history":[{"count":7,"href":"https:\/\/www.mahmuttalhakoz.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/261\/revisions"}],"predecessor-version":[{"id":269,"href":"https:\/\/www.mahmuttalhakoz.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/261\/revisions\/269"}],"wp:attachment":[{"href":"https:\/\/www.mahmuttalhakoz.com\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=261"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mahmuttalhakoz.com\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=261"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mahmuttalhakoz.com\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=261"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}