All I Want

Download and get help for different MediaMonkey for Windows 4 Addons.

Moderators: Peke, Gurus

AaronG85
Posts: 25
Joined: Fri Jun 11, 2004 10:21 am
Location: Australia
Contact:

All I Want

Post by AaronG85 »

i was wondering if someone could get the code that Winamp uses to export there playlists into HTML cause i use to use winamp for that simple reason cause having 4,500 mp3s and when my mates ask what i have i use to create a html and print it out. now my problem is im using MediaMonkey and Winamp, but only use winamp to generate the html. I know MediaMonkey has a html creator but it list all the stuff i dont want it to i just want one html script like Winamp. is there any way or anyone know how to do this. that way i can unistall winamp for good. thank you in advance.
Azztech Computers
http://www.azztech.com.au
Lowlander
Posts: 56572
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Post by Lowlander »

Well I don't know what WinAmp does, and I don't know what your problem with MM's list is. It creates one list of files.

If you mean that too many fields are shown, you can easily edit them out. What are you precisely looking for?
AaronG85
Posts: 25
Joined: Fri Jun 11, 2004 10:21 am
Location: Australia
Contact:

Post by AaronG85 »

all i want is

artist - title

on the page nothing else.

also when i went to unistall winamp a warning came up asking me to cloise winamp but i only had mm open, does mm use something in winamp?
Azztech Computers
http://www.azztech.com.au
jiri
Posts: 5419
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Post by jiri »

The first thing can be very easily achieved by modifying the export script, I think someone would help you if you can't do it yourselves.

MM emulates WinAmp in some sense in order to be able to use many WinAmp compatible plug-ins, thus the uninstaller was probably confused and thought that WinAmp was running.

Jiri
Lowlander
Posts: 56572
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Post by Lowlander »

I modified the export.vbs HTML export part. You can either replace the current part of code or create a new vbs file. You can read here some more help http://www.songs-db.com/forum/viewtopic.php?t=701.
This will just show artist and title.

& n b s p ; needs to be without spaces!!!!

Good luck

Code: Select all

Sub ExportHTML 
  ' initialize export 
  Call InitExport( ".htm", "HTML (*.htm)|*.htm|All files (*.*)|*.*", _ 
  "LastExportHTMLDir") 
  if fullfile="" then 
  Exit Sub 
  end if 

  ' Create the output file 
  Dim fout 
  Set fout = fso.CreateTextFile( fullfile, True) 

  ' Write header line 
  fout.WriteLine "<html>" 
  fout.WriteLine "<head><title>" & SDB.Localize("MediaMonkey Track List") & "</title>" 

  ' Code to format the document 
  fout.WriteLine "<STYLE TYPE=text/css>" 
  fout.WriteLine "body{font-family:'Verdana',sans-serif; background-color:#FFFFFF; font-size:9pt; color:#000000;}" 
  fout.WriteLine "H1{font-family:'Verdana',sans-serif; font-size:13pt; font-weight:bold; color:#AAAAAA; text-aligh:left}" 
  fout.WriteLine "P{font-family:'Verdana',sans-serif; font-size:9pt; color:#000000;}" 
  fout.WriteLine "TH{font-family:'Verdana',sans-serif; font-size:10pt; font-weight:bold; color:#000000; border-color:#000000; border-style: solid; border-left-width:0px; border-right-width:0px; border-top-width:0px; border-bottom-width:3px;}" 
  fout.WriteLine "TD{font-family:'Verdana',sans-serif; font-size:9pt; color:#000000; border-color:#000000; border-style: solid; border-left-width:0px; border-right-width:0px; border-top-width:0px; border-bottom-width:1px;}" 
  fout.Writeline "TD.dark{background-color:#EEEEEE}" 
  fout.WriteLine "</STYLE>" 

  fout.WriteLine "</head><body>" 

  ' Headers of table 
  fout.WriteLine "<TABLE CELLPADDING=4 CELLSPACING=0>" 
  fout.WriteLine "<tr>" 
  fout.WriteLine " <th>" & SDB.Localize("Artist") & "</th>" 
  fout.WriteLine " <th ID=dark>" & SDB.Localize("Title") & "</th>" 
  fout.WriteLine "</tr>" 

  ' Use progress to notify user about the current action 
  Dim Progress 
  Set Progress = SDB.Progress 
  Progress.Text = SDB.Localize("Exporting...")

  ' Iterate through the list and export all songs 
  Progress.MaxValue = list.count 
  Dim i, itm 
  for i=0 to list.count-1 
    Set itm = list.Item(i) 

    ' Add space to empty fields, so table is displayed correctly (Cell borders do not show up for empty cells) 
    Dim artistname 
    artistname = MapXML(itm.ArtistName)
    if artistname="" then 
      artistname = "& n b s p ;" 
    end if 

    Dim songtitle 
    songtitle = MapXML(itm.title)
    if songtitle="" then 
      songtitle = "& n b s p ;" 
    end if 

    ' Body of the table 
    fout.WriteLine "<tr><td>"&artistname&"</td><td class=dark>"&songtitle _ 
    &"</td>" 
    Progress.Value = i+1 
    if Progress.Terminate then 
      Exit For 
    end if 
  next 

  ' Write some code to finish html document 
  fout.WriteLine "</table></body></html>"

  ' Close the output file and finish 
  fout.Close 

  ' Was it successfull? 
  Dim ok 
  if Progress.Terminate then 
    ok = False 
  else 
    ok = True 
  end if 

  ' hide progress 
  Set Progress = Nothing 

  FinishExport( ok) 
End Sub 
Post Reply