Page 1 of 1

Change filename of covers

Posted: 2011-01-26 05:46:33
by z3us
Hi
I would like to change the filename of all the covers in my collection, replacing it with the filename of the video.
So, if I have this video:
Groundhog Day [HDrip][Dual].mkv
, the filename of the cover would change from films_1234.jpg to Groundhog Day [HDrip][Dual].jpg

And, if possible, I would like to move the cover to the folder where the video is placed.
Is this possible?

Thanks

Posted: 2011-01-26 09:19:39
by antp
Hi,
Currently the picture file name cannot be handled by script within AMC.
The solution for this kind of things would be to make an external tool (using any programming language) which would edit the name of the picture in the .amc or .xml catalog and rename covers at the same time.

Posted: 2011-01-26 10:20:59
by z3us
And if I download all the covers again? Is it possible to use same filename as video?

Posted: 2011-01-26 11:13:37
by antp
No, sorry.

Posted: 2011-01-26 11:22:20
by z3us
Arghhhh.
Thanks anyway

Posted: 2011-01-27 07:27:48
by bad4u
Technically it even should be possible to use AMC's scripting engine for that job, but it would need a complete new script.

You can use the file operations in scripting engine to load a catalog file in xml format (not "open" a catalog via menu) and copy it to a TStringList variable, then read the (relative) paths to pictures, use CopyFile to copy pictures to new filenames (preferably to a new folder, just to avoid any file conflicts) and finally change the path and filenames in the xml file. I did some similar file operations in the first versions of update_script, I think.

Still it isn't possible to do this modifications to the catalog if you just open it in AMC.

Posted: 2011-01-27 12:05:09
by z3us
Thanks, but I don't have any idea about scripting. I will do it manually

Posted: 2011-01-31 15:30:59
by antp
bad4u wrote:Technically it even should be possible to use AMC's scripting engine for that job, but it would need a complete new script.
Yes but that falls under what I said:

Code: Select all

make an external tool (using any programming language) 
Here AMC would be used as a scripting tool and not for its original purpose :D It would be much easier to do that in PHP or something like that ;)