| 1 | #!/usr/bin/env python3 |
| 2 | import hashlib |
| 3 | from pathlib import Path |
| 4 | import urllib.request |
| 5 | |
| 6 | |
| 7 | version = "5.0.0.0" |
| 8 | digest = "61d29c16d8840900fad6ce0fb6a0e59abc6a350382390d293ec9bfbcdb84d840" |
| 9 | name = f"sso-authentication_{version}.zip" |
| 10 | url = f"https://github.com/xdnewlun1/Jellyfin-OAuth-Plugin/releases/download/v{version}/{name}" |
| 11 | with urllib.request.urlopen(url, timeout=30) as response: |
| 12 | archive = response.read() |
| 13 | if hashlib.sha256(archive).hexdigest() != digest: |
| 14 | raise ValueError("SSO plugin archive checksum mismatch") |
| 15 | Path(__file__).with_name(name).write_bytes(archive) |