Pyckplayer 1.0.4__tar.gz → 1.0.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyckplayer-1.0.4/src/Pyckplayer.egg-info → pyckplayer-1.0.6}/PKG-INFO +1 -1
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/setup.py +1 -1
- {pyckplayer-1.0.4 → pyckplayer-1.0.6/src/Pyckplayer.egg-info}/PKG-INFO +1 -1
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/core.py +20 -2
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/LICENSE +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/MANIFEST.in +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/README.md +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/pyproject.toml +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/setup.cfg +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/Pyckplayer.egg-info/SOURCES.txt +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/Pyckplayer.egg-info/dependency_links.txt +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/Pyckplayer.egg-info/entry_points.txt +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/Pyckplayer.egg-info/requires.txt +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/Pyckplayer.egg-info/top_level.txt +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/__init__.py +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/LICENSE +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/css/ckplayer.css +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/css/ckplayer.ixigua.css +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/css/ckplayer.red.css +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/css/images/adclose.png +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/css/images/buffer.png +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/css/images/ckplayer.48.png +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/css/images/ckplayer.png +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/css/images/ckplayer_ixigua.48.png +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/css/images/ckplayer_ixigua.png +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/css/images/ckplayer_red.48.png +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/css/images/ckplayer_red.png +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/css/images/favicon.ico +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/css/images/loading.png +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/css/images/logo.png +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/css/images/play.png +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/flv.js/LICENSE +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/flv.js/README.md +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/flv.js/flv.js +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/flv.js/flv.js.map +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/flv.js/flv.min.js +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/flv.js/flv.min.js.map +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/hls.js/LICENSE +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/hls.js/README.md +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/hls.js/hls-demo.js +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/hls.js/hls-demo.js.map +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/hls.js/hls.js +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/hls.js/hls.js.d.ts +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/hls.js/hls.js.map +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/hls.js/hls.light.js +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/hls.js/hls.light.js.map +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/hls.js/hls.light.min.js +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/hls.js/hls.light.min.js.map +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/hls.js/hls.min.js +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/hls.js/hls.min.js.map +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/js/ckplayer.js +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/js/ckplayer.min.js +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/language/en.js +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/language/zh.cn.js +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/language/zh.hk.js +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/mpegts.js/LICENSE +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/mpegts.js/mpegts.js +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/mpegts.js/mpegts.js.map +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/mpegts.js/mpegts.min.js +0 -0
- {pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/cli.py +0 -0
|
@@ -91,6 +91,18 @@ def download_cover(poster_url: Optional[str], silent: bool = True) -> Optional[s
|
|
|
91
91
|
return None
|
|
92
92
|
|
|
93
93
|
|
|
94
|
+
def is_live_url(url: str) -> bool:
|
|
95
|
+
url_lower = url.lower()
|
|
96
|
+
live_keywords = [
|
|
97
|
+
'/live/', '/stream/', '/broadcast/', '/live-stream/',
|
|
98
|
+
'live.', 'stream.', 'live_', 'stream_',
|
|
99
|
+
'?live', '&live', '=live',
|
|
100
|
+
'douyincdn.com', 'live.kuaishou.com', 'live.bilibili.com',
|
|
101
|
+
'live.douyin.com', 'live.qq.com', 'live.weibo.com'
|
|
102
|
+
]
|
|
103
|
+
return any(keyword in url_lower for keyword in live_keywords)
|
|
104
|
+
|
|
105
|
+
|
|
94
106
|
def detect_stream_type(url: str) -> str:
|
|
95
107
|
url_lower = url.lower()
|
|
96
108
|
if '.m3u8' in url_lower or '/hls/' in url_lower:
|
|
@@ -114,6 +126,7 @@ def generate_html(video_url: str,
|
|
|
114
126
|
favicon_path = quote((script_dir / "ckplayer" / "css" / "images" / "logo.png").as_posix())
|
|
115
127
|
|
|
116
128
|
stream_type = detect_stream_type(video_url)
|
|
129
|
+
is_live = is_live_url(video_url)
|
|
117
130
|
|
|
118
131
|
video_object = {
|
|
119
132
|
"container": "#player",
|
|
@@ -126,12 +139,17 @@ def generate_html(video_url: str,
|
|
|
126
139
|
|
|
127
140
|
if stream_type == 'hls':
|
|
128
141
|
video_object["plug"] = "hls.js"
|
|
129
|
-
|
|
142
|
+
if is_live:
|
|
143
|
+
video_object["live"] = True
|
|
130
144
|
elif stream_type == 'flv':
|
|
131
145
|
video_object["plug"] = "flv.js"
|
|
132
|
-
|
|
146
|
+
if is_live:
|
|
147
|
+
video_object["live"] = True
|
|
133
148
|
elif stream_type == 'ts':
|
|
134
149
|
video_object["plug"] = "mpegts.js"
|
|
150
|
+
if is_live:
|
|
151
|
+
video_object["live"] = True
|
|
152
|
+
elif stream_type == 'mp4' and is_live:
|
|
135
153
|
video_object["live"] = True
|
|
136
154
|
|
|
137
155
|
if poster_url:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/css/images/ckplayer_ixigua.48.png
RENAMED
|
File without changes
|
{pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/css/images/ckplayer_ixigua.png
RENAMED
|
File without changes
|
{pyckplayer-1.0.4 → pyckplayer-1.0.6}/src/pyckplayer/ckplayer/css/images/ckplayer_red.48.png
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|