Skip to content

Commit

Permalink
figure out windows platform version
Browse files Browse the repository at this point in the history
  • Loading branch information
cdgriffith committed May 29, 2024
1 parent fca27d4 commit 2465b36
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ jobs:
python -m pip install --upgrade pip setuptools --ignore-installed
pip install .
pip install .[develop]
python -c "import platform;print(f'PLATFORM PLATFORM {platform.platform()}')"
- name: Grab iso-639 lists
Expand Down
11 changes: 9 additions & 2 deletions fastflix/entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,15 @@ def main(portable_mode=False):
import platform

try:
win_ver = int(platform.platform().lower().split("-")[1])
except Exception:
windows_version_string = platform.platform().lower().split("-")[1]
if "server" in windows_version_string:
# Windows-2022Server-10.0.20348-SP0
server_version = int(windows_version_string[:4])
win_ver = 0 if server_version < 2016 else 10
else:
win_ver = int(windows_version_string)
except Exception as error:
print(f"COULD NOT DETERMINE WINDOWS VERSION FROM: {platform.platform()} - {error}")
win_ver = 0
if win_ver < 10:
input(
Expand Down

0 comments on commit 2465b36

Please sign in to comment.