* Simplified if condition.
authorUrban Wallasch <urban.wallasch@freenet.de>
Sun, 16 May 2021 19:32:49 +0000 (21:32 +0200)
committerUrban Wallasch <urban.wallasch@freenet.de>
Sun, 16 May 2021 19:32:49 +0000 (21:32 +0200)
ffpreview.py

index d1e59f6539e6609768acb07a2b75f10d29c59ae9..f4024d2a8d9bfcdd84f71fa963ba3fb68b24ac82 100755 (executable)
@@ -1127,11 +1127,10 @@ def get_indexfiles(path):
             entry['idx'] = True
             with open(fidx, 'r') as idxfile:
                 idx = json.load(idxfile)
-                if 'name' in idx:
-                    if 'path' in idx:
-                        opath = os.path.join(idx['path'], idx['name'])
-                        if os.path.isfile(opath):
-                            entry['vfile'] = opath
+                if 'name' in idx and 'path' in idx:
+                    opath = os.path.join(idx['path'], idx['name'])
+                    if os.path.isfile(opath):
+                        entry['vfile'] = opath
         flist.append(entry)
     flist = sorted(flist, key=lambda k: k['tdir'])
     eprint(3, json.dumps(flist, indent=2))