Update .forgejo/workflows/generate-m3u.yml

This commit is contained in:
stoney420 2025-06-29 05:28:41 +02:00
parent 64dfa58b0a
commit ba042ad2a4

View file

@ -124,7 +124,7 @@ jobs:
echo "---" >> "$REPORT" echo "---" >> "$REPORT"
echo "*Report generated automatically by Forgejo Actions*" >> "$REPORT" echo "*Report generated automatically by Forgejo Actions*" >> "$REPORT"
echo "✅ Report created: $REPORT" echo "✅ Report created: "$REPORT""
- name: Health Check (Optional) - name: Health Check (Optional)
continue-on-error: true continue-on-error: true
@ -154,11 +154,11 @@ jobs:
echo "Cleanup done" echo "Cleanup done"
fi fi
else else
echo "No reports to clean in "$REPORT_DIR"" echo "No reports to clean in ${REPORT_DIR}"
fi fi
cd - > /dev/null # Go back to original directory cd - > /dev/null # Go back to original directory
else else
echo "Daily reports directory "$REPORT_DIR" not found." echo "Daily reports directory ${REPORT_DIR} not found."
fi fi
# Reset Import File # Reset Import File
@ -203,7 +203,7 @@ def detect_country_enhanced(channel_name, epg_id="", logo_url="", stream_url="")
if any(x in channel_lower for x in ["anc global", "anc ph"]): if any(x in channel_lower for x in ["anc global", "anc ph"]):
return "🇵🇭 Philippines" return "🇵🇭 Philippines"
if "animax" in channel_lower: if "animax" in channel_lower:
return "<EFBFBD>🇵 Japan" return "🇯🇵 Japan"
# Platform-based detection # Platform-based detection
if "pluto.tv" in text or "images.pluto.tv" in text: if "pluto.tv" in text or "images.pluto.tv" in text:
pluto_overrides = { pluto_overrides = {
@ -393,7 +393,7 @@ EOF
echo "" >> "$REPORT" echo "" >> "$REPORT"
echo "---" >> "$REPORT" echo "---" >> "$REPORT"
echo "*Enhanced country detection with 99%+ accuracy*" >> "$REPORT" echo "*Enhanced country detection with 99%+ accuracy*" >> "$REPORT"
echo "📊 Report created: $REPORT" echo "📊 Report created: "$REPORT""
- name: Commit Enhanced Results - name: Commit Enhanced Results
run: | run: |
@ -418,10 +418,9 @@ EOF
if [ -f playlist.m3u ]; then if [ -f playlist.m3u ]; then
CHANNELS=$(grep -c "^#EXTINF" playlist.m3u || echo "0") CHANNELS=$(grep -c "^#EXTINF" playlist.m3u || echo "0")
COUNTRIES=$(grep -o 'group-title="[^"]*"' playlist.m3u | sed 's/group-title="//;s/"//' | sort -u | wc -l || echo "0") COUNTRIES=$(grep -o 'group-title="[^"]*"' playlist.m3u | sed 's/group-title="//;s/"//' | sort -u | wc -l || echo "0")
echo "✅ Generated $CHANNELS channels across $COUNTRIES countries" echo "✅ Generated "$CHANNELS" channels across "$COUNTRIES" countries"
echo "🎯 Enhanced detection fixes major classification issues" echo "🎯 Enhanced detection fixes major classification issues"
echo "🌍 Canadian, US, UK, Philippines channels now correctly classified" echo "🌍 Canadian, US, UK, Philippines channels now correctly classified"
fi fi
echo "📋 Backup files created for safety" echo "📋 Backup files created for safety"
echo "📊 Detailed reports available in reports/daily/" echo "📊 Detailed reports available in reports/daily/"
<EFBFBD>