Skip to content

Commit

Permalink
show if dee's version is -master but don't fail during version parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
pcroland committed Jan 5, 2024
1 parent 8712fbd commit aae7a26
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deew/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def parse_version_string(inp: list) -> str:
try:
v = subprocess.run(inp, capture_output=True, encoding='utf-8').stdout
v = v.split('\n')[0].split(' ')[2]
v = v.replace(',', '').replace('-static', '').replace('-master', '')
v = v.replace(',', '').replace('-static', '')
if len(v) > 30:
v = f'{v[0:27]}...'
except Exception:
Expand Down Expand Up @@ -477,7 +477,7 @@ def encode(task_id: TaskID, settings: list) -> None:

progress = re.search(r'Stage progress: ([0-9]+\.[0-9])', line)
if progress and progress[1] != '100.0':
if aformat != 'thd' and version.parse(simplens.dee_version) >= version.parse('5.2.0') and not encoding_step:
if aformat != 'thd' and version.parse(simplens.dee_version.replace('-master', '')) >= version.parse('5.2.0') and not encoding_step:
pb.update(task_id=task_id, completed=float(progress[1]) / 4)
else:
pb.update(task_id=task_id, completed=float(progress[1]))
Expand Down

0 comments on commit aae7a26

Please sign in to comment.