Browse Source

Skip faulty desktop files when updating program database

master
Nils 4 years ago
parent
commit
868a3a2d4c
  1. 7
      engine/findprograms.py

7
engine/findprograms.py

@ -52,7 +52,7 @@ class SupportedProgramsDatabase(object):
"""
def __init__(self):
self.blacklist = ("nsmd", "non-daw", "carla")
self.blacklist = ("nsmd", "non-daw", "carla") #only programs that have to do with audio and music. There is another general blacklist that speeds up discovery
self.morePrograms = ("thisdoesnotexisttest", "carla-rack", "carla-patchbay", "carla-jack-multi", "ardour5", "ardour6", "nsm-data", "nsm-jack") #only programs not found by buildCache_grepExecutablePaths because they are just shellscripts and do not contain /nsm/server/announce.
self.userWhitelist = () #added dynamically to morePrograms
self.userBlacklist = () #added dynamically to blacklist
@ -111,7 +111,10 @@ class SupportedProgramsDatabase(object):
for f in basePath.glob('**/*'):
if f.is_file() and f.suffix == ".desktop":
config.clear()
config.read(f)
try:
config.read(f)
except: #any bad config means skip
continue #next file
entryDict = dict(config._sections["Desktop Entry"])
if f.name == "zynaddsubfx-jack.desktop":
self.knownDesktopFiles["zynaddsubfx"] = entryDict

Loading…
Cancel
Save