1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-11-14 05:44:53 +00:00

updated Books string repr

This commit is contained in:
Daniel 2023-05-27 15:55:54 +02:00
parent e45619f226
commit a936a333a8

View File

@ -381,11 +381,12 @@ class Books(Base):
self.has_cover = (has_cover != None) self.has_cover = (has_cover != None)
def __repr__(self): def __repr__(self):
return "<Books('{0},{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}')>".format(self.title, self.sort, self.author_sort, return "<Books('{0} , {1} {2} {3} {4} {5} {6} {7} {8} {9} {10} {11}')>".format(self.title, self.sort, self.author_sort,
self.timestamp, self.pubdate, self.series_index, self.timestamp, self.pubdate, self.series_index,
self.last_modified, self.path, self.has_cover, self.last_modified, self.path, self.has_cover,
[tag.name for tag in self.tags], " ".join([tag.name for tag in self.tags]),
[series.name for series in self.series]) " ".join([series.name for series in self.series]), " ".join([author.name for author in self.authors])," ".join([publisher.name for publisher in self.publishers]))
@property @property
def atom_timestamp(self): def atom_timestamp(self):
@ -959,7 +960,6 @@ class CalibreDB:
sorted(result,key=lambda book:1) sorted(result,key=lambda book:1)
for res in result: for res in result:
print(res[0]) print(res[0])
print(f"{res[0].title} {[tag.name for tag in res[0].tags]} {[series.name for series in res[0].series]}")
result_count = len(result) result_count = len(result)
if offset != None and limit != None: if offset != None and limit != None:
offset = int(offset) offset = int(offset)