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()
|
sco, rat = cls._requireCaliceColumn()
|
||||||
for bookId in tqdm(scores):
|
for bookId in tqdm(scores):
|
||||||
score = scores[bookId]
|
score = scores[bookId]
|
||||||
if sco:
|
if score == '<clear>':
|
||||||
cls._getTxt('set_custom calice_score '+str(bookId)+' '+str(round(score,5)))
|
cls._getTxt('set_custom calice_score '+str(bookId)+' ""')
|
||||||
if rat:
|
else:
|
||||||
cls._getTxt('set_custom calice_rating '+str(bookId)+' '+str(int(round(score))))
|
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):
|
def calice(G):
|
||||||
scores = {}
|
scores = {}
|
||||||
@ -594,6 +597,8 @@ def calice(G):
|
|||||||
if node['t'] in ['book']:
|
if node['t'] in ['book']:
|
||||||
if 'score' in node and node['score'] != None:
|
if 'score' in node and node['score'] != None:
|
||||||
scores[node['calibreID']] = node['score']
|
scores[node['calibreID']] = node['score']
|
||||||
|
elif 'rating' in node:
|
||||||
|
scores[node['calibreID']] = '<clear>'
|
||||||
calibreDB.writeCaliceColumnMultiple(scores)
|
calibreDB.writeCaliceColumnMultiple(scores)
|
||||||
print('Done.')
|
print('Done.')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user