diff --git a/bazarr.py b/bazarr.py index 1fc02cbf4..bcbf288d9 100644 --- a/bazarr.py +++ b/bazarr.py @@ -100,12 +100,22 @@ def series(): db = sqlite3.connect(os.path.join(os.path.dirname(__file__), 'data/db/bazarr.db'), timeout=30) db.create_function("path_substitution", 1, path_replace) c = db.cursor() - 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 + if page == "": + 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") languages = c.fetchall() c.close() - output = template('series', rows=data, languages=languages, base_url=base_url) + output = template('series', rows=data, languages=languages, missing_count=missing_count, page=page, max_page=max_page, base_url=base_url) return output @route(base_url + 'edit_series/', method='POST') diff --git a/views/series.tpl b/views/series.tpl index 2b3d6fe7d..3d2cfcb4a 100644 --- a/views/series.tpl +++ b/views/series.tpl @@ -43,6 +43,11 @@ #divdetails { min-height: 250px; } + .fast.backward, .backward, .forward, .fast.forward { + cursor: pointer; + } + .fast.backward, .backward, .forward, .fast.forward { pointer-events: auto; } + .fast.backward.disabled, .backward.disabled, .forward.disabled, .fast.forward.disabled { pointer-events: none; } @@ -123,6 +128,35 @@ %end +
+
+
+
+ + + {{page}} / {{max_page}} + + +
+
Total records: {{missing_count}}
+
+