From f2323b0dff3669b50810df645b3aada1ce593cd2 Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Sun, 24 May 2020 00:13:17 -0700 Subject: [PATCH] Sort import database tables --- plexpy/database.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plexpy/database.py b/plexpy/database.py index 00880e9a..d2de6ef9 100644 --- a/plexpy/database.py +++ b/plexpy/database.py @@ -103,7 +103,8 @@ def import_tautulli_db(database=None, method=None, backup=False): table_columns = {} tables = db.select('SELECT name FROM import_db.sqlite_master ' - 'WHERE type = "table" AND name NOT LIKE "sqlite_%"') + 'WHERE type = "table" AND name NOT LIKE "sqlite_%"' + 'ORDER BY name') for table in tables: table_name = table['name'] if table_name == 'sessions':