maintaining the database
maintaining the database
I've started to import media into the database following all the good advices I got from my previous posts here.
At the moment my "routine" is:
1) Import media specifying a directory
2) load the custom column I defined (for consistency)
3) Once the media is imported run the two custom script:
a) ParseTitles -> getting original title and translated title from directory names
b) FindSubtitles -> to add a reference under Subtitles if a .sft file is found
4) call F6 on a movie basis to import data from IMDB
Bug or not bug (see my other posts), work around or not, I finally got to a good point and I'm really pleased with it as I can see all the the advantages in having a DB.
I haven't finished to import everything yet, but I'm already thinking on the next step: maintaining the database. And as it is now I can see a lack of support in doing that from the software.
What it was partially discussed in the past is:
1) reimport a whole directory having AMC discovering new files only.
As it is at the moment (as I personally parse the original and translated title) any re-import on the same directory will create duplicates. There's already an option to allow/disallow duplicates in media import but perhaps this check the title only. How about allowing the user to decide what to check to uniquely identify a movie? e.g. to me Source would work as that's where I store the *full path+filename* of the media file
2) When the custom field-column are defined IMHO they should be loaded by default every time media-imports is called. I don't know about other users, but I have only 1 database and 1 way to define things. To me forgetting to call the load custome-field and proceeding with the custom script + IMDB query could create nasty inconsistency in the DB.
3) It would be nice to have a one-click all comprehensive export(and import) AMC settings. I can't imagine what would it happen if my PC crashes or a virus forces me to reinstall. How do I find again my custom column? How about my custom script? And the fields selection the IMDB script is allowed to modify?
This feature could also be much appreciated if you happen to use multiple workstations to modify the same database.
4) We talked in the past about having a directory tree like way to select directories when importing. This would solve in a single step:
a) multiple selection of directories spread around the filesystem
b) directory exclusion.
Having AMC remembering the last import selection would also be vital following the title of this post.
Here the picture I posted in previous post to graphically explain the concept: http://cdn.guidingtech.com/assets/posti ... tories.png
That's all I can think right now, again I'm thinking on big numbers, if I had 20 movies I would not even bother posting this thread.
I understand that solving bug is more important than adding functionality and that the team developing AMC is not big, but I'm sure other users would consider the features described above as a high priority..
Many thanks again for the excellent software!
At the moment my "routine" is:
1) Import media specifying a directory
2) load the custom column I defined (for consistency)
3) Once the media is imported run the two custom script:
a) ParseTitles -> getting original title and translated title from directory names
b) FindSubtitles -> to add a reference under Subtitles if a .sft file is found
4) call F6 on a movie basis to import data from IMDB
Bug or not bug (see my other posts), work around or not, I finally got to a good point and I'm really pleased with it as I can see all the the advantages in having a DB.
I haven't finished to import everything yet, but I'm already thinking on the next step: maintaining the database. And as it is now I can see a lack of support in doing that from the software.
What it was partially discussed in the past is:
1) reimport a whole directory having AMC discovering new files only.
As it is at the moment (as I personally parse the original and translated title) any re-import on the same directory will create duplicates. There's already an option to allow/disallow duplicates in media import but perhaps this check the title only. How about allowing the user to decide what to check to uniquely identify a movie? e.g. to me Source would work as that's where I store the *full path+filename* of the media file
2) When the custom field-column are defined IMHO they should be loaded by default every time media-imports is called. I don't know about other users, but I have only 1 database and 1 way to define things. To me forgetting to call the load custome-field and proceeding with the custom script + IMDB query could create nasty inconsistency in the DB.
3) It would be nice to have a one-click all comprehensive export(and import) AMC settings. I can't imagine what would it happen if my PC crashes or a virus forces me to reinstall. How do I find again my custom column? How about my custom script? And the fields selection the IMDB script is allowed to modify?
This feature could also be much appreciated if you happen to use multiple workstations to modify the same database.
4) We talked in the past about having a directory tree like way to select directories when importing. This would solve in a single step:
a) multiple selection of directories spread around the filesystem
b) directory exclusion.
Having AMC remembering the last import selection would also be vital following the title of this post.
Here the picture I posted in previous post to graphically explain the concept: http://cdn.guidingtech.com/assets/posti ... tories.png
That's all I can think right now, again I'm thinking on big numbers, if I had 20 movies I would not even bother posting this thread.
I understand that solving bug is more important than adding functionality and that the team developing AMC is not big, but I'm sure other users would consider the features described above as a high priority..
Many thanks again for the excellent software!
Re: maintaining the database
In the meantime, you can backup all settings, scripts, etc. by copying the contents of the Ant Movie Catalog folder stored in AppData. The link to that folder can be found where the program was installed.rs232 wrote: 3) It would be nice to have a one-click all comprehensive export(and import) AMC settings. I can't imagine what would it happen if my PC crashes or a virus forces me to reinstall. How do I find again my custom column? How about my custom script? And the fields selection the IMDB script is allowed to modify?
Since AMC 4.1.1, you can select a key field to compare movies and choose one of this options :1) reimport a whole directory having AMC discovering new files only.
As it is at the moment (as I personally parse the original and translated title) any re-import on the same directory will create duplicates. There's already an option to allow/disallow duplicates in media import but perhaps this check the title only. How about allowing the user to decide what to check to uniquely identify a movie? e.g. to me Source would work as that's where I store the *full path+filename* of the media file
- Import all movies
- Import only new movies
- Update only existing movies
- Import new movies and update existing movies
How to select the key field ?
A key field is a field where its value will be used to differentiate each movie.
For media files import, I think the best key field is a field where filename or path+filename is stored.
So for you, field 'Source' is perfect !
To select the key field after a scan, just click on column header of preview list to define field-column as key field .
Since AMC 4.1.1, you have the option to reload automatically your field-column previously saved after a scan! This option is just at the right of the button to save your field-colum. You just have to check this button to enable this option .2) When the custom field-column are defined IMHO they should be loaded by default every time media-imports is called. I don't know about other users, but I have only 1 database and 1 way to define things. To me forgetting to call the load custome-field and proceeding with the custom script + IMDB query could create nasty inconsistency in the DB.
This is a good idea but this requires a lots of changes and a long development for just a little more functionalities I think.4) We talked in the past about having a directory tree like way to select directories when importing. This would solve in a single step:
a) multiple selection of directories spread around the filesystem
b) directory exclusion.
Having AMC remembering the last import selection would also be vital following the title of this post.
Here the picture I posted in previous post to graphically explain the concept: http://cdn.guidingtech.com/assets/posti ... tories.png
Soulsnake.
Last edited by soulsnake on 2012-08-07 14:25:56, edited 2 times in total.
Sorry where do I specify the keyfield exactly? under media import I can only see "allow/disallow duplicates"How to select the key field ?
A key field is a field where its value will be used to differentiate each movie.
For media files import, I think the best key field is a field where filename or path+filename is stored.
So for you, field 'Source' is perfect !
Sorry, I thought you knew.Sorry where do I specify the keyfield exactly? under media import I can only see "allow/disallow duplicates"
To select the key field after a scan, just click on column header of preview list to define field-column as key field .
After that you can select/deselect movies already in database too (right click on preview list).
This is not necessary for import but like this you can see movies already in database or not before import .
PS: I don't see where you see "allow/disallow duplicates", maybe for movie number ?
Soulsnake.
ahhh, right I totally missed that option, thanks to show me the way
That's exactly what I meant. Happy to have found this functionality and it works great!!!!
What I meant with allow/disallow duplicates it's actually "allow duplicated numbers", sorry I wrote to the top of my head without using the right terminology.
That's exactly what I meant. Happy to have found this functionality and it works great!!!!
What I meant with allow/disallow duplicates it's actually "allow duplicated numbers", sorry I wrote to the top of my head without using the right terminology.
I have another suggestion related to this.
if your database is large, scanning it with import media will take ages, (over an hour in my case) especially if you disable the internal AVI engine!
Would it be possible instead to have an option to scan the key field only if defined? The idea being:
1) check only if the movie is there or not (don't do anything else),
2) if and only if we decide to import: do the full processing (get all the info including length, framerate ...everything else basically!) for the relevant movies (hopefully new movies only). in this case the full processing would happen only for the movies I'm importing.
Do you see my point?
This should be 100 times faster!
Regards
if your database is large, scanning it with import media will take ages, (over an hour in my case) especially if you disable the internal AVI engine!
Would it be possible instead to have an option to scan the key field only if defined? The idea being:
1) check only if the movie is there or not (don't do anything else),
2) if and only if we decide to import: do the full processing (get all the info including length, framerate ...everything else basically!) for the relevant movies (hopefully new movies only). in this case the full processing would happen only for the movies I'm importing.
Do you see my point?
This should be 100 times faster!
Regards
Yes, I understand and I already thought about this optimization !
I will add an option to load all media info (get all the info including length, framerate ...) only during final import/update of movies rather than during scanning.
So instead of the check option "Import all media info", I will add a list with this different options.
Extract process:
1- Extract advanced media info during scanning
2- Only extract advanced media info during final import
3- Do not extract advanced media info
Soulsnake.
I will add an option to load all media info (get all the info including length, framerate ...) only during final import/update of movies rather than during scanning.
So instead of the check option "Import all media info", I will add a list with this different options.
Extract process:
1- Extract advanced media info during scanning
2- Only extract advanced media info during final import
3- Do not extract advanced media info
Soulsnake.
Good point, I would also add a control with related warning to check if the key-field column if not defined.
Perhaps it's obvious but that means to me that an import was probably never run and scanning custom field only (as custom fields are not defined yet) is not an option.
I'm looking forward to this modification!
Perhaps it's obvious but that means to me that an import was probably never run and scanning custom field only (as custom fields are not defined yet) is not an option.
I'm looking forward to this modification!
Ok, I imported all my database and run the IMDB script towards all the videos last week.
Today, if I added one video to the filesystem and I choose to rescan the root moves folder to pick it up.
During this scan I've left the paramenters as usual:
The multidisc string is set to: .*
The key field is the same as the previous scan (Source)
After the scan I choose to import only new files, but shows many new files instead, not just one as expected.
Looking into the database I now have plenty of record ending in CD2.avi, part2.avi and so on (which were meant to be filtered by the multipart regular expression ".*" I guess).
Am I doing anything wrong or is this a little bug?
Thanks!
Today, if I added one video to the filesystem and I choose to rescan the root moves folder to pick it up.
During this scan I've left the paramenters as usual:
The multidisc string is set to: .*
The key field is the same as the previous scan (Source)
After the scan I choose to import only new files, but shows many new files instead, not just one as expected.
Looking into the database I now have plenty of record ending in CD2.avi, part2.avi and so on (which were meant to be filtered by the multipart regular expression ".*" I guess).
Am I doing anything wrong or is this a little bug?
Thanks!
Re: maintaining the database
Hi, it appears that you and I share the same framework for catalog process.rs232 wrote:I've started to import media into the database following all the good advices I got from my previous posts here.
At the moment my "routine" is:
1) Import media specifying a directory
2) load the custom column I defined (for consistency)
3) Once the media is imported run the two custom script:
a) ParseTitles -> getting original title and translated title from directory names
b) FindSubtitles -> to add a reference under Subtitles if a .sft file is found
4) call F6 on a movie basis to import data from IMDB
Bug or not bug (see my other posts), work around or not, I finally got to a good point and I'm really pleased with it as I can see all the the advantages in having a DB.
I haven't finished to import everything yet, but I'm already thinking on the next step: maintaining the database. And as it is now I can see a lack of support in doing that from the software.
What it was partially discussed in the past is:
1) reimport a whole directory having AMC discovering new files only.
As it is at the moment (as I personally parse the original and translated title) any re-import on the same directory will create duplicates. There's already an option to allow/disallow duplicates in media import but perhaps this check the title only. How about allowing the user to decide what to check to uniquely identify a movie? e.g. to me Source would work as that's where I store the *full path+filename* of the media file
2) When the custom field-column are defined IMHO they should be loaded by default every time media-imports is called. I don't know about other users, but I have only 1 database and 1 way to define things. To me forgetting to call the load custome-field and proceeding with the custom script + IMDB query could create nasty inconsistency in the DB.
3) It would be nice to have a one-click all comprehensive export(and import) AMC settings. I can't imagine what would it happen if my PC crashes or a virus forces me to reinstall. How do I find again my custom column? How about my custom script? And the fields selection the IMDB script is allowed to modify?
This feature could also be much appreciated if you happen to use multiple workstations to modify the same database.
4) We talked in the past about having a directory tree like way to select directories when importing. This would solve in a single step:
a) multiple selection of directories spread around the filesystem
b) directory exclusion.
Having AMC remembering the last import selection would also be vital following the title of this post.
Here the picture I posted in previous post to graphically explain the concept: http://cdn.guidingtech.com/assets/posti ... tories.png
That's all I can think right now, again I'm thinking on big numbers, if I had 20 movies I would not even bother posting this thread.
I understand that solving bug is more important than adding functionality and that the team developing AMC is not big, but I'm sure other users would consider the features described above as a high priority..
Many thanks again for the excellent software!
I would appreciate if you could share your custom scripts:
a) ParseTitles -> getting original title and translated title from directory names
b) FindSubtitles -> to add a reference under Subtitles if a .sft file is found
Also if you could share some basic steps to use this.
Thanks a lot.
No problems:
Parse title requires a directory formatted as follow:
English name (original name) [year]
Find subtitles look for a .srt file within the directory. if this is present the database is files in accordingly.
HTH
Parse title requires a directory formatted as follow:
English name (original name) [year]
Code: Select all
program _ParseTitle;
var
Value, TranslatedTitle, OriginalTitle, Year: string;
begin
Value := GetField(fieldOriginalTitle);
// (1) Title is like this ? -> Translated title (Original Title) [Year]
RegExprSetExec('^(.*)(\(|\[)(.*)(\)|\]).*(\(|\[)(.*)(\)|\]).*$', Value);
TranslatedTitle := Trim(RegExprSubstitute('$3'));
OriginalTitle := Trim(RegExprSubstitute('$1'));
Year := Trim(RegExprSubstitute('$6'));
//ShowMessage('|' + Value + '|' + ' - |' + TranslatedTitle + '|' + ' - |' + OriginalTitle + '|' +' - |' + Year + '|')
if (TranslatedTitle <> '') and (OriginalTitle <> '') and (Year <> '') then
begin // (1) Yes
SetField(fieldTranslatedTitle, TranslatedTitle)
SetField(fieldOriginalTitle, OriginalTitle)
SetField(fieldYear, Year)
end
else
begin // (1) No
// (2) Title is like this ? -> Translated title [Year]
RegExprSetExec('^(.*)(\(|\[)(.*)(\)|\]).*$', Value);
TranslatedTitle := Trim(RegExprSubstitute('$1'));
OriginalTitle := TranslatedTitle;
Year := Trim(RegExprSubstitute('$3'));
//ShowMessage('|' + Value + '|' + ' - |' + TranslatedTitle + '|' + ' - |' + OriginalTitle + '|' +' - |' + Year + '|')
if (TranslatedTitle <> '') and (OriginalTitle <> '') and (Year <> '') then
begin // (2) Yes
SetField(fieldTranslatedTitle, TranslatedTitle)
SetField(fieldOriginalTitle, OriginalTitle)
SetField(fieldYear, Year)
end
else
begin // (2) No
// Do nothing
end;
end;
end.
Find subtitles look for a .srt file within the directory. if this is present the database is files in accordingly.
Code: Select all
program _FindExternalSubtitles;
var
Value, FullPath, Path, Subtitles: string;
begin
// Init subtitles value
Subtitles := '';
// Get full path from field Source
FullPath := GetField(fieldSource);
// Extrat path from full path
Path := ExtractFilePath(FullPath);
// List .str files in directory
Value := ListDirectory(Path, '*.srt');
// If .str has been found
if Value <> '' then
begin
if Subtitles <> '' then
Subtitles := Subtitles + ', ';
Subtitles := Subtitles + 'SRT';
end;
// List .sub files in directory
Value := ListDirectory(Path, '*.sub');
// If .sub has been found
if Value <> '' then
begin
if Subtitles <> '' then
Subtitles := Subtitles + ', ';
Subtitles := Subtitles + 'SUB';
end;
// Write subtitles value in field Subtitles
SetField(fieldSubtitles, Subtitles)
end.