for (item_type,item_id,item_name,item_path,reg_date,item_title,annotation,format,fsize,cover,cover_type)inopdsdb.getitemsincat(slice_value,cfg.MAXITEMS,page_value):
for (item_type,item_id,item_name,item_path,reg_date,item_title,annotation,docdate,format,fsize,cover,cover_type)inopdsdb.getitemsincat(slice_value,cfg.MAXITEMS,page_value):
@@ -321,7 +322,7 @@ if type_value==13 or type_value==71:
letter="%"+searchTerm
header()
for (book_id,book_name,book_path,reg_date,book_title,annotation,format,fsize,cover,cover_type)inopdsdb.getbooksfortitle(letter,cfg.MAXITEMS,page_value,cfg.DUBLICATES_SHOW):
for (book_id,book_name,book_path,reg_date,book_title,annotation,docdate,format,fsize,cover,cover_type)inopdsdb.getbooksfortitle(letter,cfg.MAXITEMS,page_value,cfg.DUBLICATES_SHOW):
id='90'+str(book_id)
entry_start()
entry_head(book_title,reg_date,id_value)
@@ -329,7 +330,8 @@ if type_value==13 or type_value==71:
for (book_id,book_name,book_path,reg_date,book_title,annotation,format,fsize,cover,cover_type)inopdsdb.getbooksforgenre(slice_value,cfg.MAXITEMS,page_value,cfg.DUBLICATES_SHOW):
for (book_id,book_name,book_path,reg_date,book_title,annotation,docdate,format,fsize,cover,cover_type)inopdsdb.getbooksforgenre(slice_value,cfg.MAXITEMS,page_value,cfg.DUBLICATES_SHOW):
@@ -447,7 +451,7 @@ if type_value==12 or type_value==72:
#
iftype_value==22:
header()
for (book_id,book_name,book_path,reg_date,book_title,annotation,format,fsize,cover,cover_type)inopdsdb.getbooksforautor(slice_value,cfg.MAXITEMS,page_value,cfg.DUBLICATES_SHOW):
for (book_id,book_name,book_path,reg_date,book_title,annotation,docdate,format,fsize,cover,cover_type)inopdsdb.getbooksforautor(slice_value,cfg.MAXITEMS,page_value,cfg.DUBLICATES_SHOW):
sql_finditems=("select SQL_CALC_FOUND_ROWS 1,cat_id,cat_name,path,now(),cat_name as title,'' as annotation,'cat' as format, 0 as filesize, '' as cover, '' as cover_type from "+TBL_CATALOGS+" where parent_id="+str(cat_id)+" union all "
"select 2,book_id,filename,path,registerdate,title,annotation,format,filesize,cover,cover_type from "+TBL_BOOKS+" where cat_id="+str(cat_id)+" and avail!=0 order by 1,6 "+limitstr)
sql_finditems=("select SQL_CALC_FOUND_ROWS 1,cat_id,cat_name,path,now(),cat_name as title,'' as docdate,'' as annotation,'cat' as format, 0 as filesize, '' as cover, '' as cover_type from "+TBL_CATALOGS+" where parent_id="+str(cat_id)+" union all "
"select 2,book_id,filename,path,registerdate,title,annotation,docdate,format,filesize,cover,cover_type from "+TBL_BOOKS+" where cat_id="+str(cat_id)+" and avail!=0 order by 1,6 "+limitstr)
cursor=self.cnx.cursor()
cursor.execute(sql_finditems)
rows=cursor.fetchall()
@@ -307,7 +307,7 @@ class opdsDatabase:
returnrows
defgetbook(self,book_id):
sql_getbook=("select filename, path, registerdate, format, title, annotation, cat_type, cover, cover_type, filesize from "+TBL_BOOKS+" where book_id="+str(book_id)+" and avail!=0")
sql_getbook=("select filename, path, registerdate, format, title, annotation, docdate,cat_type, cover, cover_type, filesize from "+TBL_BOOKS+" where book_id="+str(book_id)+" and avail!=0")
cursor=self.cnx.cursor()
cursor.execute(sql_getbook)
row=cursor.fetchone()
@@ -361,7 +361,7 @@ class opdsDatabase:
dstr=''
else:
dstr=' and doublicat=0 '
sql="select SQL_CALC_FOUND_ROWS book_id,filename,path,registerdate,title,annotation,format,filesize,cover,cover_type from "+TBL_BOOKS+" where title like '"+letters+"%'"+dstr+" and avail!=0 order by title "+limitstr
sql="select SQL_CALC_FOUND_ROWS book_id,filename,path,registerdate,title,annotation,docdate,format,filesize,cover,cover_type from "+TBL_BOOKS+" where title like '"+letters+"%'"+dstr+" and avail!=0 order by title "+limitstr
cursor=self.cnx.cursor()
cursor.execute(sql)
rows=cursor.fetchall()
@@ -409,7 +409,7 @@ class opdsDatabase:
dstr=''
else:
dstr=' and a.doublicat=0 '
sql="select SQL_CALC_FOUND_ROWS a.book_id,a.filename,a.path,a.registerdate,a.title,a.annotation,a.format,a.filesize,a.cover,a.cover_type from "+TBL_BOOKS+" a, "+TBL_BAUTHORS+" b where a.book_id=b.book_id and b.author_id="+str(author_id)+dstr+" and a.avail!=0 order by a.title "+limitstr
sql="select SQL_CALC_FOUND_ROWS a.book_id,a.filename,a.path,a.registerdate,a.title,a.annotation,a.docdate,a.format,a.filesize,a.cover,a.cover_type from "+TBL_BOOKS+" a, "+TBL_BAUTHORS+" b where a.book_id=b.book_id and b.author_id="+str(author_id)+dstr+" and a.avail!=0 order by a.title "+limitstr
cursor=self.cnx.cursor()
cursor.execute(sql)
rows=cursor.fetchall()
@@ -429,7 +429,7 @@ class opdsDatabase:
limitstr=""
else:
limitstr="limit "+str(limit)
sql="select book_id,filename,path,registerdate,title,annotation,format,filesize,cover,cover_type from "+TBL_BOOKS+" where avail!=0 order by registerdate desc "+limitstr
sql="select book_id,filename,path,registerdate,title,annotation,docdate,format,filesize,cover,cover_type from "+TBL_BOOKS+" where avail!=0 order by registerdate desc "+limitstr
cursor=self.cnx.cursor()
cursor.execute(sql)
rows=cursor.fetchall()
@@ -461,7 +461,7 @@ class opdsDatabase:
dstr=''
else:
dstr=' and a.doublicat=0 '
sql="select SQL_CALC_FOUND_ROWS a.book_id,a.filename,a.path,a.registerdate,a.title,a.annotation,a.format,a.filesize,a.cover,a.cover_type from "+TBL_BOOKS+" a, "+TBL_BGENRES+" b where a.book_id=b.book_id and b.genre_id="+str(genre_id)+dstr+" and a.avail!=0 order by a.lang desc, a.title "+limitstr
sql="select SQL_CALC_FOUND_ROWS a.book_id,a.filename,a.path,a.registerdate,a.title,a.annotation,a.docdate,a.format,a.filesize,a.cover,a.cover_type from "+TBL_BOOKS+" a, "+TBL_BGENRES+" b where a.book_id=b.book_id and b.genre_id="+str(genre_id)+dstr+" and a.avail!=0 order by a.lang desc, a.title "+limitstr