INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Cover Art Finder  (Read 9979 times)

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20048
Cover Art Finder
« on: September 27, 2003, 06:52:55 am »

I Did some more work On Cover Art Finder Today.

It should do a better job at finding Cover Art Since It Gets The Art From 4 Sources Now.

I also Fixed A Bug When Writing to the Registry, Sometimes It Would Not Save Or Read It For Some Users. It Seems To Be Working Now.

Also It Supports "Folder.jpg" a bit Better

It Also Cleans Up Info It Downloads to your temp folder when doing a search. on the first use and you have alot of junk in the temp folder you may see a slight delay. this is because it is cleaning up some old temp files.

http://www.spartasoft.com
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
Fayetteville, NC, USA

geoelectric

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 59
  • nothing more to say...
Re: Cover Art Finder
« Reply #1 on: September 27, 2003, 06:51:56 pm »

Hopefully this'll fix the issue I was having where every new session would prompt me for your activation code.

You don't mention it in the bug fixes, so I assume nothing's changed here.  I don't save my cover art in <MediaCenter>\Data; I have a Cover Art directory in my music folder.  Your finder sometimes finds that directory and uses it, but sometimes it doesn't, and dumps everything in the Data directory.

Rather than trying to make it "clever", could you just put an option on the configuration tab to set the directory for downloaded art?
Logged

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20048
Re: Cover Art Finder
« Reply #2 on: September 28, 2003, 01:48:03 am »

Quote
Hopefully this'll fix the issue I was having where every new session would prompt me for your activation code.

You don't mention it in the bug fixes, so I assume nothing's changed here.  I don't save my cover art in <MediaCenter>\Data; I have a Cover Art directory in my music folder.  Your finder sometimes finds that directory and uses it, but sometimes it doesn't, and dumps everything in the Data directory.

Rather than trying to make it "clever", could you just put an option on the configuration tab to set the directory for downloaded art?


let me know on the activation code problem you have been having.

Quote
Rather than trying to make it "clever", could you just put an option on the configuration tab to set the directory for downloaded art?


give me a sample of what your talking about.
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
Fayetteville, NC, USA

Kid_Squid

  • Regular Member
  • Recent member
  • *
  • Posts: 18
  • nothing more to say...
Re: Cover Art Finder
« Reply #3 on: September 28, 2003, 08:33:06 am »

just downloaded the cover art plugin....and have a hiccup..

I can't seem to find any of the cover art it downloads...

all i can see in the status window is

"new local pic,waiting"

any suggestions or a link to some docs/facs?

thanks,

squid
Logged

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20048
Re: Cover Art Finder
« Reply #4 on: September 28, 2003, 08:58:24 am »

>> I can't seem to find any of the cover art it downloads...

Look In


C:\Program Files\J River\Media Center\Data\Cover Art

>> any suggestions or a link to some docs/facs?
Not For Real Men
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
Fayetteville, NC, USA

Kid_Squid

  • Regular Member
  • Recent member
  • *
  • Posts: 18
  • nothing more to say...
Re: Cover Art Finder
« Reply #5 on: September 28, 2003, 09:06:40 am »

none of the cover art the plug in finds is in the cover art folder....that's the first place I looked....

what's up with the status window...."WAITING" what is it waiting on ??

by the way...is there someplace I am supposed to put an activation key in...?
Logged

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20048
Re: Cover Art Finder
« Reply #6 on: September 28, 2003, 09:13:42 am »

Quote
none of the cover art the plug in finds is in the cover art folder....that's the first place I looked....

Well Then It Is Not Working

Quote

what's up with the status window...."WAITING" what is it waiting on ??

Maybe for the activation key

Quote

by the way...is there someplace I am supposed to put an activation key in...?

It will Not Run Without it and it should ask you when you press the batch button.
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
Fayetteville, NC, USA

Kid_Squid

  • Regular Member
  • Recent member
  • *
  • Posts: 18
  • nothing more to say...
Re: Cover Art Finder
« Reply #7 on: September 28, 2003, 09:23:18 am »

ok....pressin the batch button...does nada...nothing...tried a reboot...nada....

any other thoughts?

squid
Logged

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20048
Re: Cover Art Finder
« Reply #8 on: September 28, 2003, 09:36:31 am »

regedit

Key
HKEY_CURRENT_USER\Software\JRiver\Media Jukebox\Plugins\Interface\Cover Art Finder\Registered

Value

"Registered"

if it is there then it is registered.

=================================

go into MC9 and change the Cover Art Folder Path

then change it back.

MC9 does not save the path to the registry unless you make a change (Per A Comment From Matt)



Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
Fayetteville, NC, USA

Kid_Squid

  • Regular Member
  • Recent member
  • *
  • Posts: 18
  • nothing more to say...
Re: Cover Art Finder
« Reply #9 on: September 28, 2003, 10:09:16 am »

"Registered" was not in the registry....i addded and restarted MC....still nothing...

Now I notice that the tag on the file has been changed to point to the cover art....(now get a red x in the now playing screen)

but nothing is downloaded.....

still getting the "waiting" in the status window

squid
Logged

geoelectric

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 59
  • nothing more to say...
Re: Cover Art Finder
« Reply #10 on: September 28, 2003, 10:38:53 am »

KidSquid:  look in the Media Center\Data folder (not Data\Cover Art).  That's where it puts mine.

KingSparta:  The first problem is that the Registered value contains "Test", not "Registered".  Leave in some debugging code?

The second problem is that when your finder finds art, most of the time it isn't putting it in the cover art folder I have set under File Naming & Location | Track Images Location.  Inexplicably, -sometimes- it does, but it's rare.  There's also this weird thing where it'll download the images as a GIF on one session and a JPG on another (identical search config).  I don't even know what to make of that.  When you put the art in the "Data" directory, you embed a path into the file that's just the filename (Artist - Album.jpg) with no pathing information.  MC won't find the file with that, even if it's in the Data directory--I'm sure that's what KidSquid's seeing.

For your own duplication, I'm feeding the Now Playing list with a modified version of the "Needs Images" smartlist that only gives back track 1 of each album needing images (your plugin doesn't seem to handle the case of multiple songs from one album correctly, and tries to search for the image multiple times).

A third issue that I haven't previously mentioned is that if your cover art plugin (possibly the others--I only use the cover art one) is switched away from while it's working, it crashes Media Center!  First you get an error about your ocx getting disconnected.  Then you get an AV in Media Core.  Unfortunately, I can't always tell when your plugin is working, so I generally can't use it unless I'm going to close Media Center right afterwards.  Is there any possible way you can handle switching away from the plugin page better?

Incidentally, I only get setup for 3 sites with 0.0.9.  Did you say you expanded it to 4?
Logged

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20048
Re: Cover Art Finder
« Reply #11 on: September 28, 2003, 10:59:02 am »

Quote
KingSparta:  The first problem is that the Registered value contains "Test", not "Registered".  Leave in some debugging code?

Yes And No.

Some systems wil not allow the save of info to the registry, not sure why.

so what i did s first write to the registry "Test" then read it. if test is there then we can write to the registry.

not sure why yours would stills say "Test" i will look at that. something may have happened when you first ran the program.

Quote
The second problem is that when your finder finds art, most of the time it isn't putting it in the cover art folder I have set under File Naming & Location | Track Images Location.  Inexplicably, -sometimes- it does, but it's rare.

what is the path?

make sure it has a slash

mine saves to the mc9 default cover art folder using

C:\Program Files\J River\Media Center\Data\Cover Art\

there was a bug in MC9 where if you played with the path it would not add the "\" and everything would go into the \Data\ folder and not the \Data\Cover Art\ Folder.

Quote
There's also this weird thing where it'll download the images as a GIF on one session and a JPG on another (identical search config).  I don't even know what to make of that.

well sometimes the cover art is found made as a GIF, Most is JPG but not all. normaly the smaller ones are gif.

on some sources there is 3 sizes, gif, med jpg, large jpg it will try to find them all.

Quote
A third issue that I haven't previously mentioned is that if your cover art plugin (possibly the others--I only use the cover art one) is switched away from while it's working, it crashes Media Center!

I have not seen that error, And It May Or Maynot be Mine. MC9 should not crash if you move out of a active plug-in it should trap it and move on.

Quote
Incidentally, I only get setup for 3 sites with 0.0.9.  Did you say you expanded it to 4?


yes, you can't see the other, but it is a sister of the orginal but not .com but .de and it will have some of the "Non-Us" Art
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
Fayetteville, NC, USA

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20048
Re: Cover Art Finder
« Reply #12 on: September 28, 2003, 11:03:52 am »

Quote
"Registered" was not in the registry....i addded and restarted MC....still nothing...

Now I notice that the tag on the file has been changed to point to the cover art....(now get a red x in the now playing screen)

but nothing is downloaded.....

still getting the "waiting" in the status window

squid


could you take a picture of your registry for this program and send it to me. mfarmer1@nc.rr.com

looks like i need to look into this.
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
Fayetteville, NC, USA

Kid_Squid

  • Regular Member
  • Recent member
  • *
  • Posts: 18
  • nothing more to say...
Re: Cover Art Finder
« Reply #13 on: September 28, 2003, 11:26:29 am »

Ok....a couple of things I have discovered...

This is the setting in MC for cover art:

C:\Program Files\J River\Media Center\Data\Cover Art\

As mentioned above...I looked into the Data directory, (one level above the Cover Art Directory) and guess what I found???  The cover art that I had attempted to download.

Now I'm gonna take a screen cap of the registry and send it on...

Squid
Logged

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20048
Re: Cover Art Finder
« Reply #14 on: September 28, 2003, 11:27:33 am »

this is how i am finding the coverart folder.

   MJImageFileLocation = ReadKey("HKEY_CURRENT_USER\Software\JRiver\Media Jukebox\Properties\ImageFileLocation")
   If LenB(MJImageFileLocation) = 0 Then
       MJImageFileLocation = ReadKey("HKEY_LOCAL_MACHINE\Software\JRiver\Media Jukebox\InstallDirectory")
       MJImageFileLocation = MJImageFileLocation & "Data\Cover Art\"
   Else
       MyPos1 = Len(MJImageFileLocation)
       If Mid$(MJImageFileLocation, MyPos1, 1) <> "\" Then
           MJImageFileLocation = MJImageFileLocation & "\"
       End If
   End If


basicly an Idea From Matt incase MC9 Has Not Saved The Cover Art Folder Path To The Registry. I Guess There May Be Problems With This If Users Use Something Else As A Folder Name or MC9 is not located in the default folder.

Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
Fayetteville, NC, USA

Kid_Squid

  • Regular Member
  • Recent member
  • *
  • Posts: 18
  • nothing more to say...
Re: Cover Art Finder
« Reply #15 on: September 28, 2003, 11:33:09 am »

that key is properly set in my registry....

:-/ :-/ :-/ :-/ ?
Logged

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20048
Re: Cover Art Finder
« Reply #16 on: September 28, 2003, 11:42:03 am »

Quote
Ok....a couple of things I have discovered...

This is the setting in MC for cover art:

C:\Program Files\J River\Media Center\Data\Cover Art\

As mentioned above...I looked into the Data directory, (one level above the Cover Art Directory) and guess what I found???  The cover art that I had attempted to download.

Now I'm gonna take a screen cap of the registry and send it on...

Squid


did you change it then set it back to this path?

this way MC9 will write all the registry keys to the registry.

then try it again?


Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
Fayetteville, NC, USA

geoelectric

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 59
  • nothing more to say...
Re: Cover Art Finder
« Reply #17 on: September 28, 2003, 11:45:41 am »

OK, I'll change the reg key from "Test" to "Registered" myself--that'll take care of me, at any rate.

I do have the trailing slash on the cover art directory.  Also, my value exists--your code above should have fallen out at the first if, with the location being set to my cover art folder.  Perhaps there's a general registry issue going on?

Thanks for the explanation on the gif vs. the jpg.  It was just weird that it would find one sometimes and one the other.

The Media Center crash is odd.  It only does it if you're in the middle of a search.  I'm going to take a wild-ass guess that you're using a WebBrowser ActiveX instance to do the search, and it's attempting to report back to the now-nonexistent ocx.  For example, if I start a search, then hit stop batch, but switch away before stopping, I initially get an error when I switch:

Cover Art Finder

Run-time error '-2147417848 (80010108)':

Automation Error
The object invoked has disconnected from its clients.

<OK>

Upon clearing that, I get the Media Core AV.  At least once, I've gotten a message from your (theoretically unloaded plugin) that the batch has been stopped, between your automation error and MC's AV.
Logged

Kid_Squid

  • Regular Member
  • Recent member
  • *
  • Posts: 18
  • nothing more to say...
Re: Cover Art Finder
« Reply #18 on: September 28, 2003, 11:50:54 am »

ok...

went in and changed the location of the image diectory to something outside of the J River directory....closed MC and reopened...

went back and set the image directory back to C:\Program Files\J River\Media Center\Data\Cover Art\

closed MC and reopened...

went to cover art finder...had it look up one file...it found the graphic and placed it in the data directory....one directory above the Cover Art directory

squid
Logged

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20048
Re: Cover Art Finder
« Reply #19 on: September 28, 2003, 12:02:01 pm »

Quote
ok...

went in and changed the location of the image diectory to something outside of the J River directory....closed MC and reopened...

went back and set the image directory back to C:\Program Files\J River\Media Center\Data\Cover Art\

closed MC and reopened...

went to cover art finder...had it look up one file...it found the graphic and placed it in the data directory....one directory above the Cover Art directory

squid


I just sent you a message on how you can see more info, to include the art path.
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
Fayetteville, NC, USA

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20048
Re: Cover Art Finder
« Reply #20 on: September 28, 2003, 12:07:54 pm »

Quote
OK, I'll change the reg key from "Test" to "Registered" myself--that'll take care of me, at any rate.

I do have the trailing slash on the cover art directory.  Also, my value exists--your code above should have fallen out at the first if, with the location being set to my cover art folder.  Perhaps there's a general registry issue going on?

Thanks for the explanation on the gif vs. the jpg.  It was just weird that it would find one sometimes and one the other.

The Media Center crash is odd.  It only does it if you're in the middle of a search.  I'm going to take a wild-ass guess that you're using a WebBrowser ActiveX instance to do the search


It uses the MC9 sdk to do the download

   Dim MJIA As MediaJukebox.MJInternetAutomation
   Set MJIA = g_MJ.GetInternet
   MJIA.DownloadMode = DOWNLOAD_MODE_NO_UI
   TempFile = MJIA.DownloadToTempFile(MYURL)

i will do some testing.

it may just be i need to add some error traping in a few places.

Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
Fayetteville, NC, USA

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20048
Re: Cover Art Finder
« Reply #21 on: September 28, 2003, 12:43:45 pm »

it seems for Kid_Squid

MC9 is not passing the cover art path to the plug-in

it is also not passing the MC9 Install dir to the plug-in

not sure why but this is what i did

======================================

i changed the code to test if both registry paths fail to push a default path into the path var

   MJImageFileLocation = ReadKey("HKEY_CURRENT_USER\Software\JRiver\Media Jukebox\Properties\ImageFileLocation")
   If LenB(MJImageFileLocation) = 0 Then
       MJImageFileLocation = ReadKey("HKEY_LOCAL_MACHINE\Software\JRiver\Media Jukebox\InstallDirectory")
       MJImageFileLocation = MJImageFileLocation & "Data\Cover Art\"
       If LenB(MJImageFileLocation) = 0 Then
           MJImageFileLocation = "C:\Program Files\J River\Media Center\Data\Cover Art\"
       End If
   Else
       MyPos1 = Len(MJImageFileLocation)
       If Mid$(MJImageFileLocation, MyPos1, 1) <> "\" Then
           MJImageFileLocation = MJImageFileLocation & "\"
       End If
   End If

Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
Fayetteville, NC, USA

Kid_Squid

  • Regular Member
  • Recent member
  • *
  • Posts: 18
  • nothing more to say...
Re: Cover Art Finder
« Reply #22 on: September 28, 2003, 12:45:45 pm »

yes...exerything looks fine in the registry....the image path is correctly stated as:

C:\Program Files\J River\Media Center\Data\Cover Art\

Squid
Logged

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20048
Re: Cover Art Finder
« Reply #23 on: September 28, 2003, 12:47:31 pm »

Quote
yes...exerything looks fine in the registry....the image path is correctly stated as:

C:\Program Files\J River\Media Center\Data\Cover Art\

Squid


download the new version i just made (same version number)

it will force the standard default path if for some reason it can't get the registry info.

I also added some traps to it for the reported crashes, i could never get it to crash as geoelectric stated. it could be an OS issue.

Squid what OS do you have?
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
Fayetteville, NC, USA

Kid_Squid

  • Regular Member
  • Recent member
  • *
  • Posts: 18
  • nothing more to say...
Re: Cover Art Finder
« Reply #24 on: September 28, 2003, 12:53:58 pm »

just downloaded and reinstalled....images still going to the data folder..

win xp
Logged

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20048
Re: Cover Art Finder
« Reply #25 on: September 28, 2003, 01:04:04 pm »

OOps

i just changed something in that code

glad this is not my day job


Quote
       If LenB(MJImageFileLocation) = 0 Then
           MJImageFileLocation = "C:\Program Files\J River\Media Center\Data\Cover Art\"
       Else
           MJImageFileLocation = MJImageFileLocation & "Data\Cover Art\"
       End If


Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
Fayetteville, NC, USA

geoelectric

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 59
  • nothing more to say...
Re: Cover Art Finder
« Reply #26 on: September 28, 2003, 02:16:23 pm »

Win XP here, too.  Images still going to the data folder.

I had it searching on Andrew W.K. - I Get Wet, all songs.  It's still grabbing the jpg and the gif for each, even though it's only using the jpg as a thumbnail.  Noteable was that the first time I did this, it worked "correctly" in that it searched on the first song, then said local file for the rest.  The second time I did this (I erased the images first), it searched separately on each file.

Re: error trapping.  Two tests--one gave the same automation error.  There was no Media Core AV, but the action window quit working.  The second time, it just closed Media Center with no warning or error.

To be clear about what I'm doing, set up a string of things to search on.  Hit the batch button, and while it's still working, switch to Media Library.
Logged

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20048
Re: Cover Art Finder
« Reply #27 on: September 28, 2003, 02:45:43 pm »

Quote
To be clear about what I'm doing, set up a string of things to search on.  Hit the batch button, and while it's still working, switch to Media Library.

I tried that i could not crash it ot MC9

Quote
It's still grabbing the jpg and the gif for each, even though it's only using the jpg as a thumbnail.

it should do this.

as i said before maybe not as clear it will look for 3 sizes in jpg and gif when it findes the best it will use the largest size.

Quote
The second time I did this (I erased the images first), it searched separately on each file.

I guess what your saying is from the same album?

I have not tested it like that for some time.

but i will
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
Fayetteville, NC, USA

geoelectric

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 59
  • nothing more to say...
Re: Cover Art Finder
« Reply #28 on: September 28, 2003, 09:32:06 pm »

Quote

I tried that i could not crash it ot MC9

it should do this.

as i said before maybe not as clear it will look for 3 sizes in jpg and gif when it findes the best it will use the largest size.

Ah.  Wish it'd delete the ones it didn't use.  I don't want the clutter.


Quote


I guess what your saying is from the same album?

I have not tested it like that for some time.

but i will


Yep.  I'd expect it to actually search based on the first track, and just realize for the rest that it had already found it or not, as appropriate.  Repeating the search for every track is just wasteful if it was found the first time.  It's wasteful if it wasn't found too, if none of the enabled searches use the track name.
Logged

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20048
Re: Cover Art Finder
« Reply #29 on: September 29, 2003, 02:57:51 am »

Quote
Yep.  I'd expect it to actually search based on the first track, and just realize for the rest that it had already found it or not, as appropriate.  Repeating the search for every track is just wasteful if it was found the first time.  It's wasteful if it wasn't found too, if none of the enabled searches use the track name.


well it should if the path thingy was working for you.

I tested it last night and it worked here.
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
Fayetteville, NC, USA
Pages: [1]   Go Up