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(
|
@click.option(
|
||||||
"--sub-format",
|
"--sub-format",
|
||||||
type=SubtitleCodecChoice(Subtitle.Codec),
|
type=SubtitleCodecChoice(Subtitle.Codec),
|
||||||
default="srt",
|
default=None,
|
||||||
help="Set Output Subtitle Format, only converting if necessary.",
|
help="Set Output Subtitle Format, only converting if necessary.",
|
||||||
)
|
)
|
||||||
@click.option("-V", "--video-only", is_flag=True, default=False, help="Only download video tracks.")
|
@click.option("-V", "--video-only", is_flag=True, default=False, help="Only download video tracks.")
|
||||||
@@ -1542,10 +1542,14 @@ class dl:
|
|||||||
# All DecryptLabs CDMs use DecryptLabsRemoteCDM
|
# All DecryptLabs CDMs use DecryptLabsRemoteCDM
|
||||||
return None
|
return None
|
||||||
else:
|
else:
|
||||||
del cdm_api["name"]
|
return RemoteCdm(
|
||||||
if "type" in cdm_api:
|
device_type=cdm_api['Device Type'],
|
||||||
del cdm_api["type"]
|
system_id=cdm_api['System ID'],
|
||||||
return RemoteCdm(**cdm_api)
|
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"
|
prd_path = config.directories.prds / f"{cdm_name}.prd"
|
||||||
if not prd_path.is_file():
|
if not prd_path.is_file():
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ from Crypto.Random import get_random_bytes
|
|||||||
from pyplayready.cdm import Cdm
|
from pyplayready.cdm import Cdm
|
||||||
from pyplayready.crypto.ecc_key import ECCKey
|
from pyplayready.crypto.ecc_key import ECCKey
|
||||||
from pyplayready.device import Device
|
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.bcert import Certificate, CertificateChain
|
||||||
from pyplayready.system.pssh import PSSH
|
from pyplayready.system.pssh import PSSH
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,15 @@
|
|||||||
import atexit
|
import atexit
|
||||||
import logging
|
import logging
|
||||||
|
import warnings
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
import click
|
import click
|
||||||
import urllib3
|
import urllib3
|
||||||
from rich import traceback
|
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.console import Group
|
||||||
from rich.padding import Padding
|
from rich.padding import Padding
|
||||||
from rich.text import Text
|
from rich.text import Text
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ import sys
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
|
from mypy.types import names
|
||||||
|
|
||||||
__shaka_platform = {"win32": "win", "darwin": "osx"}.get(sys.platform, sys.platform)
|
__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:
|
for name in names:
|
||||||
# First check local binaries folder
|
# First check local binaries folder
|
||||||
if local_binaries_dir.exists():
|
if local_binaries_dir.exists():
|
||||||
local_path = local_binaries_dir / name
|
# On Windows, check for .exe extension first
|
||||||
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
|
|
||||||
if sys.platform == "win32":
|
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():
|
if local_path_exe.is_file():
|
||||||
return local_path_exe
|
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
|
# Fall back to system PATH
|
||||||
path = shutil.which(name)
|
path = shutil.which(name)
|
||||||
if path:
|
if path:
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ from appdirs import AppDirs
|
|||||||
class Config:
|
class Config:
|
||||||
class _Directories:
|
class _Directories:
|
||||||
# default directories, do not modify here, set via config
|
# default directories, do not modify here, set via config
|
||||||
app_dirs = AppDirs("unshackle", False)
|
app_dirs = AppDirs("./", False)
|
||||||
core_dir = Path(__file__).resolve().parent
|
core_dir = Path(__file__).resolve().parent
|
||||||
namespace_dir = core_dir.parent
|
namespace_dir = core_dir.parent
|
||||||
commands = namespace_dir / "commands"
|
commands = namespace_dir / "commands"
|
||||||
|
|||||||
@@ -253,7 +253,7 @@ class DASH:
|
|||||||
):
|
):
|
||||||
if not session:
|
if not session:
|
||||||
session = 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}")
|
raise TypeError(f"Expected session to be a {Session}, not {session!r}")
|
||||||
|
|
||||||
if proxy:
|
if proxy:
|
||||||
|
|||||||
@@ -21,12 +21,12 @@ try:
|
|||||||
from devine.core.tracks import Chapter, Chapters, Tracks # type: ignore
|
from devine.core.tracks import Chapter, Chapters, Tracks # type: ignore
|
||||||
except ImportError:
|
except ImportError:
|
||||||
try:
|
try:
|
||||||
from unshackle.core.credential import Credential
|
from envied.core.credential import Credential
|
||||||
from unshackle.core.manifests import DASH, HLS
|
from envied.core.manifests import DASH, HLS
|
||||||
from unshackle.core.search_result import SearchResult
|
from envied.core.search_result import SearchResult
|
||||||
from unshackle.core.service import Service
|
from envied.core.service import Service
|
||||||
from unshackle.core.titles import Episode, Movie, Movies, Series
|
from envied.core.titles import Episode, Movie, Movies, Series
|
||||||
from unshackle.core.tracks import Chapter, Chapters, Tracks
|
from envied.core.tracks import Chapter, Chapters, Tracks
|
||||||
except ImportError:
|
except ImportError:
|
||||||
try:
|
try:
|
||||||
from envied.core.credential import Credential
|
from envied.core.credential import Credential
|
||||||
|
|||||||
Reference in New Issue
Block a user