below is little script/program that can automatically fetch data from AMG and write it in files tags (with foobar and foo_comserver2) or in tab delimetered csv files stored in passed files folder
2 usage scenarios:
1. foobar and foo_comserver2 installed:
- make playlist, name it "amg" and add some tracks
- double click script/program or run it with some arguments
- it will try to fetch data from AMG, including album cover (200x200px amg_%album%.jpg) and Song reviews (not many releases include song reviews of course)
2. from command line:
AMG file_path artist album [-track tracknumber title]
additional arguments that can be add as last arguments (if any) are:
_noc_ (don't download cover)
_nosr_ (don't fetch Song Review)
_nofoo_ (don't use foobar as tagger, just write csv files)
It uses just one request per release (on last release basis) so all data is cached then reused if needed without requesting for every track
This fields can be fetched: Mood, Style, Artist_URL, Release_URL, Release_Date, Release_Rating, Theme, Label, Genre, Review, Composer, Performer, Song_Review and album cover
example: "python amg.pyc" (or double click on amg.exe) will process all files in playlist named "AMG" and add this tags:
- composer/performer/song_review in corresponding tags
- all other tags will be written to multivalue %amg% tag with each value following this rule - "%AMG_tag_name%: tag_value"
i.e. if I want to map Review, Rating, Genre and Style from %amg% tag, it can be done with properties dialog > automatically fill values (or more easily with masstagger):
[a href=\"http://img87.imageshack.us/img87/5356/sshot10.png\" target=\"_blank\"]
Compiled with Python 2.6 + Python Win32 Extensions (for com server)
[attachment=5840:amg_script.7z]
Frozen stand alone bundle (2.57 MB):
[attachment=5841:amg.7z]
known limitation (other than design) is no unicode support i.e. if filename is in unicode it will just be skipped
source script by sending email by PM
awesome!! thank you very much.
is it posible to use this to write to custom db (http://blog.99ravens.net/index.php?e=283) tags?
Good point, I totally forgot about custum_db
I'll make it possible and try to solve problem with unicode filenames somewhere in near future
It doesn't work for me. I don't know why. I have followed all instructions, but I got an error that said "unknown commandline parameter: /tag:AMG=AMG_Mood...etc."
Add _dbg_ as argument and see what command line produces
Any more info, like OS, is it portable foobar, which is your foobar install folder, etc?
I'm porting it to Python 3 right now (for unicode support) and some more changes like making it "modular" so that other scripts could work with it, custom_db support etc... but it will be at the end of the next week as I'm somewhat "busy" right now
Add _dbg_ as argument and see what command line produces
Any more info, like OS, is it portable foobar, which is your foobar install folder, etc?
OS is WinXP SP2. It was portable version (c:\foobar2000\), but I tried standart installation (c:\program files\foobar2000\) and got same error. Pic releated
(http://img687.imageshack.us/img687/1654/22941018.th.png) (http://img687.imageshack.us/i/22941018.png/)
It's not clear what could it be. I guess it's happening on any release?
You can try with this bundle (it's built with python 2.5 as I uninstalled 2.6, so you need to download whole package): [attachment=5860:amg_test.7z]
It will print exact command line which you can sent me by PM or paste it here and hopefully well see what's wrong
Also as not many people download it, maybe it's something XP related, as I don't have XP anywhere near. Command line length is large, but it shouldn't be more than 8192 characters (max limit), who know...
You're right, it is command line length problem. It works fine with albums which has a bit information in AMG.
Any ideas to using it on XP? I totally do not want install Seven
Hm, it doesn't seem to me that "Blue Train" has more than 8000 chars, it should be around 2-3000 unless there is some nonsense in the parsed tags, can you comment?
I'll think about some workaround for future release
BTW 2048 char limitation is for NT4 and 2000
I can't get this script to work with columns_ui... is this possible?
I also can't figure out the masstagger script for taking values from %amg% with the ';' separator...
this is what I'm using as a guessing pattern in masstagger:
%%AMG_Genre: %genre%;%%
do you use
$meta_sep(amg,;)
as source field?
Thanks 2E7AH for this, it is great.
It's not clear what could it be. I guess it's happening on any release?
I think you may have to have the masstagger component (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Masstaggers_User_Guide) installed for it to work.
Without masstagger I get "unknown commandline parameter: /tag:Composer=" errors, similar to what dscmn was getting.
Also 2E7AH, can you please post the uncompiled amg.pyc file as I would like to add the ability to pick up the AMG track picks and AMG album pick flags.
Cheers.
Without masstagger I get "unknown commandline parameter: /tag:Composer=" errors, similar to what dscmn was getting.
that's right - without masstagger "/tag" switch doesn't work, I forgot about that so check will be written in next script
Also 2E7AH, can you please post the uncompiled amg.pyc file as I would like to add the ability to pick up the AMG track picks and AMG album pick flags.
done (just send mail by pm, you don't need to reply here)
btw, new different version soon
- unicode support
- ini file for managing tags (no more switches),
- modular scripts (amg and discogs as first examples - it's not some proper plugin/modular system as I'm not a programmer but works for now)
- custom db option
- etc minor things
some time is needed for porting to python 3000, which just demoralizes me - changes to script and changed python syntax at the same time is wrong combination
First: many thanks for this script!It helped me a lot!
Do you still plan to work on a new version?
Good to hear and yes, there will be new version, mainly because I want to provide working script with unicode filename support and INI settings for custom tags. I know I said it should be out till now, but I just made mess of it splitting it in different scripts when now I plan to use classes in just one script + ini file. I'm enthusiastic about Python (looking/working with other things) and just postpone anything related to Python 3. I'll have plenty free time these days and I'll make it
Okay. Great to hear it.
I'm pretty new to foobar. I thought I'd ask about getting a little more instruction on getting this to work through foobar with comserver and masstagger?
OP should be readable I think, in case you are having trouble with masstagger, here is quick info:
example picture in OP is for properties dialog - "automatically fill values" command, which is the same as masstagger "guess value" command
source is "$meta_sep(amg,;)" which introduces semicolon between values in multivalue %amg% tag
pattern depends on what info you want to place in custom tags: empty double percent (%%) replaces any characters before matched string after it, so if you like to extract only Genre and Style, you should use %%AMG_Style: %style%;%%AMG_Genre: %genre%;
obviously the order or values in %amg% tag is important, and as pointed in OP it's in this order: AMG_Mood; AMG_Style; AMG_Artist_URL; AMG_Release_URL; AMG_Release_Date; AMG_Rating; AMG_Theme; AMG_Label; AMG_Genre; AMG_Review
so "AMG_Style: %style%;" is before "AMG_Genre: %genre%;", and double percent replaces any characters that could be between them, if any
hopefully I'll write new script soon
OP should be readable I think, in case you are having trouble with masstagger, here is quick info:
example picture in OP is for properties dialog - "automatically fill values" command, which is the same as masstagger "guess value" command
source is "$meta_sep(amg," which introduces semicolon between values in multivalue %amg% tag
pattern depends on what info you want to place in custom tags: empty double percent (%%) replaces any characters before matched string after it, so if you like to extract only Genre and Style, you should use %%AMG_Style: %style%;%%AMG_Genre: %genre%;
obviously the order or values in %amg% tag is important, and as pointed in OP it's in this order: AMG_Mood; AMG_Style; AMG_Artist_URL; AMG_Release_URL; AMG_Release_Date; AMG_Rating; AMG_Theme; AMG_Label; AMG_Genre; AMG_Review
so "AMG_Style: %style%;" is before "AMG_Genre: %genre%;", and double percent replaces any characters that could be between them, if any
hopefully I'll write new script soon
Thanks, I got it working with that. The script is great!
Seems that links in 1st post are broken, where else can I get this script?
Seems that links in 1st post are broken, where else can I get this script?
Actualy all links to this file are broken. Can I get the one that's working?
Or maybe someone could send me this script in PM?
OP should be readable I think, in case you are having trouble with masstagger, here is quick info:
example picture in OP is for properties dialog - "automatically fill values" command, which is the same as masstagger "guess value" command
source is "$meta_sep(amg," which introduces semicolon between values in multivalue %amg% tag
pattern depends on what info you want to place in custom tags: empty double percent (%%) replaces any characters before matched string after it, so if you like to extract only Genre and Style, you should use %%AMG_Style: %style%;%%AMG_Genre: %genre%;
obviously the order or values in %amg% tag is important, and as pointed in OP it's in this order: AMG_Mood; AMG_Style; AMG_Artist_URL; AMG_Release_URL; AMG_Release_Date; AMG_Rating; AMG_Theme; AMG_Label; AMG_Genre; AMG_Review
so "AMG_Style: %style%;" is before "AMG_Genre: %genre%;", and double percent replaces any characters that could be between them, if any
hopefully I'll write new script soon
Hey 2E7AH, any chance that you're still working on this?
I'd love to see that update!
Is there any place where the amg script can be downloaded? Or can somebody send it to me via e-mail?
It's a great piece of code, doing exactly what I need to keep the genres and the styles well organized. Not to mention the composers for individual tracks are not available elsewhere.
Many thanks in advance.
please help avout script.i hope we can all use
Is this script still available? It says the attachments are deleted and the OP has their PM disabled :S
copy here: http://pastebin.com/bV3GzkiJ (http://pastebin.com/bV3GzkiJ)
copy here: http://pastebin.com/bV3GzkiJ (http://pastebin.com/bV3GzkiJ)
Does anyone know if this is working? I can't seem to get it to work (no errors, there is just nothing happening).
copy here: http://pastebin.com/bV3GzkiJ (http://pastebin.com/bV3GzkiJ)
Does anyone know if this is working? I can't seem to get it to work (no errors, there is just nothing happening).
It's not working anymore, because amg has changed its code since last october. Maybe just the go() function has to be updated (lines 48 & 49)
It's not working anymore, because amg has changed its code since last october. Maybe just the go() function has to be updated (lines 48 & 49)
I tried to understand how did it works, but I don't know how it reffers to informations. I have a lot of difficulties with this script. Does someone would be granted to update this ? Decalicatan, would you have an idea ?
Is there someone who could update this to work?!
It would an absolute god send to have this functionality.
Or is there any new applications/scripts which can do this?