forked from Github/Axter-Stash
Compare commits
3 Commits
6ef3c77735
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
24aa00de8d | ||
|
|
b646da289c | ||
|
|
c383be80f0 |
@@ -503,11 +503,18 @@ def isBetterVideo(scene1, scene2, swapCandidateCk = False): # is scene2 better t
|
||||
return True
|
||||
return False
|
||||
|
||||
def isSignificantTimeDiff(duration1, duration2):
|
||||
dur1 = int(duration1)
|
||||
dur2 = int(duration2)
|
||||
return abs(dur1 - dur2) / max(abs(dur1), abs(dur2)) > (1 - significantTimeDiff)
|
||||
|
||||
def significantMoreTimeCompareToBetterVideo(scene1, scene2): # is scene2 better than scene1
|
||||
if isinstance(scene1, int):
|
||||
scene1 = stash.find_scene(scene1)
|
||||
scene2 = stash.find_scene(scene2)
|
||||
if int(scene1['files'][0]['duration']) >= int(scene2['files'][0]['duration']):
|
||||
dur1 = int(scene1['files'][0]['duration'])
|
||||
dur2 = int(scene2['files'][0]['duration'])
|
||||
if dur1 >= dur2 or not isSignificantTimeDiff(dur1, dur2):
|
||||
return False
|
||||
if int(scene1['files'][0]['width']) * int(scene1['files'][0]['height']) > int(scene2['files'][0]['width']) * int(scene2['files'][0]['height']):
|
||||
if significantTimeDiffCheck(scene1, scene2):
|
||||
@@ -520,7 +527,7 @@ def significantMoreTimeCompareToBetterVideo(scene1, scene2): # is scene2 better
|
||||
return True
|
||||
|
||||
def allThingsEqual(scene1, scene2): # If all important things are equal, return true
|
||||
if int(scene1['files'][0]['duration']) != int(scene2['files'][0]['duration']):
|
||||
if isSignificantTimeDiff(scene1['files'][0]['duration'], scene2['files'][0]['duration']):
|
||||
return False
|
||||
if scene1['files'][0]['width'] != scene2['files'][0]['width']:
|
||||
return False
|
||||
|
||||
@@ -7,13 +7,13 @@ config = {
|
||||
# Alternative path to move duplicate files.
|
||||
"dup_path": "", #Example: "C:\\TempDeleteFolder"
|
||||
# The threshold as to what percentage is consider a significant shorter time.
|
||||
"significantTimeDiff" : .90, # 90% threshold
|
||||
"significantTimeDiff" : .98, # 90% threshold
|
||||
# If enabled, moves destination file to recycle bin before swapping Hi-Res file.
|
||||
"toRecycleBeforeSwap" : True,
|
||||
# Character used to seperate items on the whitelist, blacklist, and graylist
|
||||
"listSeparator" : ",",
|
||||
# Enable to permanently delete files, instead of moving files to trash can.
|
||||
"permanentlyDelete" : False,
|
||||
"permanentlyDelete" : True,
|
||||
# After running a 'Delete Duplicates' task, run Clean, Clean-Generated, and Optimize-Database.
|
||||
"cleanAfterDel" : True,
|
||||
# Generate PHASH after tag or delete task.
|
||||
@@ -61,7 +61,7 @@ config = {
|
||||
# If enabled, favor videos with higher bit rate. Used with either favorBitRateChange option or UI [Swap Bit Rate Change] option.
|
||||
"favorHighBitRate" : True,
|
||||
# If enabled, favor videos with a different frame rate value. If favorHigherFrameRate is true, favor higher rate. If favorHigherFrameRate is false, favor lower rate
|
||||
"favorFrameRateChange" : True,
|
||||
"favorFrameRateChange" : False,
|
||||
# If enabled, favor videos with higher frame rate. Used with either favorFrameRateChange option or UI [Swap Better Frame Rate] option.
|
||||
"favorHigherFrameRate" : True,
|
||||
# If enabled, favor videos with better codec according to codecRanking
|
||||
|
||||
@@ -1,11 +1,26 @@
|
||||
h2 {text-align: center;}
|
||||
table, th, td {border:1px solid black;}
|
||||
h2 {
|
||||
text-align: center;
|
||||
}
|
||||
table,
|
||||
th,
|
||||
td {
|
||||
border: 1px solid black;
|
||||
}
|
||||
.inline {
|
||||
display: inline;
|
||||
}
|
||||
.scene-details{text-align: center;font-size: small;}
|
||||
.reason-details{text-align: left;font-size: small;}
|
||||
.link-items{text-align: center;font-size: small;}
|
||||
.scene-details {
|
||||
text-align: center;
|
||||
font-size: small;
|
||||
}
|
||||
.reason-details {
|
||||
text-align: left;
|
||||
font-size: small;
|
||||
}
|
||||
.link-items {
|
||||
text-align: center;
|
||||
font-size: small;
|
||||
}
|
||||
ul {
|
||||
padding: 0;
|
||||
}
|
||||
@@ -21,8 +36,9 @@ li {
|
||||
li:hover .large {
|
||||
left: 20px;
|
||||
top: -150px;
|
||||
z-index: 1;
|
||||
}
|
||||
.large-image {
|
||||
border-radius: 4px;
|
||||
box-shadow: 1px 1px 3px 3px rgba(127, 127, 127, 0.15);;
|
||||
box-shadow: 1px 1px 3px 3px rgba(127, 127, 127, 0.15);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user