View Single Post
Old 09-20-2014, 07:28 AM   #2
plugin_dev
Junior Member
plugin_dev began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Sep 2014
Location: Edinburgh
Device: Kindle
I will say that if I follow the tutorial and update my code to have this:

Code:

    def run(self, path_to_ebook):
        '''
        NOP
        '''
        print "ZeroRatings::run(%s)" % path_to_ebook
        file = open(path_to_ebook, 'r+b')
        ext = os.path.splitext(path_to_ebook)[-1][1:].lower()
        mi = get_metadata(file, ext)
        mi.rating = 0
        set_metadata(file, mi, ext)
        return path_to_ebook
This works and sets the rating to zero for "Add Books | Add books from single directory" but not when I run "Add Books | Add books from ..".
plugin_dev is offline   Reply With Quote