From 6c59e9df6dcbf3cc2daaac9b40cdfe8a6859c690 Mon Sep 17 00:00:00 2001 From: zlg Date: Thu, 3 Jan 2019 05:40:16 -0800 Subject: vgstash: Add "notes" filter to schema The notes filter will return every game whose notes field is non-empty. Useful for client-building and/or automation. Run `vgstash init` after upgrading to recreate any missing (or new) filters. --- src/vgstash/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/vgstash/__init__.py b/src/vgstash/__init__.py index 37fe582..4c1df3b 100755 --- a/src/vgstash/__init__.py +++ b/src/vgstash/__init__.py @@ -33,7 +33,7 @@ DEFAULT_CONFIG = { } FILTERS = { - 'allgames': "SELECT * FROM games ORDER BY system, title", + 'allgames': "SELECT * FROM games ORDER BY system, title ASC", 'backlog': "SELECT * FROM games WHERE ownership > 0 AND progress > 0 AND progress < 3 ORDER BY system, title ASC", 'borrowing': "SELECT * FROM games WHERE ownership = 0 AND progress = 2 ORDER BY system, title ASC", 'complete': "SELECT * FROM games WHERE progress = 4 ORDER BY system, title ASC", @@ -41,6 +41,7 @@ FILTERS = { 'done': "SELECT * FROM games WHERE progress > 2 ORDER BY system, title ASC", 'incomplete': "SELECT * FROM games WHERE progress = 3 AND ownership > 0 ORDER BY system, title ASC", 'new': "SELECT * FROM games WHERE progress = 1 ORDER BY system, title ASC", + 'notes': "SELECT * FROM games WHERE notes NOT LIKE '' ORDER BY system, title ASC", 'owned': "SELECT * FROM games WHERE ownership > 0 ORDER BY system, title ASC", 'physical': "SELECT * FROM games WHERE ownership = 1 ORDER BY system, title ASC", 'playlog': "SELECT * FROM games WHERE ownership > 0 AND progress = 2 ORDER BY system, title ASC", -- cgit v1.2.3-54-g00ecf