Only count maintags in `canto-remote status`
authorJack Miller <jack@codezen.org>
Fri, 7 Jul 2017 16:18:47 +0000 (11:18 -0500)
committerJack Miller <jack@codezen.org>
Fri, 14 Jul 2017 08:12:34 +0000 (03:12 -0500)
This keeps us from double counting items in user tags / categories.

canto_next/remote.py

index c7c1dbb..ef7f151 100644 (file)
@@ -546,7 +546,7 @@ class CantoRemote(PluginHandler, CantoClient):
 
             print("%s : %s" % (tag, self._numstate(tag, state)))
         else:
-            print("%s" % sum([self._numstate(tag, state) for tag in t ]))
+            print("%s" % sum([self._numstate(tag, state) for tag in t if tag.startswith("maintag:")]))
 
     def cmd_help(self):
         """USAGE: canto-remote help [command]"""