New (More of a Remix) Script: Album/Cover Art - Jukebox View

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

Moderators: Peke, Gurus

iridius
Posts: 25
Joined: Sun Aug 21, 2005 7:51 am

New (More of a Remix) Script: Album/Cover Art - Jukebox View

Post by iridius »

!!Warning!! I ramble a lot
Prerequisites:
Well-organized (Album-based) directory structure of your music files
Album Art for your albums
Lot's of patience to read my rambling

Okay, so I have been in the house typing away, surfing the net, tagging my collection (now it's getting to be too much... with MP3-DVDs ~ 50,000+ tracks at least...). So, I have spent the week trying all the tag editors and players I could. I tried Windows Media Player 10, Music Match Plus 10, WinAmp 5, MediaMonkey 2.4 I tried a bunch of Tag Editors too.... I don't remember all their names. Anyway. I like MediaMonkey because it's got some good organizing ... I mean, the best organizing functions I've seen... not tagging, but the auto-organize... etc is great. The tagging is fine, except for the "have to do one at a time Amazon" and the freedb only for CDs not for MP3s... like MusicMatch does (too slow for me now though in Belarus on dial-up... ahhh back in Jersey I had DSL...) plus if I remember correctly it wasn't so hot then either... The main thing I miss (which in the new version of MusicMatch they F'd up anyway, by making the thumbnails too small, and I couldn't find a way to make em bigger, that WMP 10 doesn't off to my knowledge, and winAmp did....) is the View by Album/Cover Art feature.

So, I got pissed, and figured out how to do it. I read one of the wishlist threads and one of the bosses... jirii I think is his name... said it would be in 2.5. If so, cool. But it was fun to learn about the scripting anyway... so here goes nothing.

None of the actual creative intelligence involved in this project is from me, except the magnificent use of cut and paste, and reload and cut&paste and reload... the main sources of help so far (it's not perfect yet) were:

1. The Album Art Covers "Plugin" Batch file for WinAmp by CyberMarz at:
http://www.xs4all.nl/~marz/index.html
I found out about it via the WinAmp plugin site, and used it with that program, I had WinAMP set up nice, but I didn't like all the loose windows floating around, and couldn't figure out how to lock them together into one window. Plus, organizing capabilities were limited.

2.The Magic Nodes Script gave me the idea of adding a node to the Web Node that linked to my html page (explained later) but that didn't work. I did find that it was possible to add nodes though.

3.Gecko from Experts Exchange (the best general IT forum around...)

4.tvjunky then gave us the inside scoop on opening the integrated broswer window of MM

5.TheRocket's Statistics Script included with MM installation

6.Still trying to get it to open in the orinal browser where the web_node's links open instead of in the seperate browser.

So, here goes nothing. If I am wrong about anything please tell me.
Last edited by iridius on Tue Aug 23, 2005 1:06 pm, edited 1 time in total.
iridius
Posts: 25
Joined: Sun Aug 21, 2005 7:51 am

Post by iridius »

Cybermarz' Album Art "Plugin" is a batch file that when run in the main directory where all your music is stored, will, by default, make an HTML page (rather replace the original one) that is used by WinAMP in it's NowPlaying view of the Media Library Window. The main catch with this batch file is that it will only really produce something that's useable if your
MP3s are in a well-organized directory. Preferably [root]/artist/album/tracks, mine are in [root]/artist/year - album/artist
- track name, and it seems to work fine. Now, if you have that structure (or something similar) for your music, you also must have the album art as files in each of the seperate album directories... it won't extract from the ID3v2 tag or anything. I have most of my album art, so I just put them in each of the directories. So, then you take the batch file and
put it in the main Music directory (you can only really use it in one directory, in the simple way, you can always manually edit it - explained later). You run it, and presto, the old HTML file in the WinAMP directory is replaced with a new one, the old one would show you something (I never looked) in the now playing window of WinAMP (probably winamp.com or somethign) the new one is a simple, but aestheticly pleasing, and very useable matrix-grid-table of your album art. In WinAMP it was
simple, just switch to nowPlaying, and voila... so at first I simply set winAmp up as my default player for MediaMonkey, but that didn't do it for me, I'd have Media Monkey, Evil Lyrics and winAmp all popping up at once, my Alt+tab buttons were getting worn out switching between them all, plus the different colors switching felt like an acid flash-back more than anything. So, I decided to use the MediaMonkey player... but, my pretty Album Art view was gone...

Then I thought... just open the HTML file. I tried... it worked, but in Mozilla all the links & pictures were broken (I still don't know why) but in Internet Explorer (whose components MediaMonkey and WinAMP use I think) it opened fine, and when I clicked on an album, it asked to Open or Download, I said open, and low-and-behold, winAMP (it was still my default at the time) opened played the .m3u playlist. I promptly switched my default player to media Monkey and the same thing.

Now for someone who would like to simply have an album art view, I would stop here. I put a link to the HTML file on my quick launch menu (it's still there) and when I was listening to a song in MediaMonkey, and I wanted to see the cool album art view, I would click on the HTML link (I had to set Internet Explorer to my default too - though I am going to find out what the problem with Mozilla is, it's just interpreting the <a href> tags in the HTML file wrong, not replacing the spaces with %20 and stuff like that I think) and then up would pop an Internet Explorer page with
the Cover Art smartly (as my UK friends say) laid out on the screen. To make it really pimp (as my Jersey friends say) I hit F11, full screen mode, and the grid adjusts (I edited the HTML to make it the best possible fit) to fit 5x4 albums, with the 1000 or so I have, that is good enough, but I can make it smaller and get like 6-7x5-6 if I want, but I don't want to make
them small, if I need to see more, I could just switch to MediaMonkey and use the tree for that. I also use the Microsoft Virtual Desktop manager (similar to the KDE multi-desktop feature) and I will be working in the first desktop, but in #2 I will open up the HTML file in full-screen view. Then all I have to do, no matter where or what I'm working in on the 1st
desktop (no Honey I wasn't looking at www.tripletPornStars.com !!!) all I have to do is hit the Windows+2 to switch to the second desktop and the full screen version of album art view HTML file. I click on the link on desktop #2 and it runs it in MediaMonkey (on desktop #1, with no problem.

Another benefit of this method, is that regardless of what MP3 player you use, you can have an automatic album art button on the Quicklaunch Menu and well, that's cool. You could even put a picture of me on it, on second though Carmen Electra (I'll put my wife... she's hot too! Plus I don't wanna get my kicked en el fondio) or something would be better.

Now, of course as any self-respecting computer junkie would tell ya (or you know) I couldn't leave well-enough alone. So, I enlisted the help of my favorite IT Super Forum experts exchange (response times measured in minutes) and Media Monkey's forum too (the best Music forum). From Experts Exchange I got help from gecko_au2003 (a new MediaMonkey forum member gecko2628 mysteriously popped up the next day too... now that's dedication to the cause)
http://www.experts-exchange.com/Program ... 34479.html

Well, with my dissection of the
Sample Simple Tree Node
http://www.mediamonkey.com/sw/webhelp/S ... 20Node.vbs

and gecko_au2003's code for opening an IE browser window, we were able to create a script that creates a new node in the tree, with a cool smiley face icon, that when clicked on, will open the IE (if it's default) browser with the html file, thus showing your Album Art view. Granted this was already accomplished with the quicklaunch icon, but now it's able to be done in Media Monkey... Plus, it was cool to figure out how to integrate something with a larger program (I'm learning C++ and that kind of development is still far off, with this scripting stuff, it's like the raison d'etre).

tvjunky then gave us the inside scoop on opening the integrated browser window of MM He interpreted the scripting.chm file for me and gave me the parts that I needed (and later somewhat figured out with my limited programming (C++) knowledge.) to open up a browser window within the Media Monkey integrated browser, but as a seperate window.
http://www.mediamonkey.com/forum/viewtopic.php?t=5407

Then I stripped the Create Reports --> Statistics script that was installed with MM by default written by, theRocket This gave me a nicer MediaMonkey activeX component (the fancy name for the web browser box) with the HTML file and Album Art in it. it shares the skin better, and in the previous version, when the album art view windows was open, you couldn't access the MediaMonkey program until you closed it. Something in the Statistics form let it work while still letting you use Media Monkey, this way you can keep both open. I just took out everything that looked functional and left everything that looked like formatting, because that's all I wanted, sure it could be done easier if I knew VBScript... but I don't. So, anyway, now we have a script that will create a Command Menu option that opens the MM browser in a seperate window with the Album Art view.

I added a shortcut key (via the script.ini file) and now I hit Ctrl+K (I don't think that's a hotkey for anything else I've ever seen in any program) and it opens the MediaMonkey-IE browser windows with the Album ARt.
Last edited by iridius on Tue Aug 23, 2005 1:41 pm, edited 2 times in total.
iridius
Posts: 25
Joined: Sun Aug 21, 2005 7:51 am

Post by iridius »

It's not clean, I'm tired after about 6 days of working on my music collection, and I just bought about 10 new MP3-DVDs... I'm addicted as my wife says... So, I'm going to set them up, edit the tags and later, reburn to clean DVDs... anyway, the things that I'm trying to get still are:

******** PROBLEMS TO FIX PLEASE HELP IF YOU CAN ************
1. I would really like to get this to open in the MediaMonkey browser pane, instead of opening a new browser, I hate all the windows, I'm slow, and it confuses me.

2. The cybermarz batch file doesn't seem to work for the russian (cyrillic script) names I have for albums, directories, artists and tracks. There was a album_art_Unicode.bat file that came with it, and when I ran that after the album_art.bat it didn't fix anything, it made the HTML file twice as large, but only changed the 1st round of gibberish into something even worse.

example:
the last link went from:
<a href="E:\žà ˜ âã­®¢\‚ᯮ¬­¨ Œ ©\album.m3u"><img src="E:\žà ˜ âã­®¢\‚ᯮ¬­¨ Œ ©\cover.jpg" alt="\žà ˜ âã­®¢\‚ᯮ¬­¨ Œ ©\"></a>

to: <a href="E:\.@0 (0BC=>2\A?><=8 09\album.m3u"><img src="E:\.@0 (0BC=>2\A?><=8 09\cover.jpg" alt="\.@0 (0BC=>2\A?><=8 09\"></a>

neither of which works, and all my Ruski Rep is not accessible!! Nor my old babushka banya music!!!! Blyet!

3. A tool bar shortcut to run this, or a command menu that's on the main File, Edit... menu instead of having to go down to the Script sub menu...

4. I thought this problem was fixed, but it was only partially, when I open the HTML file directly in IE from the quick launch menu I can scroll automatically, as long as the mouse is ontop of the window (any part) with the Album Art; but when I open the MediaMonkey-IE browswer window (not the browser pane, as I haven't figured that out yet) I have to first click on the page on a blank section before scrolling. I edited the CyberMarz batch file to put a title on the HTML file, and thus have some blank space, which otherwise might not be there.

******** PROBLEMS TO FIX PLEASE HELP IF YOU CAN ************


I'm tired.
that's it

I heard someone say they like this for parties, If I had friends that might be an issue, but I have a wife (that doesn't like music) and a cat that only likes to sleep, eat and bite, so I wouldn't know, but if that applies to you I think you could somehow lock it so you could only see the HTML Page disconnect the keyboard or something, and then people couldn't f#*k with
your computer too much during a party, but could still play albums, by using the mouse. Or you could set up a dedicated Windows XP user (with limited access) and block all access to the start menu and right click on text menu but still have the Album Art window open, or stop hanging out with people that would f(*# up your box (get a wife and a cat). well, that's it, I'll post the code below, if you've read all this... damn, you're as bad as me about this stuff, it's funny, I'll spend a week to clean my computer, but my room would be a mess if it wasn't for the wifey!

paka,
david (iRiDiuS) if you need help email someone else... just kidding
___davidgareau__at_
HOTPOP__dot_com___
Last edited by iridius on Tue Aug 23, 2005 1:35 pm, edited 1 time in total.
iridius
Posts: 25
Joined: Sun Aug 21, 2005 7:51 am

Post by iridius »

I will not post my edited version of cybermarz batch, because I'm sure he want's you to visit his site, but if you need it, bug me enough an I will. Regardless, all the current version does, is add a title to the HTML page, for clickable space and doesn't use the WinAMP directory or HTML file anymore, I have a folder in My Music for Media Monkey and it goes in there.

So, once you've made an HTML file that will work in IE and you can click and run an m3u in MediaMonkey, you can mess with the scripts.

I'll post the two latest versions I'm using.

The first is the one that adds a node, and opens in an IE (default browser) window and the HTML file is there. All I did was put this in the Auto Folder, no edit to the Scripts.ini I dont' know if that's bad or not, but it works... (famous last words)

The second is the one that adds the Tools->Scripts->Album Art View command and opens it in a MediaMonkey-IE browser. I still want to get it to open in the Web Node pane instead of in a seperate browser, please someone help.....

#1

Code: Select all

' David's bringing together the geniuses of the world to help him make a Jukebox - Cover Art view for MediaMonkey script
'
' This script adds a new node to MediaMonkey (actually a sub-mode of NowPlaying, but on the same level visually
' This node will hopefully open an html page that I have saved locally in MediaMonkey's browser
' That has a nice setup of links to m3u files and album art... pseudo jukebox-style
' It current works partially, opening the HTML document in Internet Explorer

Sub OnStartup
  Dim Tree
  Set Tree = SDB.MainTree
  Dim Node
  Set Node = Tree.CreateNode

  Node.Caption = "View by Album Art"
  Node.IconIndex = 30
  Node.UseScript = Script.ScriptPath
  Node.OnFillTracksFunct = "openHTMLpage"
  Tree.AddNode Tree.Node_NowPlaying, Node, 1   ' Add as the last child
  Tree.Node_NowPlaying.Expanded = True
End Sub


Sub openHTMLpage( Node)
  Dim retcode

  set Wshshell = createobject("wscript.shell")
  retcode = Wshshell.run ("file:///D:/David's%20Documents/My%20Music/MediaMonkey/View%20Album%20Art.htm")
End Sub
#2
First Edit the Script.ini file add the following:

Code: Select all

[Stats&OpenLink]
FileName=Stats&OpenLink.vbs
ProcName=ShowStats
Order=1
DisplayName=&Album Art View
Description=Library Statistics Report F'd Up
Language=VBScript
ScriptType=0
Shortcut = 'Ctrl+k'
Then Put this file (make sure it's named Stats&OpenLink.vbs or whatever you put in the scripts.ini file under FileName

Code: Select all

Option Explicit

Public booStyleOn

Const intTopCount = 10

Const mmAnchorRight = 4
Const mmAnchorBottom = 8
  
Const mmAlignTop = 1
Const mmAlignBottom = 2
Const mmAlignClient = 5
  
Const mmListDropdown = 2
  
Const mmFormScreenCenter = 4
  
Sub ShowStats()
Dim UI
Dim Form
Dim Foot
Dim Btn
Dim Btn2
Dim WB
Dim doc

  Set UI = SDB.UI

  ' Create the window to be shown
  Set Form = UI.NewForm
  Form.Common.SetRect 50, 50, 500, 400
  Form.Common.MinWidth = 200
  Form.Common.MinHeight = 150
  Form.FormPosition = mmFormScreenCenter
  Form.SavePositionName = "StatisticsWindow"
  Form.Caption = SDB.Localize("MediaMonkey Music Library Statistics2")
  Form.StayOnTop = True

  ' Create a panel at the bottom of the window
  'Set Foot = UI.NewPanel(Form)
  'Foot.Common.Align = mmAlignBottom
  'Foot.Common.Height = 35

  ' Create a button that closes the window
  'Set Btn = UI.NewButton(Foot)
  'Btn.Caption = SDB.Localize("&Close")
  'Btn.Common.SetRect Foot.Common.Width - 90, 9, 85, 24
  ''Btn.Common.Hint = SDB.Localize("Close this report")
  'Btn.Common.Anchors = mmAnchorRight + mmAnchorBottom
  'Btn.UseScript = Script.ScriptPath
  'Btn.OnClickFunc = "OnClose"
   
  ' Create a web browser component
  Dim LinkURL
  LinkURL = "file:///D:/David's%20Documents/My%20Music/MediaMonkey/View%20Album%20Art.htm"     ' set the Link
  Set WB = UI.NewActiveX(Form, "Shell.Explorer")
  WB.Common.Align = mmAlignClient      ' Fill all client rectangle
  WB.Common.ControlName = "WB"
  WB.Interf.Navigate LinkURL          ' A trick to make sure document exists
  Set doc = WB.Interf.Document

  Form.Common.Visible = True                ' Only show the form, don't wait for user input
  SDB.Objects("Statistics2") = Form  ' Save reference to the form somewhere, otherwise it would simply disappear
  'doc.write BuildReport(false)
  'doc.close

End Sub

Sub OnClose(Btn)
  SDB.Objects("Statistics2") = Nothing ' Remove the last reference to our form which also causes it to disappear
End Sub

Function Style()
  booStyleOn = Not booStyleOn
  If booStyleOn Then
    Style = ""
  Else
    Style = " class=""Dark"""
  End If
End Function

About the HTML editing and Batch file editing, I just used MacroMedia Dreamweaver and got the HTML file to look like I wanted it, and then pasted that into the Batch file, with the appropriate escape characters and other stuff. Then I reran the batch file, and voila. Remember if you edit any of your directory stucture, and want an updated HTML file, you should do a search for all album.m3u and cover.jpg. I would delete all album.m3u and the Batch will then update then otherwise it will not, and the links won't work. The cover.jpg is another thing, because if you delete it and that is the only picture you have, you will have none then. I am currently renaming all the cover's to cover.jpg, then I will write a batch file to make a copy with the directory's name (aka the year - album) as the name of the .jpg, this way I can erase all the .jpgs too.

Well, that's it, I hope I wasn't too nebulous and you guys can figure it all out, if not post here, I'll keep checking and help if I can, plus hope you guys can clean up the code and help me fix the problems.
pah68
Posts: 1504
Joined: Wed Apr 07, 2004 5:26 pm
Location: Sydney, Australia

Post by pah68 »

Can someone summarise this thread for me please? I'm too busy tagging my music to read the whole lot. The title sounds intriging though.
iridiusTemp

Post by iridiusTemp »

I gave the warning... hah.

You can get an album art view by three different methods explained in the thread:

1. HTML file link.
2. HTML file opened in default browser, via MM node
3. HTML file opened in MM-IE browser window via, command menu
4. Hopefully someone will know how to open it it the web node pane, so it stays clean.
pah68
Posts: 1504
Joined: Wed Apr 07, 2004 5:26 pm
Location: Sydney, Australia

Post by pah68 »

heh heh :P
JadaMango
Posts: 1
Joined: Sat Jan 28, 2006 7:24 pm

Post by JadaMango »

Did you ever find out how to get the album art to open in the web node pane?
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

Well I asked this and apparently it can't be done yet. However with the new MM2.5.2 dockable panel it would be possible to create a webbrowser screen docked within MM.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
Post Reply