Skip to content

Commit

Permalink
Update plex_dupefinder.py
Browse files Browse the repository at this point in the history
Fix l3uddz#43

UTF-8 logging helps with Windows who wants to ANSI log stuff that does not comply
  • Loading branch information
RandomRhythm authored Dec 15, 2024
1 parent 61e63c8 commit 0210c77
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plex_dupefinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
log_filename = os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), 'activity.log')
logging.basicConfig(
filename=log_filename,
encoding='utf-8',
level=logging.DEBUG,
format='[%(asctime)s] %(levelname)s - %(message)s',
datefmt='%H:%M:%S'
Expand Down Expand Up @@ -221,7 +222,7 @@ def write_decision(title=None, keeping=None, removed=None):
if removed:
lines.append('\tRemoving : %r\n' % removed)

with open(decision_filename, 'a') as fp:
with open(decision_filename, 'a', encoding="utf-8") as fp:
fp.writelines(lines)
return

Expand Down

0 comments on commit 0210c77

Please sign in to comment.