mirror of
https://github.com/stashapp/CommunityScripts.git
synced 2026-04-17 09:33:01 -05:00
move config to config_example so config is untracked
any changes the user makes to config will be crushed by the plugin manager, this change will insure the config file is untracked so a users custom changes will remain between updates
This commit is contained in:
@@ -116,18 +116,18 @@ def compare_size(self, other):
|
||||
|
||||
|
||||
def compare_age(self, other):
|
||||
if not (self.mod_time and other.mod_time):
|
||||
if not (self.created_at and other.created_at):
|
||||
return
|
||||
if self.mod_time == other.mod_time:
|
||||
if self.created_at == other.created_at:
|
||||
return
|
||||
if self.mod_time < other.mod_time:
|
||||
if self.created_at < other.created_at:
|
||||
better, worse = self, other
|
||||
else:
|
||||
worse, better = self, other
|
||||
worse.remove_reason = "age"
|
||||
return (
|
||||
better,
|
||||
f"Choose Oldest: Δ:{worse.mod_time-better.mod_time} | {better.id} older than {worse.id}",
|
||||
f"Choose Oldest: Δ:{worse.created_at-better.created_at} | {better.id} older than {worse.id}",
|
||||
)
|
||||
|
||||
|
||||
@@ -12,8 +12,10 @@ except ModuleNotFoundError:
|
||||
"You need to install the stashapi module. (pip install stashapp-tools)",
|
||||
file=sys.stderr,
|
||||
)
|
||||
|
||||
import config
|
||||
try:
|
||||
import config
|
||||
except ModuleNotFoundError:
|
||||
log.error("Could not import 'config.py' did you copy and rename 'config_example.py'?")
|
||||
|
||||
FRAGMENT = json.loads(sys.stdin.read())
|
||||
MODE = FRAGMENT["args"]["mode"]
|
||||
|
||||
Reference in New Issue
Block a user