simpleparty 0.2.2__tar.gz → 0.2.3__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: simpleparty
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: Easily enjoy your private video collection
5
5
  Author: Guy Freeman
6
6
  License-Expression: AGPL-3.0-only
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "simpleparty"
7
- version = "0.2.2"
7
+ version = "0.2.3"
8
8
  description = "Easily enjoy your private video collection"
9
9
  readme = "README.md"
10
10
  license = "AGPL-3.0-only"
@@ -267,7 +267,7 @@ nav{
267
267
  .btn.active{background:#7c3aed;color:#fff;border-color:#7c3aed}
268
268
  .btn-lock{border-color:#991b1b}
269
269
  .btn-lock:hover{background:#7f1d1d;border-color:#dc2626}
270
- #player-area{background:#000}
270
+ #player-area{position:sticky;top:0;z-index:5;background:#000}
271
271
  video{width:100%;max-height:70vh;display:block;background:#000}
272
272
  #controls{
273
273
  display:flex;align-items:center;padding:8px 16px;gap:8px;
@@ -356,10 +356,10 @@ def render_nav(path, encrypted_dir=None):
356
356
  return '<nav>' + ''.join(pieces) + '</nav>'
357
357
 
358
358
 
359
- def render_file_list(data, current_idx=-1):
359
+ def render_file_list(data, current_idx=-1, show_shuffle=True):
360
360
  pieces = ['<div id="file-list">']
361
361
 
362
- if data['videos']:
362
+ if show_shuffle and data['videos']:
363
363
  shuffle_url = '/play?' + urllib.parse.urlencode({'path': data['path'], 'shuffle': '1'})
364
364
  pieces.append(
365
365
  f'<div class="action-bar">'
@@ -471,7 +471,7 @@ def render_play_page(data, idx, next_url, prev_url, shuffle_url, is_shuffled, po
471
471
  )
472
472
  body += '</div></div>'
473
473
 
474
- body += render_file_list(data, current_idx=idx)
474
+ body += render_file_list(data, current_idx=idx, show_shuffle=False)
475
475
 
476
476
  body += (
477
477
  '<script>\n'
@@ -480,6 +480,7 @@ def render_play_page(data, idx, next_url, prev_url, shuffle_url, is_shuffled, po
480
480
  f'const prevUrl={json.dumps(prev_url)};\n'
481
481
  f'const browseUrl={json.dumps(browse_url)};\n'
482
482
  'video.addEventListener("ended",()=>{window.location.href=nextUrl});\n'
483
+ 'video.play().catch(()=>{});\n'
483
484
  'document.addEventListener("keydown",e=>{\n'
484
485
  ' if(e.target.tagName==="INPUT")return;\n'
485
486
  ' switch(e.key){\n'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: simpleparty
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: Easily enjoy your private video collection
5
5
  Author: Guy Freeman
6
6
  License-Expression: AGPL-3.0-only
File without changes
File without changes
File without changes