Skip to content

Commit

Permalink
Merge pull request #198 from hockeygoalie35/dev
Browse files Browse the repository at this point in the history
ARLChecker v1.5
  • Loading branch information
RandomNinjaAtk authored Feb 14, 2024
2 parents eee29c3 + 5cd55b8 commit 92b9f3a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lidarr/ARLChecker
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/with-contenv bash
### Default values
scriptVersion="1.4"
scriptVersion="1.5"
scriptName="ARLChecker"
sleepInterval='24h'
### Import Settings
Expand Down
11 changes: 9 additions & 2 deletions lidarr/python/ARLChecker.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from dataclasses import dataclass
from requests import Session
from argparse import ArgumentParser
from sys import argv
from sys import argv, stdout
from colorama import Fore, init
from telegram import Update
from telegram.ext import ApplicationBuilder, ContextTypes, CommandHandler
Expand All @@ -17,12 +17,19 @@
if 'scriptVersion' in line:
VERSION = re.search(r'"([A-Za-z0-9_\./\\-]*)"', line)[0].replace('"','')

# Get current log file
path = '/config/logs'
latest_file = max([os.path.join(path, f) for f in os.listdir(path) if 'ARLChecker' in f],key=os.path.getctime)

# Logging Setup
logging.basicConfig(
format=f'%(asctime)s :: ARLChecker :: {VERSION} :: %(levelname)s :: %(message)s',
datefmt='%Y-%m-%d %H:%M:%S',
level=logging.INFO
level=logging.INFO,
handlers=[
logging.StreamHandler(stdout),
logging.FileHandler(latest_file, mode="a")
]
)
logger = logging.getLogger(__name__)

Expand Down

0 comments on commit 92b9f3a

Please sign in to comment.