From 230ac545c436bc77b7ee9734e1981155b75afb94 Mon Sep 17 00:00:00 2001 From: LecygneNoir Date: Fri, 25 Dec 2020 09:59:23 +0100 Subject: [PATCH] Patch incorrect loading of NFO keys, breaking the match when the key contains -, and add example for auto-originalDate in NFO --- prismedia/samples/nfo.txt | 5 +++-- prismedia/utils.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/prismedia/samples/nfo.txt b/prismedia/samples/nfo.txt index 7b18585..af75d07 100644 --- a/prismedia/samples/nfo.txt +++ b/prismedia/samples/nfo.txt @@ -4,6 +4,7 @@ # Some generic options for your videos cca = True privacy = private -disable-comments = True +disable-comments = False channel = DefaultChannel -channelCreate = True \ No newline at end of file +channelCreate = True +auto-originalDate = True \ No newline at end of file diff --git a/prismedia/utils.py b/prismedia/utils.py index a971ac4..fcea677 100644 --- a/prismedia/utils.py +++ b/prismedia/utils.py @@ -200,7 +200,7 @@ def parseNFO(options): if nfo: # We need to check all options and replace it with the nfo value if not defined (None or False) for key, value in options.items(): - key = key.replace("-", "") + key = key.replace("--", "") try: # get string options if value is None and nfo.get('video', key):