Homepage rework
This commit is contained in:
1 parent
554b7cc82c
commit
db8226b980
6 files changed
+521
-41
No files matched your search
@@ -12,6 +12,20 @@ Simple Goal List
|
||||
- Ahead of time uploading of pictures and videos from external devices
|
||||
- USB media awareness/playback
|
||||
|
||||
## Home dashboard
|
||||
|
||||
The homepage groups tasks into playback, adding media, and checking download
|
||||
activity. **Open media library** is the main playback action; the four media
|
||||
cards lead to image uploads, video uploads, stream configuration, and YouTube
|
||||
requests. **View download jobs** opens the download queue. TV and screen controls
|
||||
are explicitly marked coming soon rather than shown as working buttons.
|
||||
|
||||
A selection panel checks the existing playback-status endpoint every five seconds.
|
||||
It shows the requested selection, not proof that the player is running. If status
|
||||
is unavailable, navigation still works; without JavaScript, the panel directs
|
||||
users to the library. The responsive homepage uses local styles/icons and keeps
|
||||
the original beige background.
|
||||
|
||||
## Fullscreen player
|
||||
|
||||
Install FFplay (usually provided by FFmpeg), then run the player in the graphical
|
||||
@@ -47,7 +61,7 @@ Ctrl+C or SIGTERM stops the child process; a child that ignores termination is
|
||||
killed after two seconds. The player does not modify the database and currently
|
||||
does not apply `media_playback_option` records.
|
||||
|
||||
Use **Play Media** from the home page to select an item in the unified library.
|
||||
Use **Open media library** from the home page to select an item in the unified library.
|
||||
Alternatively, set selection flags directly in SQLite. For example, select media
|
||||
ID 3 without temporarily leaving several active rows:
|
||||
|
||||
@@ -65,7 +79,7 @@ just an SSH shell without display access.
|
||||
|
||||
## Media library and playback selection
|
||||
|
||||
Open **Play Media** from the homepage, or visit `/media`. All media types share
|
||||
Choose **Open media library** from the homepage, or visit `/media`. All media types share
|
||||
one page, with a **Play** button per item and image/video/stream icons. Clicking
|
||||
Play clears the previous active selection and activates the new item in a single
|
||||
database transaction; default flags are preserved. The separate player picks up
|
||||
@@ -120,7 +134,7 @@ an incomplete media entry. Retrying a failed upload starts it from the beginning
|
||||
|
||||
## Uploading local videos
|
||||
|
||||
Use **Upload a Video** on the home page, or visit `/upload/video`. Enter a display
|
||||
Use **Upload a video** on the home page, or visit `/upload/video`. Enter a display
|
||||
name and select one video. The limit is 5GB (5 × 1024³ bytes), checked both in the
|
||||
browser and on the server. Common formats including MP4, MKV, MOV, WebM, AVI,
|
||||
MPEG, and WMV are accepted by extension. Before saving, FFprobe checks for a
|
||||
@@ -146,7 +160,7 @@ space for both Flask's temporary upload and the final video file.
|
||||
|
||||
## Uploading static images
|
||||
|
||||
Use **Upload a Static Image** on the home page, or visit `/upload/photo`. Enter
|
||||
Use **Upload an image** on the home page, or visit `/upload/photo`. Enter
|
||||
an image name and choose one JPG/JPEG, PNG, WebP, BMP, TIFF, or GIF file. Files
|
||||
are checked against their extensions and decoded for validation. Images may be
|
||||
animated, but only the first frame is checked; dimensions are limited to 50
|
||||
@@ -195,7 +209,7 @@ The default `Videos/` folder is excluded from Git.
|
||||
### Web interface
|
||||
|
||||
Start the Flask app with `python3 sc_webserver.py` and use the home page's
|
||||
**Get Video from YouTube** link, or visit `/youtube/download`. Enter a media name
|
||||
**Get a YouTube video** link, or visit `/youtube/download`. Enter a media name
|
||||
and a YouTube video URL to queue a job. Invalid submissions show an error without
|
||||
creating a job; successful submissions redirect to `/youtube/jobs`.
|
||||
|
||||
@@ -262,5 +276,5 @@ WHERE youtube_download_job_id = 123
|
||||
Run the database and worker tests without downloading any videos:
|
||||
|
||||
```sh
|
||||
python3 -m unittest test.youtube_download_job_test test.youtube_download_web_test test.upload_video_test test.upload_photo_test test.player_test test.media_library_test test.submission_validation_test -v
|
||||
python3 -m unittest test.youtube_download_job_test test.youtube_download_web_test test.upload_video_test test.upload_photo_test test.player_test test.media_library_test test.submission_validation_test test.home_test -v
|
||||
```
|
||||
Reference in new issue
Block a user