copyparty 1.16.1__py3-none-any.whl → 1.16.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- copyparty/__main__.py +1 -0
- copyparty/__version__.py +2 -2
- copyparty/authsrv.py +64 -0
- copyparty/cfg.py +1 -0
- copyparty/httpcli.py +12 -47
- copyparty/httpsrv.py +1 -1
- copyparty/res/COPYING.txt +0 -64
- copyparty/u2idx.py +9 -0
- copyparty/up2k.py +5 -0
- copyparty/util.py +22 -5
- copyparty/web/a/u2c.py +2 -0
- copyparty/web/baguettebox.js.gz +0 -0
- copyparty/web/browser.css.gz +0 -0
- copyparty/web/browser.html +2 -3
- copyparty/web/browser.js.gz +0 -0
- copyparty/web/shares.js.gz +0 -0
- copyparty/web/splash.css.gz +0 -0
- copyparty/web/ui.css.gz +0 -0
- copyparty/web/up2k.js.gz +0 -0
- copyparty/web/util.js.gz +0 -0
- {copyparty-1.16.1.dist-info → copyparty-1.16.2.dist-info}/METADATA +8 -8
- {copyparty-1.16.1.dist-info → copyparty-1.16.2.dist-info}/RECORD +26 -26
- {copyparty-1.16.1.dist-info → copyparty-1.16.2.dist-info}/WHEEL +1 -1
- {copyparty-1.16.1.dist-info → copyparty-1.16.2.dist-info}/LICENSE +0 -0
- {copyparty-1.16.1.dist-info → copyparty-1.16.2.dist-info}/entry_points.txt +0 -0
- {copyparty-1.16.1.dist-info → copyparty-1.16.2.dist-info}/top_level.txt +0 -0
copyparty/__main__.py
CHANGED
@@ -1449,6 +1449,7 @@ def add_ui(ap, retry):
|
|
1449
1449
|
ap2.add_argument("--themes", metavar="NUM", type=int, default=8, help="number of themes installed")
|
1450
1450
|
ap2.add_argument("--au-vol", metavar="0-100", type=int, default=50, choices=range(0, 101), help="default audio/video volume percent")
|
1451
1451
|
ap2.add_argument("--sort", metavar="C,C,C", type=u, default="href", help="default sort order, comma-separated column IDs (see header tooltips), prefix with '-' for descending. Examples: \033[32mhref -href ext sz ts tags/Album tags/.tn\033[0m (volflag=sort)")
|
1452
|
+
ap2.add_argument("--nsort", action="store_true", help="default-enable natural sort of filenames with leading numbers (volflag=nsort)")
|
1452
1453
|
ap2.add_argument("--unlist", metavar="REGEX", type=u, default="", help="don't show files matching \033[33mREGEX\033[0m in file list. Purely cosmetic! Does not affect API calls, just the browser. Example: [\033[32m\\.(js|css)$\033[0m] (volflag=unlist)")
|
1453
1454
|
ap2.add_argument("--favico", metavar="TXT", type=u, default="c 000 none" if retry else "🎉 000 none", help="\033[33mfavicon-text\033[0m [ \033[33mforeground\033[0m [ \033[33mbackground\033[0m ] ], set blank to disable")
|
1454
1455
|
ap2.add_argument("--mpmc", metavar="URL", type=u, default="", help="change the mediaplayer-toggle mouse cursor; URL to a folder with {2..5}.png inside (or disable with [\033[32m.\033[0m])")
|
copyparty/__version__.py
CHANGED
copyparty/authsrv.py
CHANGED
@@ -360,6 +360,8 @@ class VFS(object):
|
|
360
360
|
self.ahtml = {}
|
361
361
|
self.aadmin = {}
|
362
362
|
self.adot = {}
|
363
|
+
self.js_ls = {}
|
364
|
+
self.js_htm = ""
|
363
365
|
|
364
366
|
if realpath:
|
365
367
|
rp = realpath + ("" if realpath.endswith(os.sep) else os.sep)
|
@@ -2297,6 +2299,68 @@ class AuthSrv(object):
|
|
2297
2299
|
cur.close()
|
2298
2300
|
db.close()
|
2299
2301
|
|
2302
|
+
self.js_ls = {}
|
2303
|
+
self.js_htm = {}
|
2304
|
+
for vn in self.vfs.all_nodes.values():
|
2305
|
+
vf = vn.flags
|
2306
|
+
vn.js_ls = {
|
2307
|
+
"idx": "e2d" in vf,
|
2308
|
+
"itag": "e2t" in vf,
|
2309
|
+
"dnsort": "nsort" in vf,
|
2310
|
+
"dsort": vf["sort"],
|
2311
|
+
"dcrop": vf["crop"],
|
2312
|
+
"dth3x": vf["th3x"],
|
2313
|
+
"u2ts": vf["u2ts"],
|
2314
|
+
"frand": bool(vf.get("rand")),
|
2315
|
+
"lifetime": vf.get("lifetime") or 0,
|
2316
|
+
"unlist": vf.get("unlist") or "",
|
2317
|
+
}
|
2318
|
+
js_htm = {
|
2319
|
+
"s_name": self.args.bname,
|
2320
|
+
"have_up2k_idx": "e2d" in vf,
|
2321
|
+
"have_acode": not self.args.no_acode,
|
2322
|
+
"have_shr": self.args.shr,
|
2323
|
+
"have_zip": not self.args.no_zip,
|
2324
|
+
"have_mv": not self.args.no_mv,
|
2325
|
+
"have_del": not self.args.no_del,
|
2326
|
+
"have_unpost": int(self.args.unpost),
|
2327
|
+
"have_emp": self.args.emp,
|
2328
|
+
"sb_md": "" if "no_sb_md" in vf else (vf.get("md_sbf") or "y"),
|
2329
|
+
"txt_ext": self.args.textfiles.replace(",", " "),
|
2330
|
+
"def_hcols": list(vf.get("mth") or []),
|
2331
|
+
"unlist0": vf.get("unlist") or "",
|
2332
|
+
"dgrid": "grid" in vf,
|
2333
|
+
"dgsel": "gsel" in vf,
|
2334
|
+
"dnsort": "nsort" in vf,
|
2335
|
+
"dsort": vf["sort"],
|
2336
|
+
"dcrop": vf["crop"],
|
2337
|
+
"dth3x": vf["th3x"],
|
2338
|
+
"dvol": self.args.au_vol,
|
2339
|
+
"idxh": int(self.args.ih),
|
2340
|
+
"themes": self.args.themes,
|
2341
|
+
"turbolvl": self.args.turbo,
|
2342
|
+
"u2j": self.args.u2j,
|
2343
|
+
"u2sz": self.args.u2sz,
|
2344
|
+
"u2ts": vf["u2ts"],
|
2345
|
+
"frand": bool(vf.get("rand")),
|
2346
|
+
"lifetime": vn.js_ls["lifetime"],
|
2347
|
+
"u2sort": self.args.u2sort,
|
2348
|
+
}
|
2349
|
+
vn.js_htm = json.dumps(js_htm)
|
2350
|
+
|
2351
|
+
vols = list(vfs.all_nodes.values())
|
2352
|
+
if enshare:
|
2353
|
+
vols.append(shv)
|
2354
|
+
vols.extend(list(shv.nodes.values()))
|
2355
|
+
|
2356
|
+
for vol in vols:
|
2357
|
+
dbv = vol.get_dbv("")[0]
|
2358
|
+
vol.js_ls = vol.js_ls or dbv.js_ls or {}
|
2359
|
+
vol.js_htm = vol.js_htm or dbv.js_htm or "{}"
|
2360
|
+
|
2361
|
+
zs = str(vol.flags.get("tcolor") or self.args.tcolor)
|
2362
|
+
vol.flags["tcolor"] = zs.lstrip("#")
|
2363
|
+
|
2300
2364
|
def load_sessions(self, quiet=False) :
|
2301
2365
|
# mutex me
|
2302
2366
|
if self.args.no_ses:
|
copyparty/cfg.py
CHANGED
copyparty/httpcli.py
CHANGED
@@ -243,7 +243,6 @@ class HttpCli(object):
|
|
243
243
|
ka["ts"] = self.conn.hsrv.cachebuster()
|
244
244
|
ka["lang"] = self.args.lang
|
245
245
|
ka["favico"] = self.args.favico
|
246
|
-
ka["s_name"] = self.args.bname
|
247
246
|
ka["s_doctitle"] = self.args.doctitle
|
248
247
|
ka["tcolor"] = self.vn.flags["tcolor"]
|
249
248
|
|
@@ -700,7 +699,7 @@ class HttpCli(object):
|
|
700
699
|
|
701
700
|
if pex.code != 404 or self.do_log:
|
702
701
|
self.log(
|
703
|
-
"%s\033[0m, %s" % (msg, self.vpath),
|
702
|
+
"http%d: %s\033[0m, %s" % (pex.code, msg, self.vpath),
|
704
703
|
6 if em.startswith("client d/c ") else 3,
|
705
704
|
)
|
706
705
|
|
@@ -1409,12 +1408,13 @@ class HttpCli(object):
|
|
1409
1408
|
vst = os.stat_result((16877, -1, -1, 1, 1000, 1000, 8, zi, zi, zi))
|
1410
1409
|
|
1411
1410
|
try:
|
1412
|
-
|
1411
|
+
st = bos.stat(tap)
|
1413
1412
|
except OSError as ex:
|
1414
1413
|
if ex.errno not in (errno.ENOENT, errno.ENOTDIR):
|
1415
1414
|
raise
|
1416
1415
|
raise Pebkac(404)
|
1417
1416
|
|
1417
|
+
topdir = {"vp": "", "st": st}
|
1418
1418
|
fgen = []
|
1419
1419
|
|
1420
1420
|
depth = self.headers.get("depth", "infinity").lower()
|
@@ -1450,6 +1450,12 @@ class HttpCli(object):
|
|
1450
1450
|
wrap=False,
|
1451
1451
|
)
|
1452
1452
|
|
1453
|
+
elif depth == "0" or not stat.S_ISDIR(st.st_mode):
|
1454
|
+
# propfind on a file; return as topdir
|
1455
|
+
if not self.can_read and not self.can_get:
|
1456
|
+
self.log("inaccessible: [%s]" % (self.vpath,))
|
1457
|
+
raise Pebkac(401, "authenticate")
|
1458
|
+
|
1453
1459
|
elif depth == "1":
|
1454
1460
|
_, vfs_ls, vfs_virt = vn.ls(
|
1455
1461
|
rem,
|
@@ -1468,9 +1474,6 @@ class HttpCli(object):
|
|
1468
1474
|
fgen = [{"vp": vp, "st": st} for vp, st in vfs_ls]
|
1469
1475
|
fgen += [{"vp": v, "st": vst} for v in vfs_virt]
|
1470
1476
|
|
1471
|
-
elif depth == "0":
|
1472
|
-
pass
|
1473
|
-
|
1474
1477
|
else:
|
1475
1478
|
t = "invalid depth value '{}' (must be either '0' or '1'{})"
|
1476
1479
|
t2 = " or 'infinity'" if self.args.dav_inf else ""
|
@@ -5474,61 +5477,28 @@ class HttpCli(object):
|
|
5474
5477
|
is_js = False
|
5475
5478
|
|
5476
5479
|
vf = vn.flags
|
5477
|
-
unlist = vf.get("unlist", "")
|
5478
5480
|
ls_ret = {
|
5479
5481
|
"dirs": [],
|
5480
5482
|
"files": [],
|
5481
5483
|
"taglist": [],
|
5482
5484
|
"srvinf": srv_infot,
|
5483
5485
|
"acct": self.uname,
|
5484
|
-
"idx": e2d,
|
5485
|
-
"itag": e2t,
|
5486
|
-
"dsort": vf["sort"],
|
5487
|
-
"dcrop": vf["crop"],
|
5488
|
-
"dth3x": vf["th3x"],
|
5489
|
-
"u2ts": vf["u2ts"],
|
5490
|
-
"lifetime": vn.flags.get("lifetime") or 0,
|
5491
|
-
"frand": bool(vn.flags.get("rand")),
|
5492
|
-
"unlist": unlist,
|
5493
5486
|
"perms": perms,
|
5487
|
+
"cfg": vn.js_ls,
|
5494
5488
|
}
|
5495
5489
|
cgv = {
|
5496
5490
|
"ls0": None,
|
5497
5491
|
"acct": self.uname,
|
5498
5492
|
"perms": perms,
|
5499
|
-
"u2ts": vf["u2ts"],
|
5500
|
-
"lifetime": ls_ret["lifetime"],
|
5501
|
-
"frand": bool(vn.flags.get("rand")),
|
5502
|
-
"def_hcols": [],
|
5503
|
-
"have_emp": self.args.emp,
|
5504
|
-
"have_up2k_idx": e2d,
|
5505
|
-
"have_acode": (not self.args.no_acode),
|
5506
|
-
"have_mv": (not self.args.no_mv),
|
5507
|
-
"have_del": (not self.args.no_del),
|
5508
|
-
"have_zip": (not self.args.no_zip),
|
5509
|
-
"have_shr": self.args.shr,
|
5510
|
-
"have_unpost": int(self.args.unpost),
|
5511
|
-
"sb_md": "" if "no_sb_md" in vf else (vf.get("md_sbf") or "y"),
|
5512
|
-
"dgrid": "grid" in vf,
|
5513
|
-
"dgsel": "gsel" in vf,
|
5514
|
-
"dsort": vf["sort"],
|
5515
|
-
"dcrop": vf["crop"],
|
5516
|
-
"dth3x": vf["th3x"],
|
5517
|
-
"dvol": self.args.au_vol,
|
5518
|
-
"themes": self.args.themes,
|
5519
|
-
"turbolvl": self.args.turbo,
|
5520
|
-
"u2j": self.args.u2j,
|
5521
|
-
"u2sz": self.args.u2sz,
|
5522
|
-
"idxh": int(self.args.ih),
|
5523
|
-
"u2sort": self.args.u2sort,
|
5524
5493
|
}
|
5525
5494
|
j2a = {
|
5495
|
+
"cgv1": vn.js_htm,
|
5526
5496
|
"cgv": cgv,
|
5527
5497
|
"vpnodes": vpnodes,
|
5528
5498
|
"files": [],
|
5529
5499
|
"ls0": None,
|
5530
5500
|
"taglist": [],
|
5531
|
-
"have_tags_idx": e2t,
|
5501
|
+
"have_tags_idx": int(e2t),
|
5532
5502
|
"have_b_u": (self.can_write and self.uparam.get("b") == "u"),
|
5533
5503
|
"sb_lg": "" if "no_sb_lg" in vf else (vf.get("lg_sbf") or "y"),
|
5534
5504
|
"url_suf": url_suf,
|
@@ -5899,17 +5869,12 @@ class HttpCli(object):
|
|
5899
5869
|
"dirs": dirs,
|
5900
5870
|
"files": files,
|
5901
5871
|
"taglist": taglist,
|
5902
|
-
"unlist": unlist,
|
5903
5872
|
}
|
5904
5873
|
j2a["files"] = []
|
5905
5874
|
else:
|
5906
5875
|
j2a["files"] = dirs + files
|
5907
5876
|
|
5908
5877
|
j2a["taglist"] = taglist
|
5909
|
-
j2a["txt_ext"] = self.args.textfiles.replace(",", " ")
|
5910
|
-
|
5911
|
-
if "mth" in vn.flags:
|
5912
|
-
j2a["def_hcols"] = list(vn.flags["mth"])
|
5913
5878
|
|
5914
5879
|
if add_og and "raw" not in self.uparam:
|
5915
5880
|
j2a["this"] = self
|
copyparty/httpsrv.py
CHANGED
@@ -132,7 +132,7 @@ class HttpSrv(object):
|
|
132
132
|
dls = {} # state
|
133
133
|
self.dli = self.tdli = dli
|
134
134
|
self.dls = self.tdls = dls
|
135
|
-
self.iiam = '<img src="%s.cpr/iiam.gif" />' % (self.args.SRS,)
|
135
|
+
self.iiam = '<img src="%s.cpr/iiam.gif?cache=i" />' % (self.args.SRS,)
|
136
136
|
|
137
137
|
self.bound = set()
|
138
138
|
self.name = "hsrv" + nsuf
|
copyparty/res/COPYING.txt
CHANGED
@@ -77,83 +77,19 @@ License: SIL OFL 1.1
|
|
77
77
|
|
78
78
|
[07m--- MIT License ---[0m
|
79
79
|
|
80
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
81
|
-
|
82
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
83
|
-
|
84
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
85
80
|
|
86
81
|
|
87
82
|
[07m--- ISC License ---[0m
|
88
83
|
|
89
|
-
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
|
90
|
-
|
91
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
92
84
|
|
93
85
|
|
94
86
|
[07m--- BSD 2-Clause License ---[0m
|
95
87
|
|
96
|
-
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
97
|
-
|
98
|
-
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
99
|
-
|
100
|
-
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
101
|
-
|
102
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
103
88
|
|
104
89
|
|
105
90
|
[07m--- BSD 3-Clause License ---[0m
|
106
91
|
|
107
|
-
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
108
|
-
|
109
|
-
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
110
|
-
|
111
|
-
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
112
|
-
|
113
|
-
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
114
|
-
|
115
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
116
92
|
|
117
93
|
|
118
94
|
[07m--- SIL Open Font License v1.1 ---[0m
|
119
95
|
|
120
|
-
PREAMBLE
|
121
|
-
|
122
|
-
The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others.
|
123
|
-
|
124
|
-
The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives.
|
125
|
-
|
126
|
-
DEFINITIONS
|
127
|
-
|
128
|
-
"Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation.
|
129
|
-
|
130
|
-
"Reserved Font Name" refers to any names specified as such after the copyright statement(s).
|
131
|
-
|
132
|
-
"Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s).
|
133
|
-
|
134
|
-
"Modified Version" refers to any derivative made by adding to, deleting, or substituting - in part or in whole - any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment.
|
135
|
-
|
136
|
-
"Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software.
|
137
|
-
|
138
|
-
PERMISSION & CONDITIONS
|
139
|
-
|
140
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions:
|
141
|
-
|
142
|
-
1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself.
|
143
|
-
|
144
|
-
2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user.
|
145
|
-
|
146
|
-
3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users.
|
147
|
-
|
148
|
-
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission.
|
149
|
-
|
150
|
-
5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software.
|
151
|
-
|
152
|
-
TERMINATION
|
153
|
-
|
154
|
-
This license becomes null and void if any of the above conditions are not met.
|
155
|
-
|
156
|
-
DISCLAIMER
|
157
|
-
|
158
|
-
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
|
159
|
-
|
copyparty/u2idx.py
CHANGED
@@ -66,6 +66,9 @@ class U2idx(object):
|
|
66
66
|
self.log_func("u2idx", msg, c)
|
67
67
|
|
68
68
|
def shutdown(self) :
|
69
|
+
if not HAVE_SQLITE3:
|
70
|
+
return
|
71
|
+
|
69
72
|
for cur in self.cur.values():
|
70
73
|
db = cur.connection
|
71
74
|
try:
|
@@ -76,6 +79,12 @@ class U2idx(object):
|
|
76
79
|
cur.close()
|
77
80
|
db.close()
|
78
81
|
|
82
|
+
for cur in (self.mem_cur, self.sh_cur):
|
83
|
+
if cur:
|
84
|
+
db = cur.connection
|
85
|
+
cur.close()
|
86
|
+
db.close()
|
87
|
+
|
79
88
|
def fsearch(
|
80
89
|
self, uname , vols , body
|
81
90
|
) :
|
copyparty/up2k.py
CHANGED
copyparty/util.py
CHANGED
@@ -2622,12 +2622,29 @@ def build_netmap(csv , defer_mutex = False):
|
|
2622
2622
|
if csv in ("any", "all", "no", ",", ""):
|
2623
2623
|
return None
|
2624
2624
|
|
2625
|
-
if csv in ("lan", "local", "private", "prvt"):
|
2626
|
-
csv = "10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, fd00::/8" # lan
|
2627
|
-
csv += ", 169.254.0.0/16, fe80::/10" # link-local
|
2628
|
-
csv += ", 127.0.0.0/8, ::1/128" # loopback
|
2629
|
-
|
2630
2625
|
srcs = [x.strip() for x in csv.split(",") if x.strip()]
|
2626
|
+
|
2627
|
+
expanded_shorthands = False
|
2628
|
+
for shorthand in ("lan", "local", "private", "prvt"):
|
2629
|
+
if shorthand in srcs:
|
2630
|
+
if not expanded_shorthands:
|
2631
|
+
srcs += [
|
2632
|
+
# lan:
|
2633
|
+
"10.0.0.0/8",
|
2634
|
+
"172.16.0.0/12",
|
2635
|
+
"192.168.0.0/16",
|
2636
|
+
"fd00::/8",
|
2637
|
+
# link-local:
|
2638
|
+
"169.254.0.0/16",
|
2639
|
+
"fe80::/10",
|
2640
|
+
# loopback:
|
2641
|
+
"127.0.0.0/8",
|
2642
|
+
"::1/128",
|
2643
|
+
]
|
2644
|
+
expanded_shorthands = True
|
2645
|
+
|
2646
|
+
srcs.remove(shorthand)
|
2647
|
+
|
2631
2648
|
if not HAVE_IPV6:
|
2632
2649
|
srcs = [x for x in srcs if ":" not in x]
|
2633
2650
|
|
copyparty/web/a/u2c.py
CHANGED
@@ -1088,6 +1088,8 @@ class Ctl(object):
|
|
1088
1088
|
|
1089
1089
|
spd = humansize(spd)
|
1090
1090
|
self.eta = str(datetime.timedelta(seconds=int(eta)))
|
1091
|
+
if eta > 2591999:
|
1092
|
+
self.eta = self.eta.split(",")[0] # truncate HH:MM:SS
|
1091
1093
|
sleft = humansize(self.nbytes - self.up_b)
|
1092
1094
|
nleft = self.nfiles - self.up_f
|
1093
1095
|
tail = "\033[K\033[u" if VT100 and not self.ar.ns else "\r"
|
copyparty/web/baguettebox.js.gz
CHANGED
Binary file
|
copyparty/web/browser.css.gz
CHANGED
Binary file
|
copyparty/web/browser.html
CHANGED
@@ -132,16 +132,15 @@
|
|
132
132
|
|
133
133
|
<script>
|
134
134
|
var SR = {{ r|tojson }},
|
135
|
+
CGV1 = {{ cgv1 }},
|
135
136
|
CGV = {{ cgv|tojson }},
|
136
137
|
TS = "{{ ts }}",
|
137
138
|
dtheme = "{{ dtheme }}",
|
138
139
|
srvinf = "{{ srv_info }}",
|
139
|
-
s_name = "{{ s_name }}",
|
140
140
|
lang = "{{ lang }}",
|
141
141
|
dfavico = "{{ favico }}",
|
142
|
-
have_tags_idx = {{ have_tags_idx
|
142
|
+
have_tags_idx = {{ have_tags_idx }},
|
143
143
|
sb_lg = "{{ sb_lg }}",
|
144
|
-
txt_ext = "{{ txt_ext }}",
|
145
144
|
logues = {{ logues|tojson if sb_lg else "[]" }},
|
146
145
|
ls0 = {{ ls0|tojson }};
|
147
146
|
|
copyparty/web/browser.js.gz
CHANGED
Binary file
|
copyparty/web/shares.js.gz
CHANGED
Binary file
|
copyparty/web/splash.css.gz
CHANGED
Binary file
|
copyparty/web/ui.css.gz
CHANGED
Binary file
|
copyparty/web/up2k.js.gz
CHANGED
Binary file
|
copyparty/web/util.js.gz
CHANGED
Binary file
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: copyparty
|
3
|
-
Version: 1.16.
|
4
|
-
Summary:
|
3
|
+
Version: 1.16.2
|
4
|
+
Summary: Portable file server with accelerated resumable uploads, deduplication, WebDAV, FTP, zeroconf, media indexer, video thumbnails, audio transcoding, and write-only folders
|
5
5
|
Author-email: ed <copyparty@ocv.me>
|
6
6
|
License: MIT
|
7
7
|
Project-URL: Source Code, https://github.com/9001/copyparty
|
@@ -37,6 +37,10 @@ Requires-Python: >=3.3
|
|
37
37
|
Description-Content-Type: text/markdown
|
38
38
|
License-File: LICENSE
|
39
39
|
Requires-Dist: Jinja2
|
40
|
+
Provides-Extra: thumbnails
|
41
|
+
Requires-Dist: Pillow; extra == "thumbnails"
|
42
|
+
Provides-Extra: thumbnails2
|
43
|
+
Requires-Dist: pyvips; extra == "thumbnails2"
|
40
44
|
Provides-Extra: audiotags
|
41
45
|
Requires-Dist: mutagen; extra == "audiotags"
|
42
46
|
Provides-Extra: ftpd
|
@@ -44,14 +48,10 @@ Requires-Dist: pyftpdlib; extra == "ftpd"
|
|
44
48
|
Provides-Extra: ftps
|
45
49
|
Requires-Dist: pyftpdlib; extra == "ftps"
|
46
50
|
Requires-Dist: pyopenssl; extra == "ftps"
|
47
|
-
Provides-Extra: pwhash
|
48
|
-
Requires-Dist: argon2-cffi; extra == "pwhash"
|
49
51
|
Provides-Extra: tftpd
|
50
52
|
Requires-Dist: partftpy>=0.4.0; extra == "tftpd"
|
51
|
-
Provides-Extra:
|
52
|
-
Requires-Dist:
|
53
|
-
Provides-Extra: thumbnails2
|
54
|
-
Requires-Dist: pyvips; extra == "thumbnails2"
|
53
|
+
Provides-Extra: pwhash
|
54
|
+
Requires-Dist: argon2-cffi; extra == "pwhash"
|
55
55
|
|
56
56
|
<img src="https://github.com/9001/copyparty/raw/hovudstraum/docs/logo.svg" width="250" align="right"/>
|
57
57
|
|
@@ -1,19 +1,19 @@
|
|
1
1
|
copyparty/__init__.py,sha256=iRCNvMPg6k9WG_O2uCtlkD4vWogH8EgP9elp9XwSIJs,2610
|
2
|
-
copyparty/__main__.py,sha256=
|
3
|
-
copyparty/__version__.py,sha256=
|
4
|
-
copyparty/authsrv.py,sha256=
|
2
|
+
copyparty/__main__.py,sha256=fbbMVr-sxhrn2fb9l44OnQ3XStmOoZJbq8FLrwZeel4,112528
|
3
|
+
copyparty/__version__.py,sha256=qkSYWTcO84wN8R56ATzvkttx7joci-cjVx1QjrUWw-8,252
|
4
|
+
copyparty/authsrv.py,sha256=QQGbliw2jOI86sNPUcx7rYeG39-LLSsfbJ1yWszFx5Y,102621
|
5
5
|
copyparty/broker_mp.py,sha256=QdOXXvV2Xn6J0CysEqyY3GZbqxQMyWnTpnba-a5lMc0,4987
|
6
6
|
copyparty/broker_mpw.py,sha256=PpSS4SK3pItlpfD8OwVr3QmJEPKlUgaf2nuMOozixgU,3347
|
7
7
|
copyparty/broker_thr.py,sha256=fjoYtpSscUA7-nMl4r1n2R7UK3J9lrvLS3rUZ-iJzKQ,1721
|
8
8
|
copyparty/broker_util.py,sha256=76mfnFOpX1gUUvtjm8UQI7jpTIaVINX10QonM-B7ggc,1680
|
9
9
|
copyparty/cert.py,sha256=0ZAPeXeMR164vWn9GQU3JDKooYXEq_NOQkDeg543ivg,8009
|
10
|
-
copyparty/cfg.py,sha256=
|
10
|
+
copyparty/cfg.py,sha256=0v_ZK3NCfzqBVLW7cheJr53IwIOIbHpgd-uYAeseyUc,10280
|
11
11
|
copyparty/dxml.py,sha256=lZpg-kn-kQsXRtNY1n6fRaS-b7uXzMCyv8ovKnhZcZc,1548
|
12
12
|
copyparty/fsutil.py,sha256=5CshJWO7CflfaRRNOb3JxghUH7W5rmS_HWNmKfx42MM,4538
|
13
13
|
copyparty/ftpd.py,sha256=T97SFS7JFtvRLbJX8C4fJSYwe13vhN3-E6emtlVmqLA,17608
|
14
|
-
copyparty/httpcli.py,sha256=
|
14
|
+
copyparty/httpcli.py,sha256=s0W2R7l-ZWAJi2A6pQhtF7E7iNKXeVuyk--ybNJhPhE,204841
|
15
15
|
copyparty/httpconn.py,sha256=mQSgljh0Q-jyWjF4tQLrHbRKRe9WKl19kGqsGMsJpWo,6880
|
16
|
-
copyparty/httpsrv.py,sha256=
|
16
|
+
copyparty/httpsrv.py,sha256=PXLZlT6iuJZYG9ajNsAaNgRK3UtS4CrOGFGXOpkRtOk,18235
|
17
17
|
copyparty/ico.py,sha256=eWSxEae4wOCfheHl-m-wchYvFRAR_97kJDb4NGaB-Z8,3561
|
18
18
|
copyparty/mdns.py,sha256=vC078llnL1v0pvL3mnwacuStFHPJUQuxo9Opj-IbHL4,18155
|
19
19
|
copyparty/metrics.py,sha256=EOIiPOItEQmdK9YgNb75l0kCzanWb6RtJGwMI7ufifY,8966
|
@@ -30,13 +30,13 @@ copyparty/tcpsrv.py,sha256=VuW_aVDcyXIhIMZ8I-wpIouX8MI9TGp7KKSRohrMTtk,19897
|
|
30
30
|
copyparty/tftpd.py,sha256=FRCALO3PigoBlwUrqxoKHM_xk7wT2O0GPG1TvNRtjOY,13606
|
31
31
|
copyparty/th_cli.py,sha256=o6FMkerYvAXS455z3DUossVztu_nzFlYSQhs6qN6Jt8,4636
|
32
32
|
copyparty/th_srv.py,sha256=LBcB4LpsF-H7L52Z0Dhn9LogRjJVPp1GKa8MeIMIBnw,29596
|
33
|
-
copyparty/u2idx.py,sha256=
|
34
|
-
copyparty/up2k.py,sha256=
|
35
|
-
copyparty/util.py,sha256=
|
33
|
+
copyparty/u2idx.py,sha256=_2nJlJb6a77Dt5KwK-TY5EnpIxWRVoiXTvk2sCGe6JI,13671
|
34
|
+
copyparty/up2k.py,sha256=LWq_VqZdrBDHNLX2pyK221hZfoQFDabWD5vOEBbP-xs,173731
|
35
|
+
copyparty/util.py,sha256=fUfkSBZwOjL4RbZ9UxP5Hi0TvRqy8GbL2oGEny_ikvw,94840
|
36
36
|
copyparty/bos/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
37
37
|
copyparty/bos/bos.py,sha256=Wb7eWsXJgR5AFlBR9ZOyKrLTwy-Kct9RrGiOu4Jo37Y,1622
|
38
38
|
copyparty/bos/path.py,sha256=yEjCq2ki9CvxA5sCT8pS0keEXwugs0ZeUyUhdBziOCI,777
|
39
|
-
copyparty/res/COPYING.txt,sha256=
|
39
|
+
copyparty/res/COPYING.txt,sha256=rrIzm8MDinQXNkaBZ_ipr3mAQNzRgTff9tPJNdjaPtY,2193
|
40
40
|
copyparty/res/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
41
41
|
copyparty/res/insecure.pem,sha256=FEt7jgrn6ZHTlFopq_LFAN027YIoaHi0HQFBbzYnEwc,2876
|
42
42
|
copyparty/stolen/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -54,10 +54,10 @@ copyparty/stolen/ifaddr/__init__.py,sha256=vpREjAyPubr5s1NJi91icXV3q1o4DrKAvHABw
|
|
54
54
|
copyparty/stolen/ifaddr/_posix.py,sha256=-67NdfGrCktfQPakT2fLbjl2U00QMvyBGkSvrUuTOrU,2626
|
55
55
|
copyparty/stolen/ifaddr/_shared.py,sha256=uNC4SdEIgdSLKvuUzsf1aM-H1Xrc_9mpLoOT43YukGs,6206
|
56
56
|
copyparty/stolen/ifaddr/_win32.py,sha256=EE-QyoBgeB7lYQ6z62VjXNaRozaYfCkaJBHGNA8QtZM,4026
|
57
|
-
copyparty/web/baguettebox.js.gz,sha256=
|
58
|
-
copyparty/web/browser.css.gz,sha256=
|
59
|
-
copyparty/web/browser.html,sha256=
|
60
|
-
copyparty/web/browser.js.gz,sha256=
|
57
|
+
copyparty/web/baguettebox.js.gz,sha256=_amC3ipOrXKEFz8DsVP-JEl49VjMQYiKyF78eWfG-uk,7965
|
58
|
+
copyparty/web/browser.css.gz,sha256=1BN6qfX6Zai3osSbW0Y5WFcqD4D7wiWYOVEb8zXYu9w,11643
|
59
|
+
copyparty/web/browser.html,sha256=KCkZ_LwzQnj9xhXKYptAxp6W3nVGiDoSJ4ioZDo7rQ0,4827
|
60
|
+
copyparty/web/browser.js.gz,sha256=YNp0XMA-fvOiEBymBv3Iti33cdrp3hP9WMqj_wL7g_U,88603
|
61
61
|
copyparty/web/browser2.html,sha256=NRUZ08GH-e2YcGXcoz0UjYg6JIVF42u4IMX4HHwWTmg,1587
|
62
62
|
copyparty/web/cf.html,sha256=lJThtNFNAQT1ClCHHlivAkDGE0LutedwopXD62Z8Nys,589
|
63
63
|
copyparty/web/dbg-audio.js.gz,sha256=Ma-KZtK8LnmiwNvNKFKXMPYl_Nn_3U7GsJ6-DRWC2HE,688
|
@@ -73,19 +73,19 @@ copyparty/web/msg.css.gz,sha256=u90fXYAVrMD-jqwf5XFVC1ptSpSHZUe8Mez6PX101P8,300
|
|
73
73
|
copyparty/web/msg.html,sha256=w9CM3hkLLGJX9fWEaG4gSbTOPe2GcPqW8BpSCDiFzOI,977
|
74
74
|
copyparty/web/shares.css.gz,sha256=T2fSezuluDVIiNIERAuUREByhHFlIwwNyx7EBOAVVyQ,499
|
75
75
|
copyparty/web/shares.html,sha256=ZNHtLBM-Y4BX2qa9AGTrZzZp_IP5PLM3QvFMYKolFfM,2494
|
76
|
-
copyparty/web/shares.js.gz,sha256=
|
77
|
-
copyparty/web/splash.css.gz,sha256=
|
76
|
+
copyparty/web/shares.js.gz,sha256=emeY2-wjkh8x1JgaW6ny5fcC7XpZzZzfE1f-sEyntQ4,940
|
77
|
+
copyparty/web/splash.css.gz,sha256=VxFqPvNdZtWb0u1C_GW2yYwrHq0lqPMitft9GYcv56k,1087
|
78
78
|
copyparty/web/splash.html,sha256=wc8El8_5BR3EMuVik8WYAkkEQ4S6-VepR1B1F8qAYgI,6190
|
79
79
|
copyparty/web/splash.js.gz,sha256=EEfsi9YGtPTYRB6MPX8Dfg4YyfqncI9ldJS7_MGVOhs,2710
|
80
80
|
copyparty/web/svcs.html,sha256=P5YZimYLeQMT0uz6u3clQSNZRc5Zs0Ok-ffcbcGSYuc,11762
|
81
81
|
copyparty/web/svcs.js.gz,sha256=k81ZvZ3I-f4fMHKrNGGOgOlvXnCBz0mVjD-8mieoWCA,520
|
82
|
-
copyparty/web/ui.css.gz,sha256=
|
83
|
-
copyparty/web/up2k.js.gz,sha256=
|
84
|
-
copyparty/web/util.js.gz,sha256=
|
82
|
+
copyparty/web/ui.css.gz,sha256=v8U-1tetZzuzTpITjq8NWj1gg3jEiYDIIE8aE0dx63k,2800
|
83
|
+
copyparty/web/up2k.js.gz,sha256=J8QY7CZH5Df3DN0ouDRDAM5derRgO_gRNzy5R5NilwM,23291
|
84
|
+
copyparty/web/util.js.gz,sha256=cciG6bEOr0bC4uQ0O5xTrcgjqolu6lKX-la81VfS_B8,14855
|
85
85
|
copyparty/web/w.hash.js.gz,sha256=l3GpSJD6mcU-1CRWkIj7PybgbjlfSr8oeO3vortIrQk,1105
|
86
86
|
copyparty/web/a/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
87
87
|
copyparty/web/a/partyfuse.py,sha256=9p5Hpg_IBiSimv7j9kmPhCGpy-FLXSRUOYnLjJ5JifU,28049
|
88
|
-
copyparty/web/a/u2c.py,sha256=
|
88
|
+
copyparty/web/a/u2c.py,sha256=n5CxOhwZ2C_GhiDMhUcbwuc6v-f4tS2xfoAF-djjIQU,50297
|
89
89
|
copyparty/web/a/webdav-cfg.bat,sha256=Y4NoGZlksAIg4cBMb7KdJrpKC6Nx97onaTl6yMjaimk,1449
|
90
90
|
copyparty/web/dd/2.png,sha256=gJ14XFPzaw95L6z92fSq9eMPikSQyu-03P1lgiGe0_I,258
|
91
91
|
copyparty/web/dd/3.png,sha256=4lho8Koz5tV7jJ4ODo6GMTScZfkqsT05yp48EDFIlyg,252
|
@@ -106,9 +106,9 @@ copyparty/web/deps/prismd.css.gz,sha256=ObUlksQVr-OuYlTz-I4B23TeBg2QDVVGRnWBz8cV
|
|
106
106
|
copyparty/web/deps/scp.woff2,sha256=w99BDU5i8MukkMEL-iW0YO9H4vFFZSPWxbkH70ytaAg,8612
|
107
107
|
copyparty/web/deps/sha512.ac.js.gz,sha256=lFZaCLumgWxrvEuDr4bqdKHsqjX82AbVAb7_F45Yk88,7033
|
108
108
|
copyparty/web/deps/sha512.hw.js.gz,sha256=vqoXeracj-99Z5MfY3jK2N4WiSzYQdfjy0RnUlQDhSU,8110
|
109
|
-
copyparty-1.16.
|
110
|
-
copyparty-1.16.
|
111
|
-
copyparty-1.16.
|
112
|
-
copyparty-1.16.
|
113
|
-
copyparty-1.16.
|
114
|
-
copyparty-1.16.
|
109
|
+
copyparty-1.16.2.dist-info/LICENSE,sha256=gOr4h33pCsBEg9uIy9AYmb7qlocL4V9t2uPJS5wllr0,1072
|
110
|
+
copyparty-1.16.2.dist-info/METADATA,sha256=55fGnCZfk0w7XNKhojXjou_rx5RSGFnOLkF-nUeqp_8,140284
|
111
|
+
copyparty-1.16.2.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
112
|
+
copyparty-1.16.2.dist-info/entry_points.txt,sha256=4zw6a3rqASywQomiYLObjjlxybaI65LYYOTJwgKz7b0,128
|
113
|
+
copyparty-1.16.2.dist-info/top_level.txt,sha256=LnYUPsDyk-8kFgM6YJLG4h820DQekn81cObKSu9g-sI,10
|
114
|
+
copyparty-1.16.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|