Page 1 of 1

Duplicates movies

Posted: 2013-02-27 05:29:59
by al0203
Is there any function to easily find the duplicates movies that you have in your catalog.

Posted: 2013-02-27 09:04:42
by antp
I think that there is a "find duplicates" script, you should find it by going in Tools -> Scripting.

Posted: 2013-02-27 21:42:34
by al0203
antp wrote:I think that there is a "find duplicates" script, you should find it by going in Tools -> Scripting.
It gives me an error message. Can you copy here the script?

Posted: 2013-02-28 01:41:04
by Raoul_Volfoni
Hi,
al0203 wrote:Can you copy here the script?
The "Find Duplicate.ifs" script is available here. But there is just only one version from 2005.
al0203 wrote:It gives me an error message.
What error message ?
If it's about a missing or wrong version of file ... then the "Find Duplicate" script needs the "StringUtils1.pas" file in order to work properly. You can find this file here too. You have to put it in the "Scripts" directory of AMC

If it's something else, tell us what is the error message and what version of AMC you are using.

Posted: 2013-02-28 06:59:58
by al0203
Raoul_Volfoni wrote:Hi,
al0203 wrote:Can you copy here the script?
The "Find Duplicate.ifs" script is available here. But there is just only one version from 2005.
al0203 wrote:It gives me an error message.
What error message ?
If it's about a missing or wrong version of file ... then the "Find Duplicate" script needs the "StringUtils1.pas" file in order to work properly. You can find this file here too. You have to put it in the "Scripts" directory of AMC

If it's something else, tell us what is the error message and what version of AMC you are using.
Error in Script in "FINDDUP": in the line 29

This is the complete script

program FindDup;
uses
StringUtils1;
var
MovList: TStringList;
DupList: TStringList;
CurTitle: string;
ResultPath: string;
begin
if StringUtils1_Version < 3 then
begin
ShowMessage('File "stringutils1.pas" is too old, please download a new version of it');
Error;
end;
if ResultPath = '' then
begin
ResultPath := 'c:\duplicates.txt';
Input('Find Duplicates', 'Store results to:', ResultPath);
end;
if MovList = nil then
MovList := TStringList.Create;
if DupList = nil then
DupList := TStringList.Create;
case GetOption('TitleToUse') of
1: CurTitle := GetField(fieldOriginalTitle);
2: CurTitle := GetField(fieldTranslatedTitle);
3: CurTitle := GetField(fieldOriginalTitle) + ' | ' + GetField(fieldTranslatedTitle);
else
Error; // wrong option
end;
if GetOption('IgnoreCase') = 1 then
CurTitle := AnsiLowerCase(CurTitle);
if FindFullLine(CurTitle, MovList, 0) <> -1 then
DupList.Add(CurTitle)
else
MovList.Add(CurTitle);
DupList.SaveToFile(ResultPath);
end.


The line 29 said Error; // wrong option

Posted: 2013-02-28 09:23:01
by soulsnake
Hi,

I think you don't copy the script file in AMC script folder but just copy/paste code no ?
This script uses options (GetOption function) so you can not just copy/paste the script code in script editor, this will not work.
You have to copy the script file in AMC script folder and use this one (it will be added to script list automatically when you will open "Tools -> Scripting" window).

Soulsnake.

Posted: 2013-02-28 10:20:54
by al0203
soulsnake wrote:Hi,

I think you don't copy the script file in AMC script folder but just copy/paste code no ?
This script uses options (GetOption function) so you can not just copy/paste the script code in script editor, this will not work.
You have to copy the script file in AMC script folder and use this one (it will be added to script list automatically when you will open "Tools -> Scripting" window).

Soulsnake.
It was very estrange because the script file is in the hidden folder with the rest of the scripts, but it doesn't appear in the AMC. So what I did is to edit another existing string, empty it and copy inside it what I pasted in the previous post.

Posted: 2013-02-28 10:30:25
by soulsnake
What version of AMC do you use ?
Is it installed or portable version ?
I think you didn't copy the script in the good AMC script folder that why the script doesn't appear in "Tools -> Scripting" window.

Soulsnake.

Posted: 2013-02-28 13:53:26
by antp
al0203 wrote: It was very estrange because the script file is in the hidden folder with the rest of the scripts, but it doesn't appear in the AMC. So what I did is to edit another existing string, empty it and copy inside it what I pasted in the previous post.
It should appear in Tools->Scripting (but not from the other script menu, as that one is for scripts importing info from sites)

Posted: 2013-02-28 16:20:59
by Raoul_Volfoni
... or you have not check the "?" in the "language filter" section of the scripting window.

Posted: 2013-02-28 19:53:56
by al0203
soulsnake wrote:What version of AMC do you use ?
Is it installed or portable version ?
I think you didn't copy the script in the good AMC script folder that why the script doesn't appear in "Tools -> Scripting" window.

Soulsnake.
My version is 4.1.0.2

I used the filter and it appear and it works.

Thank you everybody