c.execute("SELECT tvdbId, title, path_substitution(path), languages, hearing_impaired, sonarrSeriesId, poster FROM table_shows ORDER BY title")
c.execute("SELECT COUNT(*) FROM table_shows")
missing_count=c.fetchone()
missing_count=missing_count[0]
page=request.GET.page
ifpage=="":
page="1"
offset=(int(page)-1)*15
max_page=(missing_count/15)+1
c.execute("SELECT tvdbId, title, path_substitution(path), languages, hearing_impaired, sonarrSeriesId, poster FROM table_shows ORDER BY title ASC LIMIT 15 OFFSET ?",(offset,))
data=c.fetchall()
c.execute("SELECT code2, name FROM table_settings_languages WHERE enabled = 1")