mirror of
https://github.com/ovosimpatico/CLI-TikTok.git
synced 2026-01-15 11:52:52 -03:00
I messed up - Updater fix
* Not using external lib to get the version anymore * Remove `atoma` from requirements.txt, it's not used since the scraping update Signed-off-by: nanometer5088 <code.deleo@simplelogin.com>
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
yt_dlp
|
yt_dlp
|
||||||
requests
|
requests
|
||||||
atoma
|
|
||||||
distro
|
distro
|
||||||
bs4
|
bs4
|
||||||
10
src/init.py
10
src/init.py
@@ -50,10 +50,14 @@ def init(silent):
|
|||||||
|
|
||||||
log("Started update / networking test")
|
log("Started update / networking test")
|
||||||
try:
|
try:
|
||||||
import ast
|
link = requests.get("https://raw.githubusercontent.com/nanometer5088/CLI-TikTok/main/src/constants.py").text.strip()
|
||||||
link = requests.get("https://raw.githubusercontent.com/nanometer5088/CLI-TikTok/main/src/constants.py")
|
|
||||||
userversion = _read_user_version()
|
userversion = _read_user_version()
|
||||||
data = str(ast.literal_eval(link.text.split("APP = ")[1])["version"])
|
|
||||||
|
version_line = next(line for line in link.split('\n')
|
||||||
|
if line.startswith(' "version": '))
|
||||||
|
data = version_line.split(': ')[1]
|
||||||
|
|
||||||
if userversion < data:
|
if userversion < data:
|
||||||
log(f"New version detected! User version is {userversion}, but {data} was found on Github.")
|
log(f"New version detected! User version is {userversion}, but {data} was found on Github.")
|
||||||
clear_screen()
|
clear_screen()
|
||||||
|
|||||||
Reference in New Issue
Block a user