-
-
Notifications
You must be signed in to change notification settings - Fork 803
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add oshash support #667
Add oshash support #667
Conversation
I think it's probably worth extending this to include galleries as well. |
My only concern for galleries would be how |
Yeah, you're right. Might be better leaving it off. |
It seems to work ok (excluding the sprite image renaming) both with an empty/existing db. |
Merged in from develop branch. There was quite a bit of conflicting changes, so may need a retest. Fixed up the logging and status stuff identified. Also fixed a nasty panic when running clean if a file is not accessible. |
Retested seems ok. |
I finished retesting. It wasnt an exhaustive test though, more of a check for regressions due to refactoring test. Looks ok. For users with existing databases i think a step by step migration guide could be useful.
|
Adds an
oshash
column to the database and makeschecksum
nullable. Added check to the scenes table to ensure at least one of the two are not null.Introduces two new settings
calculateMD5
anduseMD5
.calculateMD5
indicates whether or not to calculate the MD5 checksum during scanning. oshash will always be calculated for scenes where it is not already present. Similarly, ifcalculateMD5
is true and the checksum is empty, then the MD5 will be calculated.useMD5
indicates whether to use the MD5 checksum or the oshash for generated file naming and import/export naming.For existing systems, these settings are both defaulted to true after migration if the scene table is not empty.
New systems have
calculateMD5
anduseMD5
set to false.The system prevents changing
useMD5
to false if there are any missing oshash values. Similarly, changinguseMD5
to true will be prevented if there are any scenes without checksums. Finally,calculateMD5
is prevented from being set to false ifuseMD5
is true.Adds
hash
to the file info panel in the UI. Missing hashes are not displayed.Adds a manual migration task that renames existing generated files (not including exported metadata files) to the current naming format.
The oshash algorithm has been verified manually using the sample files from the opensubtitles website.
Resolves #351