tis-spotify-uwp
1.205.1006.0-30
Spotify UWP Client
3112 downloads
See build result See VirusTotal scan

Description
- package : tis-spotify-uwp
- name : Spotify UWP
- version : 1.205.1006.0-30
- categories : Media
- maintainer : WAPT Team,Tranquil IT,Jimmy PELÉ,Pierre COSSON
- installed_size : 211780847
- editor : Spotify AB
- licence : Proprietary
- signature_date : 2023-02-26T18:00:21.305644
- size : 145.23 Mo
- locale : all
- target_os : windows
- impacted_process : Spotify
- architecture : all
- Homepage : https://www.spotify.com/download
- Conflicts :
control
package : tis-spotify-uwp
version : 1.205.1006.0-30
architecture : all
section : base
priority : optional
name : Spotify UWP
categories : Media
maintainer : WAPT Team,Tranquil IT,Jimmy PELÉ,Pierre COSSON
description : Spotify UWP Client
depends :
conflicts : tis-spotify
maturity : PROD
locale : all
target_os : windows
min_wapt_version : 2.2
sources : https://apps.microsoft.com/store/detail/9NCBCSZSJRSB
installed_size : 211780847
impacted_process : Spotify
description_fr : Client Spotify UWP
description_pl : Klient Spotify UWP
description_de : Spotify UWP-Client
description_es : Cliente UWP de Spotify
description_pt : Spotify UWP Client
description_it : Client UWP di Spotify
description_nl : Spotify UWP client
description_ru : UWP-клиент Spotify
audit_schedule :
editor : Spotify AB
keywords : music
licence : Proprietary
homepage : https://www.spotify.com/download
package_uuid : a5db4a24-49d8-4913-948a-e0084f75a7ea
valid_from :
valid_until :
forced_install_on :
changelog :
min_os_version : 10.0
max_os_version :
icon_sha256sum : ae600e0d4b046ee3db8d5e373a749f75516a4e39f2e7295753ace7c30682e8a6
signer : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature : JUsgJ6S2qzQO/ACV3p9gjkYcOrGsE7Cq6ErLZfE0hI5RVQ0N7XlcHyJz+oYs8CyG6pC6JpfInkx/v9RYrKqtTFTWyWl3liyCT00qGpGHJ8a496/XeRo67JPP0N5QXN82qagp9/wr2Q8N8dN9EaX4uKaDtojyw0cCs5kR7n71VKUSX5dzyY/wZE3w4OY+04f3hLjal/HMn5PCTIaBoISYT/gWLkVwMfEVfaVRiGtPru0D1vYdsRZ3myDUn80LaKjXt1maNgY5y7o/cFbQwNERUgTgK/u84YxxkpMKbRH9ZIKS/raE59gpUx30Gs3bXX9AaOhIyXNdZ+Tj86qmGaECVA==
signature_date : 2023-02-26T18:00:21.305644
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes
Setup.py
# -*- coding: utf-8 -*-
from setuphelpers import *
appx_package = "SpotifyAB.SpotifyMusic"
appx_dir = makepath(programfiles, "WindowsAppsInstallers")
windows_min_os_version = WindowsVersions.Windows10v1809 # You should consult the control.sources URL to get this information
allow_remove = True
def install():
# Declare local variables
bins_dir = control.package.split("-", 1)[1]
appx_bins_dir = makepath(appx_dir, bins_dir)
# Remove from old path
for appx_file in glob.glob(makepath(appx_dir, "%s_*" % appx_package)):
remove_file(appx_file)
# Check the minimum Windows version for this UWP application
if windows_version() >= windows_min_os_version:
# Placing bins
if isdir(appx_bins_dir):
remove_tree(appx_bins_dir)
mkdirs(appx_dir)
print(f"Create: {appx_bins_dir}")
shutil.move(bins_dir, appx_bins_dir)
else:
error(
"This Windows version (%s) need to be upgraded to minimum version (%s) to use this package" % (windows_version(), windows_min_os_version)
)
def session_setup():
# Declare local variables
bins_dir = control.package.split("-", 1)[1]
appx_bins_dir = makepath(appx_dir, bins_dir)
bin_path = glob.glob(makepath(appx_bins_dir, f"{appx_package}*"))[0]
dependencies_pathes = ",".join([f'"{a}"' for a in glob.glob(makepath(appx_bins_dir, "*")) if not appx_package in a])
# Installing the UWP application in the user environment
appx_version = get_powershell_str("Get-AppxPackage -Name %s" % appx_package, "Version")
if not appx_version or Version(appx_version) < Version(control.get_software_version()) or force:
print("Installing: %s" % bin_path.split("\\")[-1])
add_appx_cmd = f'Add-AppxPackage -Path "{bin_path}"'
if dependencies_pathes:
add_appx_cmd += f" -DependencyPath {dependencies_pathes}"
run_powershell(add_appx_cmd)
else:
print("%s is installed in correct version (%s)" % (appx_package, appx_version))
def uninstall():
# Declare local variables
bins_dir = control.package.split("-", 1)[1]
appx_bins_dir = makepath(appx_dir, bins_dir)
if allow_remove:
remove_appx(appx_package)
if isdir(appx_bins_dir):
print("Remove: %s" % (appx_bins_dir))
remove_tree(appx_bins_dir)
if dir_is_empty(appx_dir):
print("Remove: %s since it is empty" % (appx_dir))
remove_tree(appx_dir)
update_package.py
# -*- coding: utf-8 -*-
from setuphelpers import *
import requests
try:
from setupdevhelpers import *
except:
from bs4 import BeautifulSoup
import json
import waptguihelper
import re
def update_package():
# Declaring local variables
package_updated = False
proxies = get_proxies()
if not proxies:
proxies = get_proxies_from_wapt_console()
store_url = control.sources
if not store_url:
store_id = waptguihelper.input_dialog(
"Choice of app", "Enter the windows store app id (foundable in package url: https://apps.microsoft.com/store/apps)", store_url
).split("/")[-1]
else:
store_id = store_url.split("/")[-1]
store_id = store_id.split("?")[0]
url_ms = "https://apps.microsoft.com/store/detail/%s" % store_id
control.sources = url_ms
control.save_control_to_wapt()
package_prefix = control.package.split("-")[0]
# check setup.py incase the package name doesnt match the installer file
with open("setup.py", "r") as f:
for line in f.readlines():
if line.startswith("appx_package"):
store_package_name = line.split("=")[1].split('"')[1]
break
# Getting info from adguard api
res = requests.post(
"https://store.rg-adguard.net/api/GetFiles",
"type=ProductId&url=%s&ring=RP&lang=fr-FR" % store_id,
headers={"content-type": "application/x-www-form-urlencoded"},
proxies=proxies,
)
all_files = []
page = BeautifulSoup.BeautifulSoup(res.content, features="html.parser")
for bs_search in page.find_all("a"):
if not "BlockMap" in bs_search.text and not "eappxbundle" in bs_search.text and not "emsixbundle" in bs_search.text:
version = bs_search.text.split("_")[1]
bin_name = bs_search.text.replace("~", "_")
download_url = bs_search["href"]
pkg_splitted = re.split(r"_\d+\.", bin_name)[0]
package_name = package_prefix + "-" + pkg_splitted.split("_")[0].replace(".", "-").lower()
software_name = bin_name.split("_")[0].replace("-", " ").replace(".", " ")
if "arm64" in bin_name:
package_arch = "arm64"
elif "arm" in bin_name:
package_arch = "arm"
elif "x64" in bin_name:
package_arch = "x64"
# elif "x86" in bin_name:
# package_arch = "all" # not x86 since it may be required for x64
else:
package_arch = "all"
file_dict = {
"version": version,
"bin_name": bin_name,
"package_name": package_name,
"software_name": software_name,
"package_arch": package_arch,
"download_url": download_url,
}
all_files.append(file_dict)
if "template-microsoft-store" in control.package or not store_package_name:
selected = waptguihelper.grid_dialog(
"Please select the proper file",
json.dumps(all_files),
waptguihelper.GRT_SELECTED,
'{"columns":[{"propertyname":"version","datatype":"String","required":false,"readonly":false,"width":130},{"propertyname":"bin_name","datatype":"String","required":false,"readonly":false,"width":420},{"propertyname":"package_name","datatype":"String","required":false,"readonly":false,"width":190},{"propertyname":"software_name","datatype":"String","required":false,"readonly":false,"width":172},{"propertyname":"package_arch","datatype":"String","required":false,"readonly":false,"width":88},{"propertyname":"download_url","datatype":"String","required":false,"readonly":false,"width":1472}]}',
)
else:
selected = [a for a in all_files if (control.architecture in a["package_arch"] or control.architecture == "all")]
if len(selected) != 1:
higer_version = "0"
for a in all_files:
if Version(higer_version) < Version(a["version"]) and store_package_name in a["bin_name"]:
higer_version = a["version"]
selected = [a for a in selected if higer_version == a["version"] and store_package_name in a["bin_name"]]
# Downloading App
bin_selected = selected[0]
latest_bin = bin_selected["bin_name"]
version = bin_selected["version"]
download_url = bin_selected["download_url"]
package_name = bin_selected["package_name"]
software_name = bin_selected["software_name"]
package_arch = bin_selected["package_arch"]
if download_url.split("/")[2].endswith("microsoft.com"):
if not isfile(latest_bin):
print("Downloading: %s" % latest_bin)
wget(download_url, latest_bin, proxies=proxies)
else:
print("Binary file version corresponds to online version")
else:
error("ERROR: The retrieved url will not download from microsoft's servers")
# Deleting outdated binaries and dependencies
remove_outdated_binaries(version, ["appxbundle", "msixbundle", "appx", "msix", "part"], latest_bin)
bins_dir = control.package.split("-", 1)[1]
if isdir(bins_dir):
remove_tree(bins_dir)
# Downloading dependencies
control.depends = ""
control.save_control_to_wapt()
for dependency in all_files:
latest_bin = dependency["bin_name"]
if store_package_name in latest_bin:
continue
download_url = dependency["download_url"]
if control.architecture == dependency["package_arch"]:
if download_url.split("/")[2].endswith("microsoft.com"):
print("Dependency download URL is: %s" % download_url)
if not isfile(latest_bin):
print("Downloading: %s" % latest_bin)
wget(download_url, latest_bin, proxies=proxies)
else:
print("Binary is present: %s" % latest_bin)
else:
error("ERROR: The retrieved url will not download from microsoft's servers")
else:
continue
# Asking pkg infos if needed
ask_control_categories()
control.architecture = package_arch
ask_control_package(package_name, "template-microsoft-store", remove_base_files=True)
ask_control_name(software_name, "Template Microsoft Store")
ask_control_description("update_package")
# Changing setup.py appx_package variable
new_lines = []
with open("setup.py", "r") as f:
for line in f.readlines():
if line.startswith("appx_package"):
line = 'appx_package = "%s"\n' % latest_bin.split("_")[0]
new_lines.append(line)
with open("setup.py", "w") as f:
f.writelines(new_lines)
# Changing version of the package
if Version(version) > Version(control.get_software_version()):
print("Software version updated (from: %s to: %s)" % (control.get_software_version(), Version(version)))
package_updated = True
else:
print("Software version up-to-date (%s)" % Version(version))
control.set_software_version(version)
control.save_control_to_wapt()
# Placing binaries in a dir ["appxbundle", "msixbundle", "appx", "msix]
bins_dir = control.package.split("-", 1)[1]
mkdirs(bins_dir)
for bin_file in glob.glob("*.appxbundle") + glob.glob("*.msixbundle") + glob.glob("*.appx") + glob.glob("*.msix"):
shutil.move(bin_file, bins_dir)
# Validating or not update-package-sources
return package_updated
def ask_control_description(blank_str=None):
"""Requesting that the user supply package description for the control.description field
Args:
blank_str (str): The description will be cleared if it includes the specified string to avoid using the template description (default: do not clear description)
"""
if not control.description:
control.description = waptguihelper.input_dialog("Description", "Please fill the description", control.description)
control.save_control_to_wapt()
if blank_str is not None and blank_str in control.description:
control.description = ""
control.save_control_to_wapt()
return control.description
def ask_control_categories():
"""Requesting that the user supply package categories for the control.categories field if empty or Template is selected"""
if control.categories == "" or control.categories == "Template":
categories = waptguihelper.grid_dialog(
"Select package categories",
[
"Internet",
"Utilities",
"Messaging",
"Security",
"System and network",
"Media",
"Development",
"Office",
"Drivers",
"Education",
"Configuration",
"CAD",
"Template",
"Dependency",
"Extension",
],
waptguihelper.GRT_SELECTED,
)
if categories:
control.categories = ",".join([a["unknown"] for a in categories])
else:
control.categories = ""
control.save_control_to_wapt()
return control.categories
def ask_control_package(control_package=control.package, conditionnal_package_name=None, remove_base_files=False):
"""Requesting that the user provide a package name to be entered into the control.package field, and offering the possibility of removing the base files (icon.png and changelog.txt) for template package usage
Args:
control_package (str) : prefilled control_package (default: actual control_package)
conditionnal_package_name (str) : only ask when the control.package contains conditionnal_package_name (default: always ask for control_package)
remove_base_files (bool) : removes base files if parameter is True and conditionnal_package_name is provided (default: False)
"""
if conditionnal_package_name is None or conditionnal_package_name in control.package:
control.package = waptguihelper.input_dialog(
control.package,
"You can redefine the package name",
control_package.replace(conditionnal_package_name, "") if conditionnal_package_name is not None else control_package,
)
control.save_control_to_wapt()
# Removing template files
if conditionnal_package_name in control.package and remove_base_files:
if isfile("WAPT\\changelog.txt"):
remove_file("WAPT\\changelog.txt")
if isfile("WAPT\\icon.png"):
remove_file("WAPT\\icon.png")
return control.package
def ask_control_name(control_name=control.name, conditionnal_package_name=None):
"""Requesting that the user provide a package name to be entered into control.name field
Args:
control_name (str) : prefilled control_name (default: control.name)
conditionnal_package_name (str) : only ask when the control.name contains conditionnal_package_name (default: always ask for control_name)
"""
if conditionnal_package_name is None or conditionnal_package_name in control.name:
control.name = waptguihelper.input_dialog(control.name, "You can redefine the name for the self-service", control_name)
control.save_control_to_wapt()
return control.name
ba870c567a207e4758298db715b751c1f0ec2d1944445b18d19518bb900ccb1d : setup.py
86f912545726df5356645fba3db811275ac0659431e5175b8b90b47339da69ce : update_package.py
ae600e0d4b046ee3db8d5e373a749f75516a4e39f2e7295753ace7c30682e8a6 : WAPT/icon.png
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
87971c4097c22ed376367cb2be2cd3b3118da63118c1d1daf9b4587b8556b058 : WAPT/changelog.txt
7a139c50e8e2d9d2ee51208f6d33dee34d32c2f58cff8b29251309f64f992370 : luti.json
6f477f759b4bc4a08da7d72a434559b3e079aefba7a23448928ecd8f1a04960e : spotify-uwp/SpotifyAB.SpotifyMusic_1.205.1006.0_x86__zpdnekdrzrea0.appx
397b610554d67abaddfdc287ced6a9bf1ada4d4c9ddf53e01c6a061bed2860ef : spotify-uwp/Microsoft.VCLibs.140.00_14.0.30704.0_x86__8wekyb3d8bbwe.appx
bf878266ef5e3fb7d8aeaa1d2dc9e5f54f3bfaaa352c3152f5989d62ede067af : spotify-uwp/Microsoft.WindowsAppRuntime.1.2_2000.747.1945.0_x86__8wekyb3d8bbwe.msix
fb990147f76f17bd15a14413d1092b0546b4d5cbb50955456cb1b4bc7216dfe0 : WAPT/control