Results 1 to 2 of 2

Thread: Mp3 tags

  1. #1

    Thread Starter
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Mp3 tags

    I've been looking around @ the forums and Ive tried some of the codes that were suggested...but still I cant properly retrieve an MP3 files artist, title, album and so on..

    Now what I have is a list with pathways to MP3 files, I would like to go through these and add them in an INI file like this:

    [Main]
    The Beatles - Here comes the sun=C:\music\the beatles\here_comes_the_sun.mp3

    I thought this code would work, but for some reason i cant have BOTH the sArtist and the sTitle written into the CompString, because when I do, only the artists name is written, not the title. What is wrong?
    VB Code:
    1. iniName = App.Path & "\Temp.ini"
    2.     Dim fNum As Integer
    3.     Dim sTagIdent As String * 3
    4.     Dim sTitle As String * 30
    5.     Dim sArtist As String * 30
    6.     Dim sAlbum As String * 30
    7.     Dim sYear As String * 4
    8.     Dim sComment As String * 30
    9.     For i = 0 To frmMain.lstfiles.ListCount - 1
    10.     fNum = FreeFile
    11.  
    12.     Open frmMain.lstfiles.List(i) For Binary As fNum
    13.     Seek #fNum, LOF(fNum) - 127
    14.     Get #fNum, , sTagIdent
    15.     If sTagIdent = "TAG" Then
    16.     Get #fNum, , sTitle
    17.     Get #fNum, , sArtist
    18.     Get #fNum, , sAlbum
    19.     Get #fNum, , sYear
    20.     Get #fNum, , sComment
    21.     End If
    22.     Close #fNum
    23.         CompString = sArtist & " - " & sTitle
    24.         Write_To_INI "Main", CompString, frmMain.lstfiles.List(i), iniName
    25.         frmMain.PlayList.AddItem CompString
    26.     Next i

    Sorry for my lousy english, please ask if theres something Ive explained bad.

    Please help
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  2. #2
    Fanatic Member
    Join Date
    Aug 2005
    Location
    South Africa
    Posts
    760

    Re: Mp3 tags

    I've seen plenty of programs like this on Planet Source Code. Head over there and do a search and you will find the answer bro. http://www.pscode.com
    If I helped you out, please consider adding to my reputation!

    -- "The faulty interface lies between the chair and the keyboard" --

    VB6 Programs By Me:
    ** Dictionary, Thesaurus & Rhyme-Generator In One ** WMP Recent Files List Editor ** Pretty Impressive Clock ** Extract Firefox History **

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width