Remove calice-score from read books
This commit is contained in:
parent
6ebe7d03fc
commit
4f116bc8bf
13
caliGraph.py
13
caliGraph.py
@ -582,10 +582,13 @@ class calibreDB():
|
||||
sco, rat = cls._requireCaliceColumn()
|
||||
for bookId in tqdm(scores):
|
||||
score = scores[bookId]
|
||||
if sco:
|
||||
cls._getTxt('set_custom calice_score '+str(bookId)+' '+str(round(score,5)))
|
||||
if rat:
|
||||
cls._getTxt('set_custom calice_rating '+str(bookId)+' '+str(int(round(score))))
|
||||
if score == '<clear>':
|
||||
cls._getTxt('set_custom calice_score '+str(bookId)+' ""')
|
||||
else:
|
||||
if sco:
|
||||
cls._getTxt('set_custom calice_score '+str(bookId)+' '+str(round(score,5)))
|
||||
if rat:
|
||||
cls._getTxt('set_custom calice_rating '+str(bookId)+' '+str(int(round(score))))
|
||||
|
||||
def calice(G):
|
||||
scores = {}
|
||||
@ -594,6 +597,8 @@ def calice(G):
|
||||
if node['t'] in ['book']:
|
||||
if 'score' in node and node['score'] != None:
|
||||
scores[node['calibreID']] = node['score']
|
||||
elif 'rating' in node:
|
||||
scores[node['calibreID']] = '<clear>'
|
||||
calibreDB.writeCaliceColumnMultiple(scores)
|
||||
print('Done.')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user