copyparty 1.16.21__py3-none-any.whl → 1.17.0__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 CHANGED
@@ -1017,7 +1017,7 @@ def add_upload(ap):
1017
1017
  ap2.add_argument("--df", metavar="GiB", type=u, default="0", help="ensure \033[33mGiB\033[0m free disk space by rejecting upload requests; assumes gigabytes unless a unit suffix is given: [\033[32m256m\033[0m], [\033[32m4\033[0m], [\033[32m2T\033[0m] (volflag=df)")
1018
1018
  ap2.add_argument("--sparse", metavar="MiB", type=int, default=4, help="windows-only: minimum size of incoming uploads through up2k before they are made into sparse files")
1019
1019
  ap2.add_argument("--turbo", metavar="LVL", type=int, default=0, help="configure turbo-mode in up2k client; [\033[32m-1\033[0m] = forbidden/always-off, [\033[32m0\033[0m] = default-off and warn if enabled, [\033[32m1\033[0m] = default-off, [\033[32m2\033[0m] = on, [\033[32m3\033[0m] = on and disable datecheck")
1020
- ap2.add_argument("--u2j", metavar="JOBS", type=int, default=2, help="web-client: number of file chunks to upload in parallel; 1 or 2 is good for low-latency (same-country) connections, 4-8 for android clients, 16 for cross-atlantic (max=64)")
1020
+ ap2.add_argument("--u2j", metavar="JOBS", type=int, default=2, help="web-client: number of file chunks to upload in parallel; 1 or 2 is good when latency is low (same-country), 2~4 for android-clients, 2~6 for cross-atlantic. Max is 6 in most browsers. Big values increase network-speed but may reduce HDD-speed")
1021
1021
  ap2.add_argument("--u2sz", metavar="N,N,N", type=u, default="1,64,96", help="web-client: default upload chunksize (MiB); sets \033[33mmin,default,max\033[0m in the settings gui. Each HTTP POST will aim for \033[33mdefault\033[0m, and never exceed \033[33mmax\033[0m. Cloudflare max is 96. Big values are good for cross-atlantic but may increase HDD fragmentation on some FS. Disable this optimization with [\033[32m1,1,1\033[0m]")
1022
1022
  ap2.add_argument("--u2ow", metavar="NUM", type=int, default=0, help="web-client: default setting for when to replace/overwrite existing files; [\033[32m0\033[0m]=never, [\033[32m1\033[0m]=if-client-newer, [\033[32m2\033[0m]=always (volflag=u2ow)")
1023
1023
  ap2.add_argument("--u2sort", metavar="TXT", type=u, default="s", help="upload order; [\033[32ms\033[0m]=smallest-first, [\033[32mn\033[0m]=alphabetical, [\033[32mfs\033[0m]=force-s, [\033[32mfn\033[0m]=force-n -- alphabetical is a bit slower on fiber/LAN but makes it easier to eyeball if everything went fine")
@@ -1300,6 +1300,9 @@ def add_salt(ap, fk_salt, dk_salt, ah_salt):
1300
1300
  ap2.add_argument("--fk-salt", metavar="SALT", type=u, default=fk_salt, help="per-file accesskey salt; used to generate unpredictable URLs for hidden files")
1301
1301
  ap2.add_argument("--dk-salt", metavar="SALT", type=u, default=dk_salt, help="per-directory accesskey salt; used to generate unpredictable URLs to share folders with users who only have the 'get' permission")
1302
1302
  ap2.add_argument("--warksalt", metavar="SALT", type=u, default="hunter2", help="up2k file-hash salt; serves no purpose, no reason to change this (but delete all databases if you do)")
1303
+ ap2.add_argument("--show-ah-salt", action="store_true", help="on startup, print the effective value of \033[33m--ah-salt\033[0m (the autogenerated value in $XDG_CONFIG_HOME unless otherwise specified)")
1304
+ ap2.add_argument("--show-fk-salt", action="store_true", help="on startup, print the effective value of \033[33m--fk-salt\033[0m (the autogenerated value in $XDG_CONFIG_HOME unless otherwise specified)")
1305
+ ap2.add_argument("--show-dk-salt", action="store_true", help="on startup, print the effective value of \033[33m--dk-salt\033[0m (the autogenerated value in $XDG_CONFIG_HOME unless otherwise specified)")
1303
1306
 
1304
1307
 
1305
1308
  def add_shutdown(ap):
@@ -1341,7 +1344,7 @@ def add_admin(ap):
1341
1344
 
1342
1345
  def add_thumbnail(ap):
1343
1346
  th_ram = (RAM_AVAIL or RAM_TOTAL or 9) * 0.6
1344
- th_ram = int(max(min(th_ram, 6), 1) * 10) / 10
1347
+ th_ram = int(max(min(th_ram, 6), 0.3) * 10) / 10
1345
1348
  ap2 = ap.add_argument_group('thumbnail options')
1346
1349
  ap2.add_argument("--no-thumb", action="store_true", help="disable all thumbnails (volflag=dthumb)")
1347
1350
  ap2.add_argument("--no-vthumb", action="store_true", help="disable video thumbnails (volflag=dvthumb)")
copyparty/__version__.py CHANGED
@@ -1,8 +1,8 @@
1
1
  # coding: utf-8
2
2
 
3
- VERSION = (1, 16, 21)
4
- CODENAME = "COPYparty"
5
- BUILD_DT = (2025, 4, 20)
3
+ VERSION = (1, 17, 0)
4
+ CODENAME = "mixtape.m3u"
5
+ BUILD_DT = (2025, 4, 26)
6
6
 
7
7
  S_VERSION = ".".join(map(str, VERSION))
8
8
  S_BUILD_DT = "{0:04d}-{1:02d}-{2:02d}".format(*BUILD_DT)
copyparty/svchub.py CHANGED
@@ -247,6 +247,14 @@ class SvcHub(object):
247
247
  setattr(args, "ipu_iu", iu)
248
248
  setattr(args, "ipu_nm", nm)
249
249
 
250
+ for zs in "ah_salt fk_salt dk_salt".split():
251
+ if getattr(args, "show_%s" % (zs,)):
252
+ self.log("root", "effective %s is %s" % (zs, getattr(args, zs)))
253
+
254
+ if args.ah_cli or args.ah_gen:
255
+ args.no_ses = True
256
+ args.shr = ""
257
+
250
258
  if not self.args.no_ses:
251
259
  self.setup_session_db()
252
260
 
copyparty/util.py CHANGED
@@ -451,6 +451,8 @@ FN_EMB = set([".prologue.html", ".epilogue.html", "readme.md", "preadme.md"])
451
451
 
452
452
 
453
453
  def read_ram() :
454
+ # NOTE: apparently no need to consider /sys/fs/cgroup/memory.max
455
+ # (cgroups2) since the limit is synced to /proc/meminfo
454
456
  a = b = 0
455
457
  try:
456
458
  with open("/proc/meminfo", "rb", 0x10000) as f:
Binary file
Binary file
copyparty/web/util.js.gz CHANGED
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: copyparty
3
- Version: 1.16.21
3
+ Version: 1.17.0
4
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
@@ -108,6 +108,8 @@ turn almost any device into a file server with resumable uploads/downloads using
108
108
  * [rss feeds](#rss-feeds) - monitor a folder with your RSS reader
109
109
  * [recent uploads](#recent-uploads) - list all recent uploads
110
110
  * [media player](#media-player) - plays almost every audio format there is
111
+ * [playlists](#playlists) - create and play [m3u8](https://en.wikipedia.org/wiki/M3U) playlists
112
+ * [creating a playlist](#creating-a-playlist) - with a standalone mediaplayer or copyparty
111
113
  * [audio equalizer](#audio-equalizer) - and [dynamic range compressor](https://en.wikipedia.org/wiki/Dynamic_range_compression)
112
114
  * [fix unreliable playback on android](#fix-unreliable-playback-on-android) - due to phone / app settings
113
115
  * [markdown viewer](#markdown-viewer) - and there are *two* editors
@@ -309,6 +311,7 @@ also see [comparison to similar software](./docs/versus.md)
309
311
  * ☑ file manager (cut/paste, delete, [batch-rename](#batch-rename))
310
312
  * ☑ audio player (with [OS media controls](https://user-images.githubusercontent.com/241032/215347492-b4250797-6c90-4e09-9a4c-721edf2fb15c.png) and opus/mp3 transcoding)
311
313
  * ☑ play video files as audio (converted on server)
314
+ * ☑ create and play [m3u8 playlists](#playlists)
312
315
  * ☑ image gallery with webm player
313
316
  * ☑ textfile browser with syntax hilighting
314
317
  * ☑ [thumbnails](#thumbnails)
@@ -1102,6 +1105,7 @@ open the `[🎺]` media-player-settings tab to configure it,
1102
1105
  * `[full]` does a full preload by downloading the entire next file; good for unreliable connections, bad for slow connections
1103
1106
  * `[~s]` toggles the seekbar waveform display
1104
1107
  * `[/np]` enables buttons to copy the now-playing info as an irc message
1108
+ * `[📻]` enables buttons to create an [m3u playlist](#playlists) with the selected songs
1105
1109
  * `[os-ctl]` makes it possible to control audio playback from the lockscreen of your device (enables [mediasession](https://developer.mozilla.org/en-US/docs/Web/API/MediaSession))
1106
1110
  * `[seek]` allows seeking with lockscreen controls (buggy on some devices)
1107
1111
  * `[art]` shows album art on the lockscreen
@@ -1120,11 +1124,39 @@ open the `[🎺]` media-player-settings tab to configure it,
1120
1124
  * "transcode to":
1121
1125
  * `[opus]` produces an `opus` whenever transcoding is necessary (the best choice on Android and PCs)
1122
1126
  * `[awo]` is `opus` in a `weba` file, good for iPhones (iOS 17.5 and newer) but Apple is still fixing some state-confusion bugs as of iOS 18.2.1
1123
- * `[caf]` is `opus` in a `caf` file, good for iPhones (iOS 11 through 17), technically unsupported by Apple but works for the mos tpart
1127
+ * `[caf]` is `opus` in a `caf` file, good for iPhones (iOS 11 through 17), technically unsupported by Apple but works for the most part
1124
1128
  * `[mp3]` -- the myth, the legend, the undying master of mediocre sound quality that definitely works everywhere
1125
1129
  * "tint" reduces the contrast of the playback bar
1126
1130
 
1127
1131
 
1132
+ ### playlists
1133
+
1134
+ create and play [m3u8](https://en.wikipedia.org/wiki/M3U) playlists -- see example [text](https://a.ocv.me/pub/demo/music/?doc=example-playlist.m3u) and [player](https://a.ocv.me/pub/demo/music/#m3u=example-playlist.m3u)
1135
+
1136
+ click a file with the extension `m3u` or `m3u8` (for example `mixtape.m3u` or `touhou.m3u8` ) and you get two choices: Play / Edit
1137
+
1138
+ playlists can include songs across folders anywhere on the server, but filekeys/dirkeys are NOT supported, so the listener must have read-access or get-access to the files
1139
+
1140
+
1141
+ ### creating a playlist
1142
+
1143
+ with a standalone mediaplayer or copyparty
1144
+
1145
+ you can use foobar2000, deadbeef, just about any standalone player should work -- but you might need to edit the filepaths in the playlist so they fit with the server-URLs
1146
+
1147
+ alternatively, you can create the playlist using copyparty itself:
1148
+
1149
+ * open the `[🎺]` media-player-settings tab and enable the `[📻]` create-playlist feature -- this adds two new buttons in the bottom-right tray, `[📻add]` and `[📻copy]` which appear when you listen to music, or when you select a few audiofiles
1150
+
1151
+ * click the `📻add` button while a song is playing (or when you've selected some songs) and they'll be added to "the list" (you can't see it yet)
1152
+
1153
+ * at any time, click `📻copy` to send the playlist to your clipboard
1154
+ * you can then continue adding more songs if you'd like
1155
+ * if you want to wipe the playlist and start from scratch, just refresh the page
1156
+
1157
+ * create a new textfile, name it `something.m3u` and paste the playlist there
1158
+
1159
+
1128
1160
  ### audio equalizer
1129
1161
 
1130
1162
  and [dynamic range compressor](https://en.wikipedia.org/wiki/Dynamic_range_compression)
@@ -2446,6 +2478,8 @@ copyparty returns a truncated sha512sum of your PUT/POST as base64; you can gene
2446
2478
 
2447
2479
  you can provide passwords using header `PW: hunter2`, cookie `cppwd=hunter2`, url-param `?pw=hunter2`, or with basic-authentication (either as the username or password)
2448
2480
 
2481
+ > for basic-authentication, all of the following are accepted: `password` / `whatever:password` / `password:whatever` (the username is ignored)
2482
+
2449
2483
  NOTE: curl will not send the original filename if you use `-T` combined with url-params! Also, make sure to always leave a trailing slash in URLs unless you want to override the filename
2450
2484
 
2451
2485
 
@@ -1,6 +1,6 @@
1
1
  copyparty/__init__.py,sha256=TnFSStmHlwlRIClWW8jSHxZpt3dl_kN6_pEnqBqh3mE,2638
2
- copyparty/__main__.py,sha256=CpLrZnUB6NZLjUTV5Z5deaR2PkVcmaz5USgv0Ufs4K8,119405
3
- copyparty/__version__.py,sha256=VMLa4h9U-dGYpIY1KfH1iBCZ1snRW76WxbQE5npykwo,252
2
+ copyparty/__main__.py,sha256=dJaY-3WD04xo1rf2YsEhTsQ5ywg4qttImmL5PdO58Bo,120099
3
+ copyparty/__version__.py,sha256=SayyDzASpFZQ7quvxJVu76GJKarGmrfz_Lfx8aEzc84,253
4
4
  copyparty/authsrv.py,sha256=S4HrUq-C6wpe_IT3KN75yo9GJw9Uzj5y558ooYCQqng,113286
5
5
  copyparty/broker_mp.py,sha256=QdOXXvV2Xn6J0CysEqyY3GZbqxQMyWnTpnba-a5lMc0,4987
6
6
  copyparty/broker_mpw.py,sha256=PpSS4SK3pItlpfD8OwVr3QmJEPKlUgaf2nuMOozixgU,3347
@@ -24,7 +24,7 @@ copyparty/smbd.py,sha256=dixFl2wlWymq_Cycc8a4cVB4gY8RSg2e3tE7Xr-aDa0,14614
24
24
  copyparty/ssdp.py,sha256=R1Z61GZOxBMF2Sk4RTxKWMOemogmcjEWG-CvLihd45k,7023
25
25
  copyparty/star.py,sha256=tV5BbX6AiQ7N4UU8DYtSTckNYeoeey4DBqq4LjfymbY,3818
26
26
  copyparty/sutil.py,sha256=6zEEGl4hRe6bTB83Y_RtnBGxr2JcUa__GdiAMqNJZnY,3208
27
- copyparty/svchub.py,sha256=Fn-qmJHtfZ0BgvRDCSPs0uqYg90kGj80a8KyEMLcd_I,46337
27
+ copyparty/svchub.py,sha256=leERN449te_yBbyChcOenjY_nuNPoFJpncLHfDMvDYE,46618
28
28
  copyparty/szip.py,sha256=9srQzjsTBrBadf6QMh4YRAL70rkZLevAOHqXWK5jvr8,8846
29
29
  copyparty/tcpsrv.py,sha256=F5K4Qr4eBLfhdLT_39yDf6ftrhWuGTrd6DSqqp_6e-Q,20480
30
30
  copyparty/tftpd.py,sha256=HAXNbIM7I3yFng_a4ubLWGQ4trRTineAZsUPTZDWNQs,14001
@@ -32,7 +32,7 @@ copyparty/th_cli.py,sha256=IEX5tCb0gw9Z2aRIDL9bwdvJ6g5jhWZ8OEAAz16_xN4,5426
32
32
  copyparty/th_srv.py,sha256=ibEQL9LSYcwo7YXSaW5hNmH1SZex8Pud7-dsSkBRQ-A,32544
33
33
  copyparty/u2idx.py,sha256=4Y5OOPyVkc-pS0z6e3p4StXAMnjHobSOMmMsvNUTD34,13674
34
34
  copyparty/up2k.py,sha256=0Fj2yT2XnJ4MhwdEcDRs1T-gsdxVhdIxdaZSjGyGKBA,177682
35
- copyparty/util.py,sha256=qkPD9LFPgLhpmCic_IBvutS2extujDiRrG75PnLMY90,102987
35
+ copyparty/util.py,sha256=SjG1pBPhv6XYa6uPbiOU8HRB6dDZqwjCRwUe22fLhdg,103117
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
@@ -55,9 +55,9 @@ copyparty/stolen/ifaddr/_posix.py,sha256=-67NdfGrCktfQPakT2fLbjl2U00QMvyBGkSvrUu
55
55
  copyparty/stolen/ifaddr/_shared.py,sha256=uNC4SdEIgdSLKvuUzsf1aM-H1Xrc_9mpLoOT43YukGs,6206
56
56
  copyparty/stolen/ifaddr/_win32.py,sha256=EE-QyoBgeB7lYQ6z62VjXNaRozaYfCkaJBHGNA8QtZM,4026
57
57
  copyparty/web/baguettebox.js.gz,sha256=r2c_hOZV_RTyl4CqWWX14FDWP8nnDVwGkDl4Sfk0rU4,8239
58
- copyparty/web/browser.css.gz,sha256=5n-uSw003hMJB4HZKOcWJQFENoNOEg1Q1bngkqIfL28,11654
58
+ copyparty/web/browser.css.gz,sha256=bPS2U1pXtSBNjXFM9nZkg_exWP4N8kgYe4grEBOX1t8,11706
59
59
  copyparty/web/browser.html,sha256=auvhLVE_t0aIN0q-nk0zOWFqITgDhroMAAviBNLoFfc,4788
60
- copyparty/web/browser.js.gz,sha256=7PNA5VtA1ibzrm_tuWNL61Ebbr7QEkIojQx5JR6-5WA,92766
60
+ copyparty/web/browser.js.gz,sha256=RYVZRBltqZwUyDfBOrOz8S1iS-Bf0AKeI0lloXHrPs0,94249
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
@@ -84,7 +84,7 @@ copyparty/web/svcs.html,sha256=dnE1fG15zOpq7u0GYt8ij6BUv_LTwsiipFeneVYlMsM,14140
84
84
  copyparty/web/svcs.js.gz,sha256=lMXEP9W-VlXyANlva4q0ASSxvvHYlE2CrmxGgZXZop0,713
85
85
  copyparty/web/ui.css.gz,sha256=iDjrmq32aDN6l2S5AjCQdKjD6bxmzP6ji2WjM1FjKiU,2819
86
86
  copyparty/web/up2k.js.gz,sha256=7AKmoJOtFh9tx3Ha7w2F-z69-XZo_LzyR3ilWnBO_D8,24524
87
- copyparty/web/util.js.gz,sha256=VTLY_F51Dwcz2-WANt9LVPYHCH0dEA2in9ISW8w25ss,15213
87
+ copyparty/web/util.js.gz,sha256=Sa7oyIKW0HtEQegmhUcrDwgty0lzqsMU0qn67pVvaZY,15231
88
88
  copyparty/web/w.hash.js.gz,sha256=JhJagnqIkcKng_hs6otEgzcuQE7keToG_r5dd2o3EfU,1108
89
89
  copyparty/web/a/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
90
90
  copyparty/web/a/partyfuse.py,sha256=9p5Hpg_IBiSimv7j9kmPhCGpy-FLXSRUOYnLjJ5JifU,28049
@@ -109,9 +109,9 @@ copyparty/web/deps/prismd.css.gz,sha256=ObUlksQVr-OuYlTz-I4B23TeBg2QDVVGRnWBz8cV
109
109
  copyparty/web/deps/scp.woff2,sha256=w99BDU5i8MukkMEL-iW0YO9H4vFFZSPWxbkH70ytaAg,8612
110
110
  copyparty/web/deps/sha512.ac.js.gz,sha256=lFZaCLumgWxrvEuDr4bqdKHsqjX82AbVAb7_F45Yk88,7033
111
111
  copyparty/web/deps/sha512.hw.js.gz,sha256=UAed2_ocklZCnIzcSYz2h4P1ycztlCLj-ewsRTud2lU,7939
112
- copyparty-1.16.21.dist-info/licenses/LICENSE,sha256=gOr4h33pCsBEg9uIy9AYmb7qlocL4V9t2uPJS5wllr0,1072
113
- copyparty-1.16.21.dist-info/METADATA,sha256=VoeoY-hqStlwlP-4HcpeLc17wef9pmDqDvJ1rnvnOkY,160609
114
- copyparty-1.16.21.dist-info/WHEEL,sha256=pxyMxgL8-pra_rKaQ4drOZAegBVuX-G_4nRHjjgWbmo,91
115
- copyparty-1.16.21.dist-info/entry_points.txt,sha256=4zw6a3rqASywQomiYLObjjlxybaI65LYYOTJwgKz7b0,128
116
- copyparty-1.16.21.dist-info/top_level.txt,sha256=LnYUPsDyk-8kFgM6YJLG4h820DQekn81cObKSu9g-sI,10
117
- copyparty-1.16.21.dist-info/RECORD,,
112
+ copyparty-1.17.0.dist-info/licenses/LICENSE,sha256=gOr4h33pCsBEg9uIy9AYmb7qlocL4V9t2uPJS5wllr0,1072
113
+ copyparty-1.17.0.dist-info/METADATA,sha256=nKWqseMoVudhVi1HaLux7M1zJt1QLdpD4bXSUL4_eb4,162654
114
+ copyparty-1.17.0.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
115
+ copyparty-1.17.0.dist-info/entry_points.txt,sha256=4zw6a3rqASywQomiYLObjjlxybaI65LYYOTJwgKz7b0,128
116
+ copyparty-1.17.0.dist-info/top_level.txt,sha256=LnYUPsDyk-8kFgM6YJLG4h820DQekn81cObKSu9g-sI,10
117
+ copyparty-1.17.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (79.0.0)
2
+ Generator: setuptools (79.0.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5