Update .forgejo/workflows/generate-m3u.yml
All checks were successful
Generate M3U Playlist / build (push) Successful in 1m21s
All checks were successful
Generate M3U Playlist / build (push) Successful in 1m21s
This commit is contained in:
parent
1a0cbed4f1
commit
d7c113cb97
1 changed files with 62 additions and 12 deletions
|
@ -23,26 +23,76 @@ jobs:
|
||||||
git config --local user.email "actions@forgejo.plainrock127.xyz"
|
git config --local user.email "actions@forgejo.plainrock127.xyz"
|
||||||
git config --local user.name "IPTV Playlist Bot"
|
git config --local user.name "IPTV Playlist Bot"
|
||||||
|
|
||||||
|
- name: Debug File Structure
|
||||||
|
run: |
|
||||||
|
echo "=== Root Directory ==="
|
||||||
|
ls -la
|
||||||
|
echo ""
|
||||||
|
echo "=== Scripts Directory ==="
|
||||||
|
ls -la scripts/
|
||||||
|
echo ""
|
||||||
|
echo "=== Check for Import File ==="
|
||||||
|
if [ -f bulk_import.m3u ]; then
|
||||||
|
echo "✅ bulk_import.m3u found in root ($(wc -l < bulk_import.m3u) lines)"
|
||||||
|
echo "First 3 lines:"
|
||||||
|
head -3 bulk_import.m3u
|
||||||
|
else
|
||||||
|
echo "❌ bulk_import.m3u not found in root"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f channels.txt ]; then
|
||||||
|
echo "✅ channels.txt found ($(du -h channels.txt | cut -f1))"
|
||||||
|
else
|
||||||
|
echo "❌ channels.txt not found"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Setup Directories
|
||||||
|
run: |
|
||||||
|
mkdir -p config
|
||||||
|
mkdir -p backups
|
||||||
|
mkdir -p reports
|
||||||
|
|
||||||
|
# Create scripts/__init__.py if missing
|
||||||
|
if [ ! -f scripts/__init__.py ]; then
|
||||||
|
echo '# Scripts package' > scripts/__init__.py
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Run Playlist Generation
|
- name: Run Playlist Generation
|
||||||
run: |
|
run: |
|
||||||
echo "Running playlist generation..."
|
echo "=== Running playlist generation ==="
|
||||||
cd scripts
|
echo "Current directory: $(pwd)"
|
||||||
python generate_playlist.py
|
echo "Available files:"
|
||||||
if [ -f playlist.m3u ]; then
|
ls -la
|
||||||
mv playlist.m3u ../
|
|
||||||
fi
|
# Run from root directory, not scripts directory
|
||||||
if [ -f playlist_update.log ]; then
|
python scripts/generate_playlist.py
|
||||||
mv playlist_update.log ../
|
|
||||||
fi
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
- name: Check Results
|
- name: Check Results
|
||||||
run: |
|
run: |
|
||||||
|
echo "=== Final Results ==="
|
||||||
|
ls -la
|
||||||
|
|
||||||
if [ -f playlist.m3u ]; then
|
if [ -f playlist.m3u ]; then
|
||||||
CHANNEL_COUNT=$(grep -c "^#EXTINF" playlist.m3u || echo "0")
|
CHANNEL_COUNT=$(grep -c "^#EXTINF" playlist.m3u || echo "0")
|
||||||
echo "Generated playlist with $CHANNEL_COUNT channels"
|
echo "✅ playlist.m3u generated with $CHANNEL_COUNT channels"
|
||||||
|
echo "File size: $(du -h playlist.m3u | cut -f1)"
|
||||||
|
echo "First 5 lines:"
|
||||||
|
head -5 playlist.m3u
|
||||||
else
|
else
|
||||||
echo "No playlist generated"
|
echo "❌ playlist.m3u not generated"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f playlist_update.log ]; then
|
||||||
|
echo "=== Log content (last 30 lines) ==="
|
||||||
|
tail -30 playlist_update.log
|
||||||
|
else
|
||||||
|
echo "❌ No log file found"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f channels.txt ]; then
|
||||||
|
echo "=== channels.txt status ==="
|
||||||
|
echo "Size: $(du -h channels.txt | cut -f1)"
|
||||||
|
echo "Lines: $(wc -l < channels.txt)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Commit Changes
|
- name: Commit Changes
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue