Skip to content

Commit dc316a8

Browse files
committed
Allow updates skipping
1 parent 1900129 commit dc316a8

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

docker_run.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
#! /usr/bin/env sh
22

3-
pip install --no-cache-dir -t $YDL_PYTHONPATH --upgrade $YOUTUBE_DL
4-
PYTHONPATH="${PYTHONPATH}:${YDL_PYTHONPATH}" python -u ./youtube-dl-server.py
3+
PYTHONPATH="${PYTHONPATH}:${YDL_PYTHONPATH}" python -u ./youtube-dl-server.py

ydl_server/ydlhandler.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ def worker(self):
105105
self.queue.task_done()
106106

107107
def update(self):
108+
if self.app_config["ydl_server"].get("no_updates", False):
109+
return 0, ""
108110
print(f"Updating: Current {self.ydl_module_name} version: {self.ydl_version}")
109111
if os.environ.get("YDL_PYTHONPATH"):
110112
command = [
@@ -226,4 +228,4 @@ def resume_pending(self):
226228

227229
def join(self):
228230
if self.thread is not None:
229-
return self.thread.join()
231+
return self.thread.join()

0 commit comments

Comments
 (0)