This commit is contained in:
lalifeier
2025-03-15 17:28:34 +08:00
commit f9d687c39d
298 changed files with 161474 additions and 0 deletions

39
.github/ISSUE_TEMPLATE/bug-report.yml vendored Normal file
View File

@@ -0,0 +1,39 @@
name: 🐛 Bug Report
description: Create a new ticket for a bug
title: "🐛 [BUG] - <title>"
labels: ['bug']
body:
- type: markdown
attributes:
value: >
#### Before submitting a bug, please make sure the issue hasn't been already addressed by searching through [the existing and past issues](https://github.com/lalifeier/IPTV/issues?q=is%3Aissue+sort%3Acreated-desc+).
- type: textarea
attributes:
label: 🐛 Describe the bug
description: |
Please provide a clear and concise description of what the bug is.
validations:
required: true
- type: textarea
attributes:
label: 🌐 Network Environment
description: |
Please provide details about your network environment (e.g., ISP, connection type, VPN, etc.).
validations:
required: true
- type: textarea
attributes:
label: 📺 Player
description: |
Please provide details about the player you are using (e.g., VLC, MPV, web player, etc.).
validations:
required: true
- type: markdown
attributes:
value: >
Thanks for contributing 🎉!

1
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1 @@
blank_issues_enabled: false

View File

@@ -0,0 +1,20 @@
name: 🚀 Feature request
description: Create a new ticket for a new feature request
title: "🚀 [FEATURE] - <title>"
labels: ['question']
body:
- type: textarea
attributes:
label: 🚀 Feature Description
description: >
A clear and concise description of the feature proposal. Please outline the motivation for the proposal.
Is your feature request related to a specific problem? For example, *"I'm working on X and would like Y to be possible"*.
If this is related to another GitHub issue, please link it here.
validations:
required: true
- type: markdown
attributes:
value: >
Thanks for contributing 🎉!

62
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,62 @@
name: CI
on:
push:
branches:
- main
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
#----------------------------------------------
# check-out repo and set-up python
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Set up python
id: setup-python
uses: actions/setup-python@v4
with:
python-version: "3.11"
#----------------------------------------------
# ----- install & configure poetry -----
#----------------------------------------------
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
#----------------------------------------------
# load cached venv if cache exists
#----------------------------------------------
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
#----------------------------------------------
# install dependencies if cache does not exist
#----------------------------------------------
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root && poetry install --no-interaction --no-root --with test
#----------------------------------------------
# install your root project, if required
#----------------------------------------------
- name: Install project
run: poetry install --no-interaction && poetry install --no-interaction --with test
#----------------------------------------------
# run test suite
#----------------------------------------------
# - name: Run tests
# run: |
# source .venv/bin/activate
# pytest tests/
# coverage report

38
.github/workflows/cleanup.yml vendored Normal file
View File

@@ -0,0 +1,38 @@
name: Monthly Cleanup
on:
schedule:
- cron: '30 0 1 * *'
jobs:
cleanup:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
- name: Download BFG
run: curl -Lo bfg.jar https://repo1.maven.org/maven2/com/madgag/bfg/1.14.0/bfg-1.14.0.jar
- name: Delete all files with BFG
run: java -jar bfg.jar --delete-all-files .
# 或者,如果要删除特定文件:
# - name: Delete specific files with BFG
# run: java -jar bfg.jar --delete-files '要删除的文件名' .
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Monthly cleanup with BFG"
branch: main
push_options: --force

39
.github/workflows/epg.yml vendored Normal file
View File

@@ -0,0 +1,39 @@
name: Auto Update EPG
on:
workflow_dispatch:
schedule:
- cron: "5 1 * * *"
jobs:
epg:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Run Update EPG Files
run: |
rm -f e.xml
wget https://epg.112114.xyz/pp.xml -O e.xml
- name: Git Auto Commit
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Auto Update EPG
branch: main
push_options: '--force'
- name: Delete workflow runs
uses: MajorScruffy/delete-old-workflow-runs@v0.3.0
with:
repository: ${{ github.repository }}
workflow: ".github/workflows/epg.yml"
older-than-seconds: 3600
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

64
.github/workflows/iptv.yml vendored Normal file
View File

@@ -0,0 +1,64 @@
name: Auto Update IPTV
on:
push:
branches:
- main
workflow_dispatch:
schedule:
- cron: "0 * * * *"
jobs:
iptv:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install dependencies
run: |
pip install -r requirements.txt
- name: Get Currrent Date
run: echo "DATE=$(date +'%Y-%m-%d %H:%M:%S %Z')" >> $GITHUB_ENV
- name: Run Update IPTV
run: |
python iptv.py
env:
SALT: ${{ secrets.SALT }}
PROXY_URL: ${{ secrets.PROXY_URL }}
- name: Update Deployment Time
run: |
if grep -q "Last deployment time:" README.md; then
sed -i "/Last deployment time:/c\Last deployment time: $DATE" README.md
else
echo "Last deployment time: $DATE" >> README.md
fi
- name: Git Auto Commit
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Auto Update IPTV
branch: main
push_options: '--force'
- name: Delete workflow runs
uses: MajorScruffy/delete-old-workflow-runs@v0.3.0
with:
repository: ${{ github.repository }}
workflow: ".github/workflows/iptv.yml"
older-than-seconds: 3600
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

50
.github/workflows/iptv_hotel_ip.yml vendored Normal file
View File

@@ -0,0 +1,50 @@
name: Auto Update Hotel IPTV IP
on:
workflow_dispatch:
schedule:
- cron: "5 2 * * *"
jobs:
iptv:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install dependencies
run: |
pip install -r requirements.txt && playwright install && playwright install-deps
- name: Get Currrent Date
run: echo "DATE=$(date +'%Y-%m-%d %H:%M:%S %Z')" >> $GITHUB_ENV
- name: Run Update Hotel IPTV
run: |
python main.py --type hotel --ip
- name: Git Auto Commit
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Auto Update IPTV
branch: main
push_options: '--force'
- name: Delete workflow runs
uses: MajorScruffy/delete-old-workflow-runs@v0.3.0
with:
repository: ${{ github.repository }}
workflow: ".github/workflows/iptv_hotel_ip.yml"
older-than-seconds: 3600
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -0,0 +1,50 @@
name: Auto Update Hotel IPTV
on:
workflow_dispatch:
schedule:
- cron: "15 6,12,18,22 * * *"
jobs:
iptv:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install dependencies
run: |
pip install -r requirements.txt && playwright install && playwright install-deps
- name: Get Currrent Date
run: echo "DATE=$(date +'%Y-%m-%d %H:%M:%S %Z')" >> $GITHUB_ENV
- name: Run Update Hotel IPTV
run: |
python main.py --type hotel --playlist
- name: Git Auto Commit
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Auto Update IPTV
branch: main
push_options: '--force'
- name: Delete workflow runs
uses: MajorScruffy/delete-old-workflow-runs@v0.3.0
with:
repository: ${{ github.repository }}
workflow: ".github/workflows/iptv_hotel_playlist.yml"
older-than-seconds: 3600
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

50
.github/workflows/iptv_udpxy_ip.yml vendored Normal file
View File

@@ -0,0 +1,50 @@
name: Auto Update udpxy IPTV IP
on:
workflow_dispatch:
schedule:
- cron: "5 8,16 * * *"
jobs:
iptv:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install dependencies
run: |
pip install -r requirements.txt && playwright install && playwright install-deps
- name: Get Currrent Date
run: echo "DATE=$(date +'%Y-%m-%d %H:%M:%S %Z')" >> $GITHUB_ENV
- name: Run Update udpxy IPTV
run: |
python main.py --type udpxy --ip
- name: Git Auto Commit
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Auto Update IPTV
branch: main
push_options: '--force'
- name: Delete workflow runs
uses: MajorScruffy/delete-old-workflow-runs@v0.3.0
with:
repository: ${{ github.repository }}
workflow: ".github/workflows/iptv_udpxy_ip.yml"
older-than-seconds: 3600
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -0,0 +1,50 @@
name: Auto Update udpxy IPTV
on:
workflow_dispatch:
schedule:
- cron: "45 6,12,18,22 * * *"
jobs:
iptv:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install dependencies
run: |
pip install -r requirements.txt && playwright install && playwright install-deps
- name: Get Currrent Date
run: echo "DATE=$(date +'%Y-%m-%d %H:%M:%S %Z')" >> $GITHUB_ENV
- name: Run Update udpxy IPTV
run: |
python main.py --type udpxy --playlist
- name: Git Auto Commit
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Auto Update IPTV
branch: main
push_options: '--force'
- name: Delete workflow runs
uses: MajorScruffy/delete-old-workflow-runs@v0.3.0
with:
repository: ${{ github.repository }}
workflow: ".github/workflows/iptv_udpxy_playlist.yml"
older-than-seconds: 3600
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

50
.github/workflows/iptv_udpxy_rtp.yml vendored Normal file
View File

@@ -0,0 +1,50 @@
name: Auto Update udpxy RTP IPTV
on:
workflow_dispatch:
schedule:
- cron: "5 4 * * *"
jobs:
iptv:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install dependencies
run: |
pip install -r requirements.txt && playwright install && playwright install-deps
- name: Get Currrent Date
run: echo "DATE=$(date +'%Y-%m-%d %H:%M:%S %Z')" >> $GITHUB_ENV
- name: Run Update udpxy IPTV
run: |
python main.py --type udpxy --rtp
- name: Git Auto Commit
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Auto Update IPTV
branch: main
push_options: '--force'
- name: Delete workflow runs
uses: MajorScruffy/delete-old-workflow-runs@v0.3.0
with:
repository: ${{ github.repository }}
workflow: ".github/workflows/iptv_udpxy_rtp.yml"
older-than-seconds: 3600
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

43
.github/workflows/pull_request_lint.yml vendored Normal file
View File

@@ -0,0 +1,43 @@
name: Pull Request Linting
on:
pull_request:
types: [opened, synchronize, reopened]
permissions:
contents: write
issues: write
pull-requests: write
jobs:
lint_pull_requests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Lint pull request
run: |
echo "Performing lint checks on the pull request"
# Add your linting commands or scripts here
# For example, running a linting tool or script
# ./run-lint.sh
- name: Check for stale pull requests
uses: actions/stale@v9
with:
days-before-stale: 30
days-before-close: 7
stale-message: "This pull request has been marked as stale due to inactivity."
closed-message: "This pull request has been closed due to inactivity."
- name: Comment on pull request
if: ${{ github.event.action == 'opened' || github.event.action == 'reopened' }}
uses: actions-ecosystem/action-create-comment@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
body: |
Hi @${{ github.event.pull_request.user.login }}, thank you for your pull request. We will review it soon.