Quote:
Originally Posted by Comfy.n
Wheeeeeeeeeeee !!
That works lol!! NOW THE EMBLEM SHOWS UP INSTANTLY! (for any filetype)
I just added that line here:
Code:
for book_id in book_ids:
now = datetime.datetime.now()
viewdate = format_date(now, dateformat, assume_utc=False, as_utc=False)
db.set_custom(book_id, viewdate, label=label, commit=True)
self.gui.library_view.model().refresh_ids(book_ids)

|
FWIW: the refresh_ids should be after the loop, not in the loop. As it is the code is refreshing all books for every book, which could create a performance problem. I suggest
Code:
for book_id in book_ids:
now = datetime.datetime.now()
viewdate = format_date(now, dateformat, assume_utc=False, as_utc=False)
db.set_custom(book_id, viewdate, label=label, commit=True)
if book_ids:
self.gui.library_view.model().refresh_ids(book_ids)