d08e280ce0317019382c31a689846b11087770d3
Replace the server-rendered episode upload form with a Livewire component, introducing an interactive admin experience that validates the new episode's stream path against all configured mirrors before saving. The controller-based `store` method and its route are removed, and episode creation now flows through the `AdminEpisodeForm` component with frontend upload handling and dynamic quality checks. Key changes: - Add `AdminEpisodeForm` Livewire component with file uploads, tag handling, and debounced stream/base-url validation. - Extend `CdnPathValidator::validateStream` to accept an episode number so the manifest path can point to the specific episode being added. - Remove the `store` method from `EpisodeController` and its POST route. - Delete the legacy `createEpisode` method from `EpisodeService`. - Replace the Blade upload modal with the Livewire view, including progress indicators and validation badges. - Add feature tests for the Livewire component and update unit tests for the CDN validator's episode-specific manifest check.
hstream Website
Install (Ubuntu)
# Install PHP
sudo add-apt-repository ppa:ondrej/php
apt update && apt upgrade
apt install php8.4 php8.4-xml php8.4-mysql php8.4-gd php8.4-zip php8.4-curl php8.4-mbstring
# Install NodeJS
curl -sL https://deb.nodesource.com/setup_20.x -o /tmp/nodesource_setup.sh
sudo bash /tmp/nodesource_setup.sh
sudo apt install -y nodejs
# Install composer
cd /usr/bin/
curl -sS https://getcomposer.org/installer | sudo php
mv composer.phar composer
# Install NGINX (skip for local dev)
apt install nginx
apt install php8.4-fpm
# Install MariaDB
apt install mariadb-server
sudo mysql_secure_installation
# Install Meilisearch
echo "deb [trusted=yes] https://apt.fury.io/meilisearch/ /" | sudo tee /etc/apt/sources.list.d/fury.list
sudo apt update && sudo apt install meilisearch
# Clone Repo
cd /var/www
git clone https://gitea.hstream.moe/w33b/hstream.git
chown -R www-data hstream/
git config --global --add safe.directory /var/www/hstream
# Install dependencies
composer install --optimize-autoloader --no-dev
npm install
# Build Node modules
npm run build
Supervisor
apt install supervisor
nano /etc/supervisor/conf.d/laravel-queue.conf :
[program:laravel-queue]
process_name=%(program_name)s_%(process_num)02d
command=php84 /var/www/hstream/artisan queue:work --queue=default --sleep=3 --tries=3 --max-time=3600
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
user=www-data
numprocs=1
redirect_stderr=true
stdout_logfile=/var/log/laravel-queue.log
sudo systemctl start supervisor
sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl start laravel-queue:*
Backup
# DB
mysqldump -u root hstream > backup_2023_11_01.sql
# WWW
zip -r hstream_2023_11_30.zip hstream/
Update
php84 artisan down
git pull
npm run build
php84 artisan view:clear && php84 artisan optimize:clear && php84 artisan cache:clear && service php8.4-fpm restart
php84 artisan up
Description
Languages
Blade
50.4%
PHP
43.1%
JavaScript
6%
CSS
0.5%
