mirror of
https://github.com/vinefeeder/TwinVine.git
synced 2026-07-15 18:10:04 +02:00
updates
This commit is contained in:
@@ -195,7 +195,7 @@ class dl:
|
||||
@click.option(
|
||||
"--sub-format",
|
||||
type=SubtitleCodecChoice(Subtitle.Codec),
|
||||
default="srt",
|
||||
default=None,
|
||||
help="Set Output Subtitle Format, only converting if necessary.",
|
||||
)
|
||||
@click.option("-V", "--video-only", is_flag=True, default=False, help="Only download video tracks.")
|
||||
@@ -1542,11 +1542,15 @@ class dl:
|
||||
# All DecryptLabs CDMs use DecryptLabsRemoteCDM
|
||||
return None
|
||||
else:
|
||||
del cdm_api["name"]
|
||||
if "type" in cdm_api:
|
||||
del cdm_api["type"]
|
||||
return RemoteCdm(**cdm_api)
|
||||
|
||||
return RemoteCdm(
|
||||
device_type=cdm_api['Device Type'],
|
||||
system_id=cdm_api['System ID'],
|
||||
security_level=cdm_api['Security Level'],
|
||||
host=cdm_api['Host'],
|
||||
secret=cdm_api['Secret'],
|
||||
device_name=cdm_api['Device Name'],
|
||||
)
|
||||
|
||||
prd_path = config.directories.prds / f"{cdm_name}.prd"
|
||||
if not prd_path.is_file():
|
||||
prd_path = config.directories.wvds / f"{cdm_name}.prd"
|
||||
|
||||
@@ -8,7 +8,7 @@ from Crypto.Random import get_random_bytes
|
||||
from pyplayready.cdm import Cdm
|
||||
from pyplayready.crypto.ecc_key import ECCKey
|
||||
from pyplayready.device import Device
|
||||
from pyplayready.exceptions import InvalidCertificateChain, OutdatedDevice
|
||||
from pyplayready import InvalidCertificateChain, OutdatedDevice
|
||||
from pyplayready.system.bcert import Certificate, CertificateChain
|
||||
from pyplayready.system.pssh import PSSH
|
||||
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
import atexit
|
||||
import logging
|
||||
import warnings
|
||||
from pathlib import Path
|
||||
|
||||
import click
|
||||
import urllib3
|
||||
from rich import traceback
|
||||
|
||||
# Suppress SyntaxWarning from unmaintained tinycss package (dependency of subby)
|
||||
warnings.filterwarnings("ignore", category=SyntaxWarning, module="tinycss")
|
||||
|
||||
from rich.console import Group
|
||||
from rich.padding import Padding
|
||||
from rich.text import Text
|
||||
|
||||
@@ -3,6 +3,8 @@ import sys
|
||||
from pathlib import Path
|
||||
from typing import Optional
|
||||
|
||||
from mypy.types import names
|
||||
|
||||
__shaka_platform = {"win32": "win", "darwin": "osx"}.get(sys.platform, sys.platform)
|
||||
|
||||
|
||||
@@ -15,16 +17,17 @@ def find(*names: str) -> Optional[Path]:
|
||||
for name in names:
|
||||
# First check local binaries folder
|
||||
if local_binaries_dir.exists():
|
||||
local_path = local_binaries_dir / name
|
||||
if local_path.is_file() and local_path.stat().st_mode & 0o111: # Check if executable
|
||||
return local_path
|
||||
|
||||
# Also check with .exe extension on Windows
|
||||
# On Windows, check for .exe extension first
|
||||
if sys.platform == "win32":
|
||||
local_path_exe = local_binaries_dir / f"{name}.exe"
|
||||
local_path_exe = local_binaries_dir / f"{name}" / f"{name}.exe"
|
||||
if local_path_exe.is_file():
|
||||
return local_path_exe
|
||||
|
||||
# Check for exact name match with executable bit on Unix-like systems
|
||||
local_path = local_binaries_dir / f"{name}" / f"{name}"
|
||||
if local_path.is_file() and local_path.stat().st_mode & 0o111: # Check if executable
|
||||
return local_path
|
||||
|
||||
# Fall back to system PATH
|
||||
path = shutil.which(name)
|
||||
if path:
|
||||
@@ -74,4 +77,4 @@ __all__ = (
|
||||
"HDR10PlusTool",
|
||||
"Mp4decrypt",
|
||||
"find",
|
||||
)
|
||||
)
|
||||
@@ -10,7 +10,7 @@ from appdirs import AppDirs
|
||||
class Config:
|
||||
class _Directories:
|
||||
# default directories, do not modify here, set via config
|
||||
app_dirs = AppDirs("unshackle", False)
|
||||
app_dirs = AppDirs("./", False)
|
||||
core_dir = Path(__file__).resolve().parent
|
||||
namespace_dir = core_dir.parent
|
||||
commands = namespace_dir / "commands"
|
||||
|
||||
@@ -253,7 +253,7 @@ class DASH:
|
||||
):
|
||||
if not session:
|
||||
session = Session()
|
||||
elif not isinstance(session, Session):
|
||||
elif not isinstance(session, (Session, CurlSession)):
|
||||
raise TypeError(f"Expected session to be a {Session}, not {session!r}")
|
||||
|
||||
if proxy:
|
||||
|
||||
@@ -21,12 +21,12 @@ try:
|
||||
from devine.core.tracks import Chapter, Chapters, Tracks # type: ignore
|
||||
except ImportError:
|
||||
try:
|
||||
from unshackle.core.credential import Credential
|
||||
from unshackle.core.manifests import DASH, HLS
|
||||
from unshackle.core.search_result import SearchResult
|
||||
from unshackle.core.service import Service
|
||||
from unshackle.core.titles import Episode, Movie, Movies, Series
|
||||
from unshackle.core.tracks import Chapter, Chapters, Tracks
|
||||
from envied.core.credential import Credential
|
||||
from envied.core.manifests import DASH, HLS
|
||||
from envied.core.search_result import SearchResult
|
||||
from envied.core.service import Service
|
||||
from envied.core.titles import Episode, Movie, Movies, Series
|
||||
from envied.core.tracks import Chapter, Chapters, Tracks
|
||||
except ImportError:
|
||||
try:
|
||||
from envied.core.credential import Credential
|
||||
|
||||
Reference in New Issue
Block a user