if I right click the list of movies and select sort-by I can't see any option like "Picture"
The reason why I would do such a silly thing is simply because I would like to check what are the movies with no pictures
How can I achieve this?
Regards
how to sort the DB by picture?
Hi,
You can use a little script like this:
or
Soulsnake.
You can use a little script like this:
Code: Select all
program SelectNoPicture; // Select movies with no picture or broken picture
begin
SetSelected(not PictureExists);
end.
Code: Select all
program CheckNoPicture; // Check movies with no picture or broken picture
begin
if PictureExists then
SetField(fieldChecked, 'False')
else
SetField(fieldChecked, 'True');
end.
Last edited by soulsnake on 2013-04-02 08:53:24, edited 2 times in total.
HI, thanks for that!
What is it supposed to do if I run the scrip against all the records?
I'm trying but unless I'm something something wrong, it doesn't show me anything
Also... no picture to me means having "something" but perhaps not found.
So in short I'd like to identify empty Picture field and the one that have broken data e.g. pointing to a non existing file.
Appreciated!
What is it supposed to do if I run the scrip against all the records?
I'm trying but unless I'm something something wrong, it doesn't show me anything
Also... no picture to me means having "something" but perhaps not found.
So in short I'd like to identify empty Picture field and the one that have broken data e.g. pointing to a non existing file.
Appreciated!
Hi,
In the same way, you can use a little script like this:
or
Soulsnake.
In the same way, you can use a little script like this:
Code: Select all
program SelectNoFileExists; // Select movies if file stored in source field doesn't exist
begin
SetSelected(not FileExists(GetField(fieldSource)));
end.
Code: Select all
program CheckNoFileExists; // Check movies if file stored in source field doesn't exist
begin
if FileExists(GetField(fieldSource)) then
SetField(fieldChecked, 'False')
else
SetField(fieldChecked, 'True');
end.
Hi,
This is what you want.
The script will select and check movie duplicates by comparing url field.
You can use source field too if you want.
For pictures, if they are stored in catalog, this is more difficult to compare, otherwise you can compare picture path.
Soulsnake.
This is what you want.
The script will select and check movie duplicates by comparing url field.
You can use source field too if you want.
For pictures, if they are stored in catalog, this is more difficult to compare, otherwise you can compare picture path.
Code: Select all
program FindDuplicates; // Find movie duplicates by comparing url field
var
List: TStringList;
Value: string;
begin
if GetIteration = 0 then
begin
List := TStringList.Create;
List.Sorted := True;
List.CaseSensitive := False;
end;
Value := Trim(GetField(fieldURL));
//Value := Trim(GetField(fieldSource));
//Value := Trim(PicturePath);
if List.IndexOf(Value) > -1 then
begin
SetField(fieldChecked, 'True');
SetSelected(True);
end
else
begin
List.Add(Value);
SetField(fieldChecked, 'False');
SetSelected(False);
end;
if GetIteration = GetIterationCount-1 then
begin
List.Free;
end;
end.