opds1 -> opds

This commit is contained in:
AppleTheGolden 2025-09-09 22:40:16 +02:00
parent 22b7db66f1
commit 41cca9e39b
No known key found for this signature in database
GPG key ID: F6AC8A62154C42AA
3 changed files with 5 additions and 5 deletions

View file

@ -6225,7 +6225,7 @@ class HttpCli(object):
add_og = "og" in vn.flags add_og = "og" in vn.flags
if add_og: if add_og:
if "th" in self.uparam or "raw" in self.uparam or "opds1" in self.uparam: if "th" in self.uparam or "raw" in self.uparam or "opds" in self.uparam:
add_og = False add_og = False
elif vn.flags["og_ua"]: elif vn.flags["og_ua"]:
add_og = vn.flags["og_ua"].search(self.ua) add_og = vn.flags["og_ua"].search(self.ua)
@ -6440,14 +6440,14 @@ class HttpCli(object):
if "b" in self.uparam: if "b" in self.uparam:
tpl = "browser2" tpl = "browser2"
is_js = False is_js = False
elif "opds1" in self.uparam: elif "opds" in self.uparam:
# Display directory listing as OPDS v1.2 catalog feed # Display directory listing as OPDS v1.2 catalog feed
if not (self.args.opds or "opds" in self.vn.flags): if not (self.args.opds or "opds" in self.vn.flags):
raise Pebkac(405, "OPDS is disabled in server config") raise Pebkac(405, "OPDS is disabled in server config")
if not self.can_read: if not self.can_read:
raise Pebkac(401, "OPDS requires read permission") raise Pebkac(401, "OPDS requires read permission")
is_opds = True is_opds = True
tpl = "opds1" tpl = "opds"
is_js = False is_js = False
vf = vn.flags vf = vn.flags
@ -6671,7 +6671,7 @@ class HttpCli(object):
mime = None mime = None
if is_opds: if is_opds:
href += "&" if "?" in href else "?" href += "&" if "?" in href else "?"
href += "opds1" href += "opds"
if not is_dir: if not is_dir:
if "rmagic" in self.vn.flags: if "rmagic" in self.vn.flags:
mime = guess_mime(fn, fspath) mime = guess_mime(fn, fspath)

View file

@ -185,7 +185,7 @@ class HttpSrv(object):
"shares", "shares",
"splash", "splash",
"svcs", "svcs",
"opds1", # TODO: not actually html "opds", # TODO: not actually html
] ]
self.j2 = {x: env.get_template(x + ".html") for x in jn} self.j2 = {x: env.get_template(x + ".html") for x in jn}
self.prism = has_resource(self.E, "web/deps/prism.js.gz") self.prism = has_resource(self.E, "web/deps/prism.js.gz")