View Single Post
Old 01-09-2016, 11:19 AM   #20
Phssthpok
Age improves with wine.
Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.
 
Posts: 609
Karma: 95229
Join Date: Nov 2014
Device: Kindle Oasis, Kobo Libra II
Quote:
Originally Posted by kovidgoyal View Post
The list of file types calibre adds is based on a user preference, the logic for getting that list is

Code:
        if gprefs['auto_add_everything']:
            self.allowed = AllAllowed()
        else:
            self.allowed = AUTO_ADDED - frozenset(gprefs['blocked_auto_formats'])
Kovid,
Perhaps if you have a spare minute you could encapsulate this in a method that I (or anyone else who might need it) can use, to avoid having to duplicate your code?

Thanks!
Phssthpok is offline   Reply With Quote