Kaynağa Gözat

Only complain about non-TVDB entries in verbose mode

Zach Isbach 2 yıl önce
ebeveyn
işleme
704e67ea6c
1 değiştirilmiş dosya ile 4 ekleme ve 3 silme
  1. 4 3
      TVDB/main.py

+ 4 - 3
TVDB/main.py

@@ -23,7 +23,7 @@ def readConfigLine(file, opt=False):
           value = line.strip()
           value = line.strip()
           break
           break
   except Exception as error:
   except Exception as error:
-    if not opt:
+    if not opt or cli.verbose:
       print('Unable to read config: {e}'.format(e=error))
       print('Unable to read config: {e}'.format(e=error))
   return value
   return value
 
 
@@ -86,7 +86,7 @@ for file in dirfiles:
 # Fetch the TVDB episode list
 # Fetch the TVDB episode list
 try:
 try:
   apikey = readConfigLine(cli.api)
   apikey = readConfigLine(cli.api)
-  id = readConfigLine('.tvdb')
+  id = readConfigLine('.tvdb', opt=True)
 
 
   if cli.lang is not None:
   if cli.lang is not None:
     lang = cli.lang
     lang = cli.lang
@@ -103,7 +103,8 @@ try:
     order = default_order
     order = default_order
 
 
   if apikey is None or id is None:
   if apikey is None or id is None:
-    print('Invalid TVDB parameters')
+    if cli.verbose:
+      print('Invalid TVDB parameters')
     exit(1)
     exit(1)
   if cli.verbose:
   if cli.verbose:
     print('Series: {id}'.format(id=id))
     print('Series: {id}'.format(id=id))