diff --git a/README.md b/README.md index 6ffc8212..09ffecab 100644 --- a/README.md +++ b/README.md @@ -451,6 +451,8 @@ note: if you add/remove a tag from `mte` you will need to run with `-e2tsr` once to rebuild the database, otherwise only new files will be affected +but instead of using `-mte`, `-mth` is a better way to hide tags in the browser: these tags will not be displayed by default, but they still get indexed and become searchable, and users can choose to unhide them in the settings pane + `-mtm` can be used to add or redefine a metadata mapping, say you have media files with `foo` and `bar` tags and you want them to display as `qux` in the browser (preferring `foo` if both are present), then do `-mtm qux=foo,bar` and now you can `-mte artist,title,qux` tags that start with a `.` such as `.bpm` and `.dur`(ation) indicate numeric value diff --git a/copyparty/__main__.py b/copyparty/__main__.py index ef881ad7..f5b7e85f 100644 --- a/copyparty/__main__.py +++ b/copyparty/__main__.py @@ -341,7 +341,9 @@ def run_argparse(argv, formatter): ap2.add_argument("--no-mtag-ff", action="store_true", help="never use FFprobe as tag reader") ap2.add_argument("-mtm", metavar="M=t,t,t", type=u, action="append", help="add/replace metadata mapping") ap2.add_argument("-mte", metavar="M,M,M", type=u, help="tags to index/display (comma-sep.)", - default="circle,album,.tn,artist,title,.bpm,key,.dur,.q,.vq,.aq,ac,vc,res,.fps") + default="circle,album,.tn,artist,title,.bpm,key,.dur,.q,.vq,.aq,vc,ac,res,.fps") + ap2.add_argument("-mth", metavar="M,M,M", type=u, help="tags to hide by default (comma-sep.)", + default=".vq,.aq,vc,ac,res,.fps") ap2.add_argument("-mtp", metavar="M=[f,]bin", type=u, action="append", help="read tag M using bin") ap2 = ap.add_argument_group('appearance options') diff --git a/copyparty/authsrv.py b/copyparty/authsrv.py index 9b2a91b2..3c786df6 100644 --- a/copyparty/authsrv.py +++ b/copyparty/authsrv.py @@ -624,9 +624,11 @@ class AuthSrv(object): if k1 in vol.flags: vol.flags[k2] = True - # default tag-list if unset + # default tag cfgs if unset if "mte" not in vol.flags: vol.flags["mte"] = self.args.mte + if "mth" not in vol.flags: + vol.flags["mth"] = self.args.mth # append parsers from argv to volume-flags self._read_volflag(vol.flags, "mtp", self.args.mtp, True) diff --git a/copyparty/httpcli.py b/copyparty/httpcli.py index 72420d36..858ae279 100644 --- a/copyparty/httpcli.py +++ b/copyparty/httpcli.py @@ -1755,7 +1755,7 @@ class HttpCli(object): "acct": self.uname, "perms": json.dumps(perms), "taglist": [], - "tag_order": [], + "def_hcols": [], "have_up2k_idx": ("e2d" in vn.flags), "have_tags_idx": ("e2t" in vn.flags), "have_mv": (not self.args.no_mv), @@ -1952,8 +1952,8 @@ class HttpCli(object): j2a["logues"] = logues j2a["taglist"] = taglist - if "mte" in vn.flags: - j2a["tag_order"] = json.dumps(vn.flags["mte"].split(",")) + if "mth" in vn.flags: + j2a["def_hcols"] = vn.flags["mth"].split(",") if self.args.css_browser: j2a["css"] = self.args.css_browser diff --git a/copyparty/web/browser.html b/copyparty/web/browser.html index d39a405c..abd3fd6d 100644 --- a/copyparty/web/browser.html +++ b/copyparty/web/browser.html @@ -125,7 +125,7 @@