Results 1 to 7 of 7

Thread: #EXTINF Listings in Winamp Playlist

  1. #1
    Low Bitrate
    Join Date
    Apr 2000
    Posts
    99

    Question #EXTINF Listings in Winamp Playlist

    I have posted this question in the Software section, but this seems to be the more active forum, so I thought I would also try here.

    I have a Winamp playlist with nearly 7,000 songs and am trying to find a way to conveniently print the playlist (with numbers). I have found opening the file in Word, then pasting to Excel and adding the numbers through data fill to be the easiest method. Only problem is, a bunch of files show up in the list which are preceeded by "#EXTINF." An example:

    #EXTINF:479, Weezer - Only in Dreams

    The problem with these entries is that they screw up the numbering in Excel. In other words, Excel numbers these listings in the Excel file but they are not numbered in the Winamp playlist, thereby making the numbers in the printed list inconsistent with the Winamp numbers. Anyone know what these listings are and how to get rid of them?

    Thanks in advance.

    [This message has been edited by Kevin (edited 04-10-2000).]


    [This message has been edited by Kevin (edited 04-10-2000).]

    [This message has been edited by Kevin (edited 04-10-2000).]

  2. #2
    Newbie
    Join Date
    Feb 2000
    Location
    Edison, NJ
    Posts
    24

    Post

    do u know any programming languages?.. if you do, then it's a snap .. here's some pseudo code :
    Fi,Fo:File
    S:string
    I:integer
    I=0;
    open file Fo (output file)
    open file Fi (input file)
    while not EOF (Fi)
    {
    I++
    read Fi,S
    if not left(S,1)="#" then
    write Fo, I + "-" + S
    }
    close (Fo)
    close (Fi)

    soemthing like this can easily be done with ANY language .. (including word/excel macro's)
    hope this helps ...

    ------------------

  3. #3
    Newbie
    Join Date
    Feb 2000
    Location
    Edison, NJ
    Posts
    24

    Post

    Ok .. i decided to just write the software you're looking for .. it's very simple, doesnt have all the features one would want but it does the job you're asking .. it takes the m3u file you pick, lets you select an output filename and then makes a copy of the original without the #EXTINF and numbers it. (then you can just take that file and print it .. from notpad or something .. like i said.. not much functionality) .. this software is provided as freeware and i have to put in a disclaimer that I am not responsible for any damage that may be caused by it. Use at your own risk!

    well now that that's over with - Enjoy! (it WILL tell you if you're about to overwrite a file you already have.. hehe but u know .. i gotta do this
    http://12.26.57.149/M3Uprint.zip

    ------------------

  4. #4
    Low Bitrate
    Join Date
    Apr 2000
    Posts
    99

    Talking

    Fiddler, you are a major dude! Thank you very much for writing the code to solve the Winamp playlist problem. It works great!

    Kevin

    I sure do wish I had paid more attention in my programming class in college

  5. #5
    Registered User
    Join Date
    Apr 2000
    Location
    New Concord, OH, USA
    Posts
    157

    Arrow

    Kevin, I have a couple VBA macros for Microsoft Word that reads an m3u file and creates a word document complete with Bold centered title, page numbers and a numbered playlist. I have 2 one that reads the info from the #EXTINF lines and another that reads the actual file name entries. When reading the filenames my structure is ARTIST\ALBUM\SONG so I extract the ARTIST and SONG and add the song number. If you or anybody is interested I can document the code and post here or email you.

  6. #6
    Newbie
    Join Date
    Dec 1999
    Posts
    45

    Thumbs up

    I wouldn't mind having them, if its not too much trouble.
    Thanks

  7. #7
    Registered User
    Join Date
    Apr 2000
    Location
    New Concord, OH, USA
    Posts
    157

    Arrow

    Here it is for what it's worth:
    I have the following macro set to run on document open so it will rebuild the list everytime I open the document. You may have to do some modifications but the comments should get you through it. If you have questions let me know

    Sub CreatePlaylist2()
    '
    ' Select the entire document
    Selection.WholeStory
    ' Delete everything
    Selection.Delete Unit:=wdCharacter, Count:=1
    ' Type the Title
    Selection.TypeText Text:="MP3Wrangler Playlist"
    ' Select it
    Selection.HomeKey Unit:=wdLine
    Selection.EndKey Unit:=wdLine, Extend:=wdExtend
    ' Bold it
    Selection.Font.Bold = wdToggle
    ' Change font size
    Selection.Font.Size = 24
    ' Center across page
    Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter

    ' Deselect, put in a couple returns and reset font and alignment
    Selection.MoveDown Unit:=wdLine, Count:=1
    Selection.TypeParagraph
    Selection.TypeParagraph
    Selection.Font.Size = 12
    Selection.ParagraphFormat.Alignment = wdAlignParagraphLeft

    ' Set sn (Song number) to zero
    sn = 0

    ' Open the playlist for input
    Open "e:\mp3\master.m3u" For Input As 1

    ' Read playlist until end of file
    While Not EOF(1)

    ' Get record
    Line Input #1, rec$

    ' If the record does not start with #
    If Left$(rec$, 1) <> "#" Then

    'Add one to the song number
    sn = sn + 1

    ' Find the position of the first backslash (End of ARTIST)
    fs = InStr(rec$, "\")

    ' Put Song number and ARTIST in string call prtline
    prtline$ = Format$(sn, "####") + ": " + Left$(rec$, fs - 1)

    ' Loop until the position of the last backslash is found and saved in ls
    While fs <> 0
    fs = InStr(fs + 1, rec$, "\")
    If fs <> 0 Then ls = fs
    Wend

    ' Take what we have and add - Song name excluding the .mp3
    prtline$ = prtline$ + " - " + Mid$(rec$, ls + 1, (Len(rec$) - ls) - 4)

    ' Type what was built to the document
    Selection.TypeText Text:=prtline$
    Selection.TypeParagraph

    End If
    Wend
    Close 1
    End Sub

    If you would prefer to use the #EXTINF lines then replace If logic to the following:

    If Left$(rec$, 8) = "#EXTINF:" Then
    sn = sn + 1
    fc = InStr(rec$, ",")
    prtline$ = Format$(sn, "####") + ": " + Right$(rec$, Len(rec$) - fc)
    Selection.TypeText Text:=prtline$
    Selection.TypeParagraph

    End If

    Kyle(mp3wrangler)

Bookmarks

Posting Permissions

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