Hi Moving Pictures Devs,
I have made a small change to Moving Pictures source and would like to post it to the Developers Group on Google, but I can't figure out how to join since it complains that I don't have the correct Permissions to Join.
Problem: I have a bunch (about 80) sample videos between all my movies on a network drive. Every time the import of Moving Pictures run, it collects this list of samples and tries to process them like "new" video files, only to spit them out just before they are queued for online lookup. Part of this process is to build a Media object in memory and load it's current setting from the db.
Because my client PC/Laptop is working over a slow wifi connection, with a slow CPU. It takes a while to work through these files every time. And all the progress indicators "act" as if there are about 80 "new" video files to process.
Moral of the story: A lot of high level processing is involved on the samples to determine if the video files is new and need to be looked up online that can be skipped.
Suggested Solution: My suggested solution is that the Importer should disregards sample files the same way it disregard any other file type that is not a video file, like .nfo or .txt. In essence a sample video is like an invalid file format: It will never be in the DB, so no point in "just checking" every time.
In the source I have "copied" the code that spit out the samples higher up in the call stack so that it ignores those files in the same process as it ignores "unsupported" files.
Implementation:
MovingPictures\Database\DBImportPath.cs, line 237, add:
That is it. This code comes from MovingPictures\LocalMediaManagement\MovieImporter.cs, line 1090. I would have suggested that the code be removed from ScanFiles(...) but then the importer will not spit out sample files that was in fact imported previously and is not "resent to importer" (this will happen if the setting was off during an initial import run).
I have attached a "patch" file as well.
I have made a small change to Moving Pictures source and would like to post it to the Developers Group on Google, but I can't figure out how to join since it complains that I don't have the correct Permissions to Join.
Problem: I have a bunch (about 80) sample videos between all my movies on a network drive. Every time the import of Moving Pictures run, it collects this list of samples and tries to process them like "new" video files, only to spit them out just before they are queued for online lookup. Part of this process is to build a Media object in memory and load it's current setting from the db.
Because my client PC/Laptop is working over a slow wifi connection, with a slow CPU. It takes a while to work through these files every time. And all the progress indicators "act" as if there are about 80 "new" video files to process.
Moral of the story: A lot of high level processing is involved on the samples to determine if the video files is new and need to be looked up online that can be skipped.
Suggested Solution: My suggested solution is that the Importer should disregards sample files the same way it disregard any other file type that is not a video file, like .nfo or .txt. In essence a sample video is like an invalid file format: It will never be in the DB, so no point in "just checking" every time.
In the source I have "copied" the code that spit out the samples higher up in the call stack so that it ignores those files in the same process as it ignores "unsupported" files.
Implementation:
MovingPictures\Database\DBImportPath.cs, line 237, add:
Code:
// exclude samplefiles and ignore them from any processing
if (VideoUtility.isSampleFile(videoFile))
{
logger.Info("IGNORED: File='{0}', Bytes={1}, Reason='Sample detected'",videoFile.Name, videoFile.Length);
continue;
}
That is it. This code comes from MovingPictures\LocalMediaManagement\MovieImporter.cs, line 1090. I would have suggested that the code be removed from ScanFiles(...) but then the importer will not spit out sample files that was in fact imported previously and is not "resent to importer" (this will happen if the setting was off during an initial import run).
I have attached a "patch" file as well.
Attachments
Last edited: