Go Back   Winamp & Shoutcast Forums > Developer Center > Winamp Development

Reply
Thread Tools Search this Thread Display Modes
Old 9th August 2006, 02:34   #1
gonemad
Member
 
Join Date: May 2006
Posts: 52
Move songs and keep ML info (ratings, playcount, etc)

I'm not sure where to post this, so i'll just keep it here in the development forum since im still working on it

***WARNING*** Back up your media library (/winamp/plugins/ML) before using this program
I am not responsible for any loss of data. I have tested this on a very large ML and had no problems,
so it should be fine, but back up the ML anyway.

Anyway.. have you ever wanted to move your music around but couldnt because you didnt want to lose all your ratings and playcounts? Well I made a program that allows you to do that.

What this program does:

-Creates unique md5 hash codes for every song in your ML
-Gets the statistics (playcount, rating, genre, lastplayed) for every song and associates it with the unique hash code
-Scans a moved file, gets the hash code, looks up all the stats and restores it back into your ML

note: the first time you scan will take a REALLY LONG TIME if you have a good sized ML, so set it up to do it overnight

This program was written in visual basic and uses activewinamp to interact with the ML

read install.txt on how to install
and then help.txt for info how to run the program

By no means is this quick and simple(well i make it easy but there are still a few steps u have to follow), but its a solution for those who want to move stuff and keep ratings

contact me on here or at gonemad@gmail.com if you have any questions or suggestions

Download here
gonemad is offline   Reply With Quote
Old 10th August 2006, 04:15   #2
ken1to
Junior Member
 
ken1to's Avatar
 
Join Date: Oct 2004
Location: Costa Rica
Posts: 34
Awesome, going to test it right away
ken1to is offline   Reply With Quote
Old 15th August 2006, 01:52   #3
gonemad
Member
 
Join Date: May 2006
Posts: 52
if it does crash (without one of my error messages popping up) let me know and i'll upload the latest version.. i've had someone tell me they got an invalid cast error so i took care of that as best as i could
gonemad is offline   Reply With Quote
Old 28th August 2006, 16:37   #4
psyker7
Junior Member
 
Join Date: Jul 2004
Posts: 27
Install isn't working....

"Fatal Execution Engine Error (0x7927e03e)"

Followed by

"MLStatRestore.exe - Common Language Runtime Debugging Services

Application has generated an exception that could not be handled.

Process id=0xedc (3804), Thread id=oxd4 (212).

Click OK to termine the application.
Click CANCEL to debug the application."

Sucks as this plugin when working would be awsome.
psyker7 is offline   Reply With Quote
Old 28th August 2006, 17:05   #5
DrO
 
Join Date: Sep 2003
Posts: 27,873
looks like it's based on the .net framework so if you've not got the right version installed (or at all) then it'll crash like it is.

-daz
DrO is offline   Reply With Quote
Old 28th August 2006, 23:22   #6
psyker7
Junior Member
 
Join Date: Jul 2004
Posts: 27
Guess I'll have another go installing that... thought I did have it but....

edit - installed .net framework 2.... no luck.... same error.

Last edited by psyker7; 28th August 2006 at 23:48.
psyker7 is offline   Reply With Quote
Old 30th August 2006, 15:59   #7
gonemad
Member
 
Join Date: May 2006
Posts: 52
this is when you first run the program? i believe u need .net 1.1 framework.... even if you install 2.0 u have to install 1.1 as well.. give that a try and let me know

when i get home from work i'll post my latest build

the bugs i was aware of were fixed and i added some extra features (probably only 1 that will be useful for others so i'll just enable that)

and that is to combine ratings/playcounts of diff versions of the same album... ie : 3 years ago you ripped an album in 192 kbps mp3.. you now rip that same album to .ogg or .aac and want all the ratings and playcounts of the mp3 version to be transfered over to the newly ripped version

another example would be u had the original version of an album but then get the limited edition version with some extra tracks
gonemad is offline   Reply With Quote
Old 30th August 2006, 16:17   #8
psyker7
Junior Member
 
Join Date: Jul 2004
Posts: 27
hmm... Guess I'll have to figure out why my .net 1.1 version is corrupt O,o won't let me uninstall or reinstall or repair...
psyker7 is offline   Reply With Quote
Old 30th August 2006, 17:06   #9
gonemad
Member
 
Join Date: May 2006
Posts: 52
so you have both 1.1 and 2.0 installed? the only other thing i can think of is it will crash on start up if you dont have activewinamp installed properly

there are directions on how to install that included.. make sure u run the activewinamp.exe first.. and then copy the dll over
gonemad is offline   Reply With Quote
Old 30th August 2006, 23:17   #10
psyker7
Junior Member
 
Join Date: Jul 2004
Posts: 27
Yeah did that though already had it installed.
As I said I think it's probally to do with my .net 1.1 install being corrupt... i.e. not your fault. I'll see if I can sort it.
psyker7 is offline   Reply With Quote
Old 31st August 2006, 03:43   #11
gonemad
Member
 
Join Date: May 2006
Posts: 52
you should be able to uninstall it via add/remove programs... then try reinstalling
gonemad is offline   Reply With Quote
Old 31st August 2006, 04:34   #12
psyker7
Junior Member
 
Join Date: Jul 2004
Posts: 27
No I was unable to install / uninstall or repair by the normal methods... ended up having to download the Microsoft SDK to get some file to configure windows installer to remove it or something, along with deleting the files manually then reinstalling....

Anyway long story short, got it working, works marvelously :P

Howerver, I was wondering if there was any way to get it to save the ratings to ID3 instead of the Media Library? Once I found such a plugin... Since have reformatted my computer and its dissapeared from the forums.

Also, though I know its a seperate program, find a way so that it updates the hashes on the fly whenever you listen to a song / change its rating etc.

Still this works just as well =)
psyker7 is offline   Reply With Quote
Old 4th September 2006, 01:55   #13
gonemad
Member
 
Join Date: May 2006
Posts: 52
glad you got it working

storing data in comments crossed my mind when i first sat down to write the program.. i chose the hash code path instead since i knew i could easily implement everything

i do remember hearing about the plugin that did store rating and playcount into the id3 comment.. but it only supported mp3 so i never really used it since i rip all my cds in ogg

however I do like the idea of updating after you listen so im going to look into that tonight.. perhaps a small utility that just runs in the background

pretty sure i will at least be able to update on track changes at least
gonemad is offline   Reply With Quote
Old 4th September 2006, 07:52   #14
gonemad
Member
 
Join Date: May 2006
Posts: 52
well good news it seems i was able to signifcantly speed up the scanning process... instead of scanning each song completely... im just scanning the first kilobyte of the file and creating a hash code from that..

this shouldnt present any problems when trying to identify a song once moved.. the odds are pretty slim that duplicate hashcodes will occur since i also add the artist and the song name to the hash.. so it looks something like: SwiftLovesick2JGzTGDOXo6qZPrSaVV9NQ==

the odds of 2 tracks having the same artist and trackname AND having the first KB of data produce the same hash code, but be 2 different songs.. should be about a 1:1,000,000,000,000 shot.. or less

the 52000 song ML i use to do my testing originally took around 5-6 (thats just a guess cuz i did it overnight) now took around 18 minutes

im gonna look into autoupdating the db now
gonemad is offline   Reply With Quote
Old 4th September 2006, 08:51   #15
psyker7
Junior Member
 
Join Date: Jul 2004
Posts: 27
Nice to see it being updated =)
For a while what I was doing when moving tracks was using ctl + e on the comment :P

I suppose the only reason I would like ID3's is for porting ratings to other players... it seems the Library export plugin doesn't work with 5.2x =(

Still... not needed, just would be a nifty little thing. And I do have quite a few m4a's... didn't think that they wouldnt be able to use the ID3 thing anyway... >duh<

Keep it up =)
psyker7 is offline   Reply With Quote
Old 9th September 2006, 00:57   #16
Mouser X
Member
 
Join Date: Feb 2004
Posts: 79
Quote:
Originally posted by psyker7
it seems the Library export plugin doesn't work with 5.2x =(
It does actually work, but it's a pain to access it. To use it, you need to use the default Winamp Modern skin (the one that comes with Winamp). Then, in the Media Library, there's a "File" selection at the upper left-hand corner. Click on that, and the export/import options are in there. Since I never use the Winamp Modern skin, I found this through a link on these forums somewhere.

So, while a bit of a pain to access, at least it works. As such, I still use it. It's certainly better than nothing. Hope that helps.

Also, in regards to this plugin (the one that the thread is about), what are the chances of the dependencies on the .NET framework being removed? I'd like to use this utility, but I've installed the .NET stuff on other computers, and was not pleased with the results. If the dependencies could be removed, that'd be awesome! Nonetheless, great idea, and good luck with it. Mouser X over and out.
Mouser X is offline   Reply With Quote
Old 9th September 2006, 01:27   #17
gonemad
Member
 
Join Date: May 2006
Posts: 52
i could try compiling it with VB6..... i dont think it relies on much .net stuff.... just hte fact im using visual studio.net is probably the reason why the app requires the framework... im surprised to hear people having trouble with the framework as i've never come across any problems with it..

i shall look into it.. but i'll have to see if i can find my copy of vb6 or figure out how to remove the need for .net stuff using visual studio if its possible


as for this app.. im stopping with adding features for now (mainly stuff that i need) and am trying to work out all the bugs so i can put it up to download.. right now the new features im definately including are:

-a newer scan method to get a hash code (about 30x faster)
-ability to merge stats of 2 different versions of an album
-automatic updating mode (program will minimize to the tray and will update whatever song winamp plays)

extra crap i may throw in:
these are heavily based on rating and playcounts.. and really based on how i rate things so i dont know how useful they would be.. i thought it was cool tho

calculate x top artists
calculate x top albums

and generate playlists for them

again i dunno if anyone would want them so they wouldnt be enabled by default
gonemad is offline   Reply With Quote
Old 9th September 2006, 01:40   #18
DrO
 
Join Date: Sep 2003
Posts: 27,873
just because you're using visual studio.net shouldn't mean you need to use the .net stuff (it can still generate pure win32 apps ) - only if what you're doing really needs it or you're happier with using the .net framework for things

-daz
DrO is offline   Reply With Quote
Old 11th September 2006, 17:56   #19
gonemad
Member
 
Join Date: May 2006
Posts: 52
Quote:
Originally posted by DrO
just because you're using visual studio.net shouldn't mean you need to use the .net stuff (it can still generate pure win32 apps ) - only if what you're doing really needs it or you're happier with using the .net framework for things

-daz
i'll have to search and see what calls are using the .net framework
gonemad is offline   Reply With Quote
Old 11th September 2006, 18:13   #20
gonemad
Member
 
Join Date: May 2006
Posts: 52
ah yea it appears im using it pretty heavily..

i really wanted to just do an actual plugin for winamp cuz im pretty good with c++.. and would be able to run with pretty much no user interaction after the initial setup .. im just not real familiar with doing windows apps (i code on an old ass unix system for my job)

and while the SDK seems pretty good.. the lack of a blank ML sample left me kinda clueless tho. i spent awhile looking at that ML_ex example.. it helps a little but all the extra code i think just confuses me more than it helps... in one of the stickied topics there was mention of actually including a blank ml example in teh SDK like 2 years ago.. whatever happened with that?
gonemad is offline   Reply With Quote
Old 11th September 2006, 18:48   #21
DrO
 
Join Date: Sep 2003
Posts: 27,873
Quote:
one of the stickied topics there was mention of actually including a blank ml example in teh SDK like 2 years ago.. whatever happened with that?
the same as everything, time was lacking for it to be done (i have a feeling it was me who said would do it).

-daz
DrO is offline   Reply With Quote
Old 12th September 2006, 02:08   #22
gonemad
Member
 
Join Date: May 2006
Posts: 52
haha yea it was you :P
gonemad is offline   Reply With Quote
Old 15th September 2006, 21:54   #23
gonemad
Member
 
Join Date: May 2006
Posts: 52
k finished up the fixes and new features

Download Here

notes:

Added in v0.2:

New Scan Method: Added a new scan method to generate hash codes for each song. This increases scan speed by 20-25x
My ML used to take like 5-6 hours to scan, now takes 15-20 minutes for the initial scan. The original scan method
was left in there if you still want to use it. Otherwise i suggest deleting main.dat and hashlookup.dat, then rescan
everything with the new method. You can select which to use under options

Merge Albums: This is used for merging stats for 2 different versions of the same album. Examples would be an mp3 version
of an album and you decide to rerip it to ogg. Another would be if you had the regular retail version of an album, but later
got the limited edition with some extra tracks. With this you can merge the stats of the 2.. and get rid of one of them

How to use: go to Merge Info -> Albums to load the window
From here load album 1 and then load album 2. You will want to check all the tracks that u want to merge. If for some reason
the tracks are in a different order, you can use the up and down buttons to move the tracks around so it matches up with the
the other version of the album.

To make it simple.. this will just take the first checked songs from each album and merge them.. then the 2nd checked songs and
merge them... and so on.

Click process to do the merge

After its merged you can click save to save the changes for good.. IF you dont want to save you can just close out the whole
program and the changes will not be saved

Added in v0.3

Auto Update Monitoring: when enabling this.. the program will minimize into your system tray and will automatically update
the stats for the songs you are listening to... If the song you choose to listen to is not in the current database, it will scan it
and add it.

Now all you really have to do is run an initial scan, and then enable monitoring and all the stats will stay up to date
gonemad is offline   Reply With Quote
Old 16th September 2006, 17:20   #24
billyvnilly
Forum King, M.D.
 
billyvnilly's Avatar
 
Join Date: Mar 2004
Location: Detroit burbs
Posts: 3,379
Send a message via ICQ to billyvnilly Send a message via AIM to billyvnilly
I must be missing something. I do not see your plugin anywhere. where is its UI supposed to be? Im also getting this, which i think explains why its not working:
Attached Files
File Type: txt untitled.txt (3.9 KB, 649 views)

Last edited by billyvnilly; 16th September 2006 at 19:33.
billyvnilly is offline   Reply With Quote
Old 16th September 2006, 23:43   #25
gonemad
Member
 
Join Date: May 2006
Posts: 52
well its a seperate utility that runs outside of winamp.... as for that error im not quite sure whats wrong.. do u have the .net framework? it should only require 1.1

edit: you should be able to get it through windows update.. the error looks like it is because the framework isnt installed.. i should probably make a note of that in the install.txt
gonemad is offline   Reply With Quote
Old 17th September 2006, 04:51   #26
billyvnilly
Forum King, M.D.
 
billyvnilly's Avatar
 
Join Date: Mar 2004
Location: Detroit burbs
Posts: 3,379
Send a message via ICQ to billyvnilly Send a message via AIM to billyvnilly

yeah.
billyvnilly is offline   Reply With Quote
Old 10th April 2007, 03:43   #27
Stupifier
Major Dude
 
Join Date: Nov 2005
Posts: 596
Hey I'm really interested in this. The link is down to download this though. Also, any updates....I know its been a while
Stupifier is offline   Reply With Quote
Old 10th April 2007, 22:28   #28
gonemad
Member
 
Join Date: May 2006
Posts: 52
here's a new link.. i put the latest build.. but honestly i havent really worked on it in a long time since the backing up and restoring feature works perfect

http://filebeam.com/a3f3b767074f4d203fb0e25696ecc5e5

there are a few extra options but half dont work... its all listed in the readme
gonemad is offline   Reply With Quote
Old 10th April 2007, 22:34   #29
gonemad
Member
 
Join Date: May 2006
Posts: 52
oh if anyone does actually have any requests i can start working on it again
gonemad is offline   Reply With Quote
Old 11th April 2007, 09:37   #30
Stupifier
Major Dude
 
Join Date: Nov 2005
Posts: 596
THANKYOU! It worked like a charm. I've been wanting to move my music library for AGES and Winamp's poor support for this really pissed me off.
Stupifier is offline   Reply With Quote
Old 11th April 2007, 13:19   #31
abu
mlipod moderator
(Senior Member)
 
abu's Avatar
 
Join Date: Jun 2005
Location: Germany
Posts: 3,457
The hash approach implies that you must not change any ID3 tags during the process, right? Otherwise it won't recognize it as being the same file.

WinAmp Pro 5.5 with ml_iPod 3.10 + dev.patches (download it)
ml_iPod documentation Wiki - ml_iPod FAQ - search ml_iPod forum - iPhone/iTouch - Found a bug?
Donations to support the ml_iPod project can be done HERE
abu is offline   Reply With Quote
Old 11th April 2007, 23:11   #32
gonemad
Member
 
Join Date: May 2006
Posts: 52
the key for each song that gets generated is the combination of metadata and the hash of the first 1kb worth of data

the odds of having a song that has the same artist, song name, and album.. and generate the same hash as a differnet track.. is nearly impossible

theres 2 options i have under "scan method".. both ended up nearly identical

new method key: artist+title+album+hash(1st kb of file)
old method key: artist+title+hash(1st kb of file)

since the id3 tags are stored at the end of the mp3 file.... you could get away with changing anything but the artist and title and still generate the same key

so i could probably add something that scans like 3/4 of the file and just uses that for the key... so tags could be messed with however you want. i'd assume it would be pretty accurate but couldnt guarentee it
gonemad is offline   Reply With Quote
Old 12th April 2007, 04:42   #33
Stupifier
Major Dude
 
Join Date: Nov 2005
Posts: 596
I have a request that could make this more complete. Basically, this plug-in does not fix playlists. If I move stuff around....and reload it in the Media Library, my playlists that include the moved songs will not work. Is it feasible to have the plug-in preserve playlists as well?
Stupifier is offline   Reply With Quote
Old 12th April 2007, 07:22   #34
abu
mlipod moderator
(Senior Member)
 
abu's Avatar
 
Join Date: Jun 2005
Location: Germany
Posts: 3,457
Quote:
Originally posted by gonemad
since the id3 tags are stored at the end of the mp3 file.... you could get away with changing anything but the artist and title and still generate the same key
ID3v2 (which is used nowadays) is stored at the beginning of the file! If you scan only 1kb, you'll never get any of the MP3 data, only the ID3v2 tag, which is usually at least 2kb (padded)

Only the old ID3v1 is stored at the end.

WinAmp Pro 5.5 with ml_iPod 3.10 + dev.patches (download it)
ml_iPod documentation Wiki - ml_iPod FAQ - search ml_iPod forum - iPhone/iTouch - Found a bug?
Donations to support the ml_iPod project can be done HERE
abu is offline   Reply With Quote
Old 12th April 2007, 22:41   #35
gonemad
Member
 
Join Date: May 2006
Posts: 52
id3v2 can be at the end of the file as well.. but yea majority of my music still just has v1 since i use the ML to store most of the metadata... so yea changing id tags as of now would probably cause the results to be invalid

the current methods werent meant for allowing editing of the id3 tags... i could probably pick a certain point in the middle of the song and scan alot more of the data... or find the location of where the song data starts and scan from there

the only case i could see this even being needed is if u are using some sort of retagging program that changes the folder name and tags at the same time

i'll work on adding a scan method thats independent of the id tags completely


Stupifier: yea i could probably restore the playlists as well.. i can look into it
gonemad is offline   Reply With Quote
Old 12th April 2007, 23:14   #36
Stupifier
Major Dude
 
Join Date: Nov 2005
Posts: 596
Thankyou!
Stupifier is offline   Reply With Quote
Old 13th April 2007, 08:32   #37
abu
mlipod moderator
(Senior Member)
 
abu's Avatar
 
Join Date: Jun 2005
Location: Germany
Posts: 3,457
Quote:
Originally posted by gonemad
i could probably pick a certain point in the middle of the song and scan alot more of the data... or find the location of where the song data starts and scan from there
Yes, I think that would be the best solution. The real song data never changes, so taking that as a starting point (or even better, a given offset from the start, 'cause sometimes songs start with silence, which could possibly lead to same hash codes for the first KB for different songs) would solve all the issues.

WinAmp Pro 5.5 with ml_iPod 3.10 + dev.patches (download it)
ml_iPod documentation Wiki - ml_iPod FAQ - search ml_iPod forum - iPhone/iTouch - Found a bug?
Donations to support the ml_iPod project can be done HERE
abu is offline   Reply With Quote
Old 13th April 2007, 20:28   #38
gonemad
Member
 
Join Date: May 2006
Posts: 52
yea without any other metadata.. silence is what i fear could give some invalid results.. i'll try to work out some solutions this weekend.. and yea i will definately scan way more than 1 kb if no metadata is used
gonemad is offline   Reply With Quote
Old 13th April 2007, 21:12   #39
abu
mlipod moderator
(Senior Member)
 
abu's Avatar
 
Join Date: Jun 2005
Location: Germany
Posts: 3,457
Cool. Keep up the good work - this is a life saving project!!!

WinAmp Pro 5.5 with ml_iPod 3.10 + dev.patches (download it)
ml_iPod documentation Wiki - ml_iPod FAQ - search ml_iPod forum - iPhone/iTouch - Found a bug?
Donations to support the ml_iPod project can be done HERE
abu is offline   Reply With Quote
Old 19th April 2007, 06:43   #40
gonemad
Member
 
Join Date: May 2006
Posts: 52
alright i'll give a little update.. for the ML playlist recovery.. i got most of that coded, but it only partially works.. it restored like 2 of the 11 songs in the playlist.. so that was good enough for me at the time and i decided to go start drinking (it was a saturday)

i spent most of today working on the new scanning method that creates the hash based on the actual songs and ignores the tag... i got some pretty good results.. its EXTREMELY slow right now since i scan pretty much the whole song.. the last test i ran recovered 29 of the 31 files that i changed the tag for.. i'll have to figure out why the 2 failed but it is looking pretty promising
gonemad is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > Winamp Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump