Skip to content

Commit c79530e

Browse files
authored
Merge pull request #99 from net00-1/api_4.1
API 4.1: Fixed issue with yt-dlp module loading during some background updates
2 parents ad11f10 + 824fd58 commit c79530e

3 files changed

Lines changed: 8 additions & 9 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Returns data for the latest update
88

99
## api/content/SW_DLT.py
1010

11-
Returns latest version of the internal script
11+
Returns latest stable version of the internal script
1212

1313
## api/dev_content/SW_DLT.py
1414

api/content/SW_DLT.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
# Official release on GitHub, avoid unknown sources
33

44
import urllib.parse
5-
import contextlib
65
import subprocess
6+
import importlib
77
import datetime
88
import hashlib
99
import shutil
@@ -78,6 +78,8 @@ def update_check():
7878

7979
if current_time - last_check < 600:
8080
subprocess.run("pip -q install gallery-dl yt-dlp --disable-pip-version-check --upgrade")
81+
#yt-dlp is reloaded here to avoid issues after updates
82+
importlib.reload(yt_dlp)
8183

8284
show_progress("util", 2, 2)
8385

@@ -295,6 +297,3 @@ def main():
295297

296298
if __name__ == "__main__":
297299
subprocess.run("open " + main())
298-
# Post-run cleanup
299-
subprocess.run("deactivate")
300-
subprocess.run("clear")

api/updates/latest.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"result": "success",
3-
"version": "4.0.4",
4-
"url": "https://www.icloud.com/shortcuts/de2154bb2c8c42d192c15b3c492c36e1",
5-
"notes": "4.0.4: Fixed environment refresh issue happening on new installations",
6-
"release": "2025-03-08"
3+
"version": "4.1",
4+
"url": "https://www.icloud.com/shortcuts/abac2cfafc3a46b28c8c706a9696153d",
5+
"notes": "4.1: Fixed issue with yt-dlp module loading during some background updates",
6+
"release": "2025-09-25"
77
}

0 commit comments

Comments
 (0)