mirror of
https://github.com/ayasa520/redroid-script.git
synced 2026-11-25 14:24:33 +08:00
24 lines
1.0 KiB
Python
24 lines
1.0 KiB
Python
import os
|
|
import shutil
|
|
from stuffs.general import General
|
|
from tools.helper import bcolors, get_download_dir, print_color, run
|
|
|
|
|
|
class Widevine(General):
|
|
download_loc = get_download_dir()
|
|
copy_dir = "./widevine"
|
|
dl_link = "https://codeload.github.com/supremegamers/vendor_google_proprietary_widevine-prebuilt/zip/94c9ee172e3d78fecc81863f50a59e3646f7a2bd"
|
|
dl_file_name = os.path.join(download_loc, "widevine.zip")
|
|
extract_to = "/tmp/widevineunpack"
|
|
act_md5 = "a31f325453c5d239c21ecab8cfdbd878"
|
|
|
|
def download(self):
|
|
print_color("Downloading widevine now .....", bcolors.GREEN)
|
|
super().download()
|
|
|
|
def copy(self):
|
|
run(["chmod", "+x", self.extract_to, "-R"])
|
|
print_color("Copying widevine library files ...", bcolors.GREEN)
|
|
shutil.copytree(os.path.join(self.extract_to, "vendor_google_proprietary_widevine-prebuilt-94c9ee172e3d78fecc81863f50a59e3646f7a2bd",
|
|
"prebuilts"), os.path.join(self.copy_dir, "vendor"), dirs_exist_ok=True)
|