Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release:v1.5.4 #589

Merged
merged 35 commits into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
390bf91
fix:open_empty_category change(#564)
Guovin Nov 18, 2024
8a884aa
fix:UnicodeDecodeError(#567)
Guovin Nov 18, 2024
912e13c
feat:arm v7/v8 (#562)
Guovin Nov 18, 2024
cae851a
feat:yt_dlp
Guovin Nov 18, 2024
fa7a141
Merge branch 'master' into dev
Guovin Nov 19, 2024
865d919
feat:tkinter_build
Guovin Nov 19, 2024
b032d98
feat:get_speed_yt_dlp
Guovin Nov 19, 2024
4831908
refactor:get_speed
Guovin Nov 20, 2024
4f17499
feat:follow qrcode
Guovin Nov 21, 2024
0b37036
Update:readme
Guovin Nov 21, 2024
81afb61
feat:GTV
Guovin Nov 22, 2024
e8616c1
feat:gtv
Guovin Nov 22, 2024
9ed41da
chore:docker
Guovin Nov 25, 2024
6245665
chore:iptv
Guovin Nov 25, 2024
bfc78e2
fix:tcl
Guovin Nov 25, 2024
487cb1f
chore:docker
Guovin Nov 26, 2024
6f051aa
chore:get speed
Guovin Nov 26, 2024
5ead198
feat:two result(#581)
Guovin Nov 26, 2024
e744a34
fix:separator(#581)
Guovin Nov 27, 2024
8995031
fix:separator(#581)
Guovin Nov 27, 2024
654b6fc
chore:service
Guovin Nov 27, 2024
ba15520
refactor:remove_cache_info
Guovin Nov 27, 2024
df6e6da
refactor:log and get_speed
Guovin Nov 28, 2024
2af5e2b
chore:schedule interval
Guovin Nov 28, 2024
e1d97bd
chore:app result
Guovin Nov 28, 2024
74ffeda
chore:run
Guovin Nov 28, 2024
f29d57c
chore:iptv-api
Guovin Nov 28, 2024
36903d7
chore:schedule interval
Guovin Nov 28, 2024
35609ca
chore
Guovin Nov 28, 2024
7da9a50
fix:docker crontab run fail
Guovin Nov 29, 2024
83f0e81
chore:update interval
Guovin Nov 29, 2024
dfbd000
chore:changelog
Guovin Nov 29, 2024
61716e1
chore:interval
Guovin Nov 29, 2024
ed6eb15
feat:navigation
Guovin Nov 29, 2024
42f4b32
update:changelog
Guovin Nov 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
*.sh linguist-language=Python
Dockerfile linguist-language=Python
Dockerfile linguist-language=Python
54 changes: 27 additions & 27 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ on:
- master
- dev
- gd
- gd-test
jobs:
push:
runs-on: ${{ matrix.operating-system }}
Expand All @@ -24,10 +23,10 @@ jobs:
- uses: actions/checkout@v3
with:
ref: ${{ env.BRANCH_NAME }}
- name: Run with setup-python 3.8
- name: Run with setup-python 3.13
uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.13'
update-environment: true
cache: 'pipenv'
- name: Check open_driver config
Expand All @@ -40,33 +39,36 @@ jobs:
except:
open_driver = False
print(open_driver)')" >> $GITHUB_ENV
- name: Check open_ffmpeg config
id: check_ffmpeg
run: |
echo "OPEN_FFMPEG=$(python -c '
try:
from utils.config import config
open_ffmpeg = config.open_ffmpeg
except:
open_ffmpeg = False
print(open_ffmpeg)')" >> $GITHUB_ENV
# - name: Check open_ffmpeg config
# id: check_ffmpeg
# run: |
# echo "OPEN_FFMPEG=$(python -c '
# try:
# from utils.config import config
# open_ffmpeg = config.open_ffmpeg
# except:
# open_ffmpeg = False
# print(open_ffmpeg)')" >> $GITHUB_ENV
- name: Set up Chrome
if: env.OPEN_DRIVER == 'True' || env.OPEN_DRIVER == 'true'
if: env.OPEN_DRIVER == 'True'
uses: browser-actions/setup-chrome@latest
with:
chrome-version: stable
- name: Download chrome driver
if: env.OPEN_DRIVER == 'True' || env.OPEN_DRIVER == 'true'
if: env.OPEN_DRIVER == 'True'
uses: nanasess/setup-chromedriver@master
- name: Install FFmpeg
if: env.OPEN_FFMPEG == 'True' || env.OPEN_FFMPEG == 'true'
run: sudo apt-get update && sudo apt-get install -y ffmpeg
# - name: Install FFmpeg
# if: env.OPEN_FFMPEG == 'True'
# run: sudo apt-get update && sudo apt-get install -y ffmpeg
- name: Install pipenv
run: pip3 install --user pipenv
- name: Install dependecies
run: pipenv --python 3.8 && pipenv install
- name: Build
run: pipenv run build
run: pipenv --python 3.13 && pipenv install --deploy
- name: Install selenium
if: env.OPEN_DRIVER == 'True'
run: pipenv install selenium
- name: Update
run: pipenv run dev
- name: Commit and push if changed
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
Expand Down Expand Up @@ -94,13 +96,11 @@ jobs:
if [[ -f "$final_m3u_file" ]]; then
git add -f "$final_m3u_file"
fi
if [[ -f "output/result_cache.pkl" ]]; then
git add -f "output/result_cache.pkl"
if [[ -f "output/cache.pkl" ]]; then
git add -f "output/cache.pkl"
fi
if [[ -f "output/user_result.log" ]]; then
git add -f "output/user_result.log"
elif [[ -f "output/result.log" ]]; then
git add -f "output/result.log"
if [[ -f "output/sort.log" ]]; then
git add -f "output/sort.log"
fi
if [[ -f "updates/fofa/fofa_hotel_region_result.pkl" ]]; then
git add -f "updates/fofa/fofa_hotel_region_result.pkl"
Expand Down
13 changes: 5 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,15 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.13'
update-environment: true
cache: 'pipenv'

- name: Install pipenv
run: pip3 install --user pipenv

- name: Install dependencies with pipenv
run: pipenv --python 3.8 && pipenv install

- name: Install PyInstaller
run: pipenv install pyinstaller
run: pipenv --python 3.13 && pipenv install --dev

- name: Build the application
run: pipenv run pyinstaller tkinter_ui/tkinter_ui.spec
Expand All @@ -36,7 +33,7 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: iptv-update-tool
name: IPTV
path: dist

- name: Get version from version.json
Expand Down Expand Up @@ -79,6 +76,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/iptv-update-tool.exe
asset_name: iptv-update-tool.exe
asset_path: dist/IPTV.exe
asset_name: IPTV.exe
asset_content_type: application/octet-stream
35 changes: 33 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,36 @@
# 更新日志(Changelog)

## v1.5.4

### 2024/11/29

- ⚠️ Python 升级至 3.13,该版本已不支持 Win7,若有需要请使用 v1.5.3
- ⚠️ Github 仓库改名:iptv-api,使用旧接口地址请及时更换新地址
- ⚠️ Docker 新镜像仓库启用:guovern/iptv-api(旧版的 tv-driver 改为:guovern/iptv-api:latest,tv-requests 改为 guovern/iptv-api:lite),iptv-api:latest 为完整版、iptv-api:lite 为精简版,请使用新的名称命令进行拉取,旧仓库将不再维护
- ❤️ 新增微信公众号关注途径(公众号搜索:Govin),推荐关注公众号,可订阅更新通知与使用技巧等文章推送,还可进行交流讨论
- ✨ 更换测速方法(yt-dlp),重构测速逻辑,提升准确性、稳定性与效率,减小接口切换延迟(#563)
- ✨ 新增支持 ARM v7(#562)
- ✨ 新增双结果 API 访问(ip/m3u, ip/txt)(#581)
- ✨ 新增启动 API 服务命令(pipenv run service)
- 🪄 优化 Docker 镜像大小(完整版:-25%,精简版:-66%)
- 🐛 修复部分播放器不支持的信息间隔符(#581)

<details>
<summary>English</summary>

- ⚠️ Python has been upgraded to version 3.13, which no longer supports Win7. If needed, please use version v1.5.3.
- ⚠️ The GitHub repository has been renamed to iptv-api. If you are using the old API address, please update it to the new one promptly.
- ⚠️ New Docker image repository is now active: guovern/iptv-api (the old tv-driver is now guovern/iptv-api:latest, and tv-requests is now guovern/iptv-api:lite). iptv-api:latest is the full version, and iptv-api:lite is the lightweight version. Please use the new names to pull the images, as the old repository will no longer be maintained.
- ❤️ A new way to follow the WeChat official account (search for: Govin) has been added. It is recommended to follow the official account to subscribe to update notifications, usage tips, and engage in discussions.
- ✨ The speed measurement method has been changed to yt-dlp, and the speed measurement logic has been refactored to improve accuracy, stability, and efficiency, reducing interface switching delay (#563).
- ✨ Support for ARM v7 has been added (#562).
- ✨ Dual result API access (ip/m3u, ip/txt) has been added (#581).
- ✨ A command to start the API service (pipenv run service) has been added.
- 🪄 The size of the Docker image has been optimized (Full version: -25%, Lite version: -66%).
- 🐛 Fixed the information delimiter issue for some players that do not support it (#581).

</details>

## v1.5.3

### 2024/11/19
Expand Down Expand Up @@ -59,7 +90,7 @@
- ✨ 新增频道接口白名单:不参与测速,永远保留在结果最前面(#470)
使用方法:
1. 模板频道接口地址后添加$!即可实现(如:广东珠江,http://xxx.m3u$! )
2. 额外信息补充(如:广东珠江,http://xxx.m3u$!额外信息 ),更多接口白名单请至/~https://github.com/Guovin/TV/issues/514 讨论
2. 额外信息补充(如:广东珠江,http://xxx.m3u$!额外信息 ),更多接口白名单请至/~https://github.com/Guovin/iptv-api/issues/514 讨论
- ✨ 新增 🈳 无结果频道分类:无结果频道默认归类至该底部分类下(#473)
- ✨ 接口地址增加来源类型说明
- ✨ 默认模板增加广东民生(#481)、广州综合(#504)
Expand All @@ -78,7 +109,7 @@
- ✨ Added channel interface whitelist: Not participating in speed testing, always kept at the very front of the results. (#470)
Usage:
1. Add $! after the template channel interface address (e.g., Guangdong Pearl River, http://xxx.m3u$!).
2. Additional information can be appended (e.g., Guangdong Pearl River, http://xxx.m3u$! Additional Information) (#470). For more interface whitelists, please discuss at /~https://github.com/Guovin/TV/issues/514.
2. Additional information can be appended (e.g., Guangdong Pearl River, http://xxx.m3u$! Additional Information) (#470). For more interface whitelists, please discuss at /~https://github.com/Guovin/iptv-api/issues/514.
- ✨ Added 🈳 No Results Channel Category: Channels without results are categorized under this bottom category by default (#473).
- ✨ Interface addresses now include source type descriptions.
- ✨ Default templates now include Guangdong People's Livelihood (#481) and Guangzhou Comprehensive (#504).
Expand Down
75 changes: 41 additions & 34 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,51 +1,58 @@
FROM python:3.8-slim
FROM python:3.13 AS builder

ARG APP_WORKDIR=/tv
ARG LITE=False

ENV APP_WORKDIR=$APP_WORKDIR
WORKDIR /app

COPY . $APP_WORKDIR
COPY Pipfile* ./

WORKDIR $APP_WORKDIR
RUN pip install -i https://mirrors.aliyun.com/pypi/simple pipenv

RUN pip install -i https://mirrors.aliyun.com/pypi/simple pipenv \
&& pipenv install

RUN echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware\n \
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware\n \
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware\n \
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware\n \
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware\n \
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware\n \
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware\n \
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security/ bookworm-security main contrib non-free non-free-firmware\n \
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security/ bookworm-security main contrib non-free non-free-firmware\n" \
> /etc/apt/sources.list
RUN PIPENV_VENV_IN_PROJECT=1 pipenv install --deploy\
&& if [ "$LITE" = False ]; then pipenv install selenium; fi

RUN apt-get update && apt-get install -y --no-install-recommends \
cron \
ffmpeg

ARG INSTALL_CHROMIUM=false
FROM python:3.13-slim

ARG APP_WORKDIR=/iptv-api
ARG LITE=False

ENV APP_WORKDIR=$APP_WORKDIR
ENV LITE=$LITE
ENV PATH="/.venv/bin:$PATH"

WORKDIR $APP_WORKDIR

COPY . $APP_WORKDIR

COPY --from=builder /app/.venv /.venv

RUN echo "deb https://mirrors.aliyun.com/debian/ bookworm main contrib non-free non-free-firmware\n \
deb-src https://mirrors.aliyun.com/debian/ bookworm main contrib non-free non-free-firmware\n \
deb https://mirrors.aliyun.com/debian/ bookworm-updates main contrib non-free non-free-firmware\n \
deb-src https://mirrors.aliyun.com/debian/ bookworm-updates main contrib non-free non-free-firmware\n \
deb-src https://mirrors.aliyun.com/debian/ bookworm-updates main contrib non-free non-free-firmware\n \
deb https://mirrors.aliyun.com/debian/ bookworm-backports main contrib non-free non-free-firmware\n \
deb-src https://mirrors.aliyun.com/debian/ bookworm-backports main contrib non-free non-free-firmware\n \
deb https://mirrors.aliyun.com/debian-security/ bookworm-security main contrib non-free non-free-firmware\n \
deb-src https://mirrors.aliyun.com/debian-security/ bookworm-security main contrib non-free non-free-firmware\n" \
> /etc/apt/sources.list

RUN if [ "$INSTALL_CHROMIUM" = "true" ]; then \
apt-get install -y --no-install-recommends \
chromium \
chromium-driver; \
fi
RUN apt-get update && apt-get install -y --no-install-recommends cron

RUN apt-get clean && rm -rf /var/lib/apt/lists/*
RUN if [ "$LITE" = False ]; then apt-get install -y --no-install-recommends chromium chromium-driver; fi \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

RUN (crontab -l ; \
echo "0 22 * * * cd $APP_WORKDIR && /usr/local/bin/pipenv run python main.py scheduled_task"; \
echo "0 10 * * * cd $APP_WORKDIR && /usr/local/bin/pipenv run python main.py scheduled_task") | crontab -
echo "0 22 * * * cd $APP_WORKDIR && /.venv/bin/python main.py"; \
echo "0 10 * * * cd $APP_WORKDIR && /.venv/bin/python main.py") | crontab -

EXPOSE 8000

COPY entrypoint.sh /tv_entrypoint.sh
COPY entrypoint.sh /iptv-api-entrypoint.sh

COPY config /tv_config
COPY config /iptv-api-config

RUN chmod +x /tv_entrypoint.sh
RUN chmod +x /iptv-api-entrypoint.sh

ENTRYPOINT /tv_entrypoint.sh
ENTRYPOINT /iptv-api-entrypoint.sh
26 changes: 21 additions & 5 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@ url = "https://mirrors.aliyun.com/pypi/simple"
verify_ssl = true

[scripts]
build = "python main.py"
dev = "python main.py"
service = "python service/app.py"
ui = "python tkinter_ui/tkinter_ui.py"
multicast_tmp = "python updates/multicast/update_tmp.py"
docker_run = "docker run -v ./config:/iptv-api/config -v ./output:/iptv-api/output -d -p 8000:8000 guovern/iptv-api"
docker_run_lite = "docker run -v ./config:/iptv-api-lite/config -v ./output:/iptv-api-lite/output -d -p 8000:8000 guovern/iptv-api:lite"
tkinter_build = "pyinstaller tkinter_ui/tkinter_ui.spec"
docker_build = "docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --build-arg APP_WORKDIR=/iptv-api -t guovern/iptv-api ."
docker_build_lite = "docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --build-arg APP_WORKDIR=/iptv-api-lite --build-arg LITE=True -t guovern/iptv-api:lite ."

[dev-packages]

[packages]
requests = "*"
selenium = "*"
bs4 = "*"
Expand All @@ -21,8 +24,21 @@ aiohttp = "*"
flask = "*"
opencc-python-reimplemented = "*"
fake-useragent = "*"
pillow = "*"
yt-dlp = "*"

[packages]
requests = "*"
bs4 = "*"
tqdm = "*"
async-timeout = "*"
aiohttp = "*"
flask = "*"
opencc-python-reimplemented = "*"
fake-useragent = "*"
gunicorn = "*"
pillow = "*"
yt-dlp = "*"

[requires]
python_version = "3.8"
python_version = "3.13"
Loading