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:
stg-annon
2024-02-14 15:27:43 -05:00
parent acf1ae4140
commit 2eef4b6a86
2 changed files with 8 additions and 6 deletions

View File

@@ -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}",
)

View File

@@ -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"]