Fix set locale to legendary locale + reformatting
This commit is contained in:
parent
c1338b7526
commit
bb4f08691a
|
@ -27,4 +27,3 @@ if not os.path.exists(data_dir):
|
|||
os.makedirs(data_dir)
|
||||
|
||||
image_dir = os.path.join(data_dir, "images")
|
||||
|
||||
|
|
|
@ -66,6 +66,7 @@ def main():
|
|||
if __name__ == '__main__':
|
||||
# fix error in cx_freeze
|
||||
import multiprocessing
|
||||
|
||||
multiprocessing.freeze_support()
|
||||
sys.path.insert(0, os.path.join(pathlib.Path(__file__).parent.parent.absolute(), "legendary"))
|
||||
main()
|
||||
|
|
|
@ -15,7 +15,7 @@ from rare import languages_path, resources_path, cache_dir
|
|||
from rare.components.dialogs.launch_dialog import LaunchDialog
|
||||
from rare.components.main_window import MainWindow
|
||||
from rare.components.tray_icon import TrayIcon
|
||||
from rare.utils.utils import get_lang, load_color_scheme
|
||||
from rare.utils.utils import load_color_scheme
|
||||
|
||||
start_time = time.strftime('%y-%m-%d--%H-%M') # year-month-day-hour-minute
|
||||
file_name = os.path.join(cache_dir, f"logs/Rare_{start_time}.log")
|
||||
|
@ -74,7 +74,7 @@ class App(QApplication):
|
|||
|
||||
# Translator
|
||||
self.translator = QTranslator()
|
||||
lang = settings.value("language", get_lang(), type=str)
|
||||
lang = settings.value("language", self.core.language_code, type=str)
|
||||
if os.path.exists(p := os.path.join(languages_path, lang + ".qm")):
|
||||
self.translator.load(p)
|
||||
logger.info("Your language is supported: " + lang)
|
||||
|
|
|
@ -7,7 +7,6 @@ from requests.exceptions import ConnectionError
|
|||
|
||||
from legendary.core import LegendaryCore
|
||||
from rare import image_dir
|
||||
|
||||
from rare.components.dialogs.login import LoginDialog
|
||||
from rare.ui.components.dialogs.launch_dialog import Ui_LaunchDialog
|
||||
from rare.utils.utils import download_images
|
||||
|
@ -27,7 +26,6 @@ class ImageThread(QThread):
|
|||
self.download_progess.emit(100)
|
||||
|
||||
|
||||
|
||||
class LaunchDialog(QDialog, Ui_LaunchDialog):
|
||||
quit_app = pyqtSignal(int)
|
||||
start_app = pyqtSignal(bool)
|
||||
|
@ -68,7 +66,6 @@ class LaunchDialog(QDialog, Ui_LaunchDialog):
|
|||
if not os.path.exists(image_dir):
|
||||
os.makedirs(image_dir)
|
||||
|
||||
|
||||
if not self.offline:
|
||||
self.image_info.setText(self.tr("Downloading Images"))
|
||||
self.image_thread = ImageThread(self.core, self)
|
||||
|
|
|
@ -122,6 +122,7 @@ class TabWidget(QTabWidget):
|
|||
self.store.load()
|
||||
|
||||
# TODO; maybe pass InstallOptionsModel only, not split arguments
|
||||
|
||||
def install_game(self, options: InstallOptionsModel, update=False, silent=False):
|
||||
|
||||
install_dialog = InstallDialog(self.core,
|
||||
|
|
|
@ -7,8 +7,8 @@ from PyQt5.QtWidgets import QWidget, QMessageBox
|
|||
|
||||
from legendary.core import LegendaryCore
|
||||
from legendary.models.game import Game, InstalledGame
|
||||
from rare.ui.components.tabs.games.game_info.game_info import Ui_GameInfo
|
||||
from rare import data_dir
|
||||
from rare.ui.components.tabs.games.game_info.game_info import Ui_GameInfo
|
||||
from rare.utils.legendary_utils import VerifyThread
|
||||
from rare.utils.steam_grades import SteamWorker
|
||||
from rare.utils.utils import get_size, get_pixmap
|
||||
|
|
|
@ -9,7 +9,6 @@ from qtawesome import icon
|
|||
|
||||
from legendary.core import LegendaryCore
|
||||
from legendary.models.game import Game
|
||||
from rare import data_dir
|
||||
from rare.ui.components.tabs.games.game_info.game_info import Ui_GameInfo
|
||||
from rare.utils.extra_widgets import SideTabBar
|
||||
from rare.utils.json_formatter import QJsonModel
|
||||
|
@ -72,7 +71,6 @@ class UninstalledInfo(QWidget, Ui_GameInfo):
|
|||
self.steam_worker.rating_signal.connect(self.grade.setText)
|
||||
|
||||
if platform.system() == "Windows":
|
||||
|
||||
self.lbl_grade.setVisible(False)
|
||||
self.grade.setVisible(False)
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ from PyQt5.QtCore import Qt, pyqtSignal, QSettings, QTimer
|
|||
from PyQt5.QtWidgets import QScrollArea, QWidget, QLabel, QVBoxLayout, QStackedWidget
|
||||
|
||||
from legendary.core import LegendaryCore
|
||||
from rare import data_dir
|
||||
from rare.components.tabs.games.game_widgets.base_installed_widget import BaseInstalledWidget
|
||||
from rare.components.tabs.games.game_widgets.installed_icon_widget import GameWidgetInstalled
|
||||
from rare.components.tabs.games.game_widgets.installed_list_widget import InstalledListWidget
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from logging import getLogger
|
||||
|
||||
from PyQt5.QtCore import QProcess, pyqtSignal, Qt
|
||||
from PyQt5.QtCore import QProcess, pyqtSignal
|
||||
from PyQt5.QtWidgets import QHBoxLayout, QLabel, QPushButton, QVBoxLayout
|
||||
from qtawesome import icon
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ class SettingsTab(QTabWidget):
|
|||
self.core = core
|
||||
self.setTabBar(SideTabBar())
|
||||
self.setTabPosition(QTabWidget.West)
|
||||
self.rare_settings = RareSettings()
|
||||
self.rare_settings = RareSettings(self.core)
|
||||
self.addTab(self.rare_settings, "Rare")
|
||||
self.addTab(LegendarySettings(core), "Legendary")
|
||||
if platform.system() != "Windows":
|
||||
|
|
|
@ -3,7 +3,6 @@ import platform
|
|||
import re
|
||||
from logging import getLogger
|
||||
|
||||
from PyQt5.QtCore import QSize
|
||||
from PyQt5.QtWidgets import QFileDialog, QMessageBox, QVBoxLayout, QDialog, QCheckBox, QLabel, \
|
||||
QHBoxLayout, QPushButton, QGroupBox, QWidget
|
||||
from qtawesome import icon
|
||||
|
@ -54,7 +53,8 @@ class LegendarySettings(QWidget, Ui_LegendarySettings):
|
|||
lambda: self.cleanup(True)
|
||||
)
|
||||
|
||||
self.manifest_path_info.setText(self.tr("EGL path is at C:\\ProgramData\\Epic\\EpicGamesLauncher\\Data\\Manifests"))
|
||||
self.manifest_path_info.setText(
|
||||
self.tr("EGL path is at C:\\ProgramData\\Epic\\EpicGamesLauncher\\Data\\Manifests"))
|
||||
path = os.path.expanduser("~/")
|
||||
if self.core.egl.programdata_path:
|
||||
path = self.core.egl.programdata_path
|
||||
|
|
|
@ -7,11 +7,12 @@ from logging import getLogger
|
|||
from PyQt5.QtCore import QSettings, Qt
|
||||
from PyQt5.QtWidgets import QWidget
|
||||
|
||||
from legendary.core import LegendaryCore
|
||||
from rare import cache_dir
|
||||
from rare.components.tabs.settings.rpc_settings import RPCSettings
|
||||
from rare.ui.components.tabs.settings.rare import Ui_RareSettings
|
||||
from rare.utils import utils
|
||||
from rare.utils.utils import get_lang, get_possible_langs, get_color_schemes, get_style_sheets
|
||||
from rare.utils.utils import get_possible_langs, get_color_schemes, get_style_sheets
|
||||
|
||||
logger = getLogger("RareSettings")
|
||||
|
||||
|
@ -23,10 +24,10 @@ languages = [
|
|||
|
||||
|
||||
class RareSettings(QWidget, Ui_RareSettings):
|
||||
def __init__(self):
|
||||
def __init__(self, core: LegendaryCore):
|
||||
super(RareSettings, self).__init__()
|
||||
self.setupUi(self)
|
||||
|
||||
self.core = core
|
||||
# (widget_name, option_name, default)
|
||||
self.checkboxes = [
|
||||
(self.sys_tray, "sys_tray", True),
|
||||
|
@ -39,7 +40,7 @@ class RareSettings(QWidget, Ui_RareSettings):
|
|||
]
|
||||
|
||||
self.settings = QSettings()
|
||||
language = self.settings.value("language", get_lang(), type=str)
|
||||
language = self.settings.value("language", self.core.language_code, type=str)
|
||||
self.logdir = os.path.join(cache_dir, "logs")
|
||||
|
||||
# Select lang
|
||||
|
|
|
@ -15,7 +15,8 @@ class Shop(QStackedWidget):
|
|||
def __init__(self, core: LegendaryCore):
|
||||
super(Shop, self).__init__()
|
||||
self.core = core
|
||||
self.api_core = ShopApiCore(self.core.egs.session.headers["Authorization"])
|
||||
self.api_core = ShopApiCore(self.core.egs.session.headers["Authorization"], self.core.language_code,
|
||||
self.core.country_code)
|
||||
|
||||
self.shop = ShopWidget(cache_dir, core, self.api_core)
|
||||
self.wishlist_widget = Wishlist(self.api_core)
|
||||
|
|
|
@ -9,7 +9,6 @@ from qtawesome import icon
|
|||
from rare.components.tabs.shop.shop_models import ShopGame
|
||||
from rare.ui.components.tabs.store.shop_game_info import Ui_shop_info
|
||||
from rare.utils.extra_widgets import WaitingSpinner, ImageLabel
|
||||
from rare.utils.utils import get_lang
|
||||
|
||||
logger = logging.getLogger("ShopInfo")
|
||||
|
||||
|
@ -32,7 +31,6 @@ class ShopGameInfo(QWidget, Ui_shop_info):
|
|||
warn_label.setPixmap(icon("fa.warning").pixmap(160, 160).scaled(240, 320, Qt.IgnoreAspectRatio))
|
||||
self.image_stack.addWidget(warn_label)
|
||||
|
||||
self.locale = get_lang()
|
||||
self.wishlist_button.clicked.connect(self.add_to_wishlist)
|
||||
self.in_wishlist = False
|
||||
self.wishlist = []
|
||||
|
|
|
@ -6,7 +6,6 @@ from rare.components.tabs.shop.constants import wishlist_query, search_query, ga
|
|||
remove_from_wishlist_query
|
||||
from rare.components.tabs.shop.shop_models import BrowseModel
|
||||
from rare.utils.qt_requests import QtRequestManager
|
||||
from rare.utils.utils import get_lang
|
||||
|
||||
logger = getLogger("ShopAPICore")
|
||||
graphql_url = "https://www.epicgames.com/graphql"
|
||||
|
@ -15,12 +14,14 @@ graphql_url = "https://www.epicgames.com/graphql"
|
|||
class ShopApiCore(QObject):
|
||||
update_wishlist = pyqtSignal()
|
||||
|
||||
def __init__(self, auth_token):
|
||||
def __init__(self, auth_token, lc: str, cc: str):
|
||||
super(ShopApiCore, self).__init__()
|
||||
self.token = auth_token
|
||||
self.language_code: str = lc
|
||||
self.country_code: str = cc
|
||||
self.locale = self.language_code + "-" + self.country_code
|
||||
self.manager = QtRequestManager()
|
||||
self.auth_manager = QtRequestManager(authorization_token=auth_token)
|
||||
self.locale = get_lang()
|
||||
|
||||
self.browse_active = False
|
||||
self.next_browse_request = tuple(())
|
||||
|
@ -40,8 +41,8 @@ class ShopApiCore(QObject):
|
|||
self.auth_manager.post(graphql_url, {
|
||||
"query": wishlist_query,
|
||||
"variables": {
|
||||
"country": self.locale.upper(),
|
||||
"locale": self.locale
|
||||
"country": self.country_code,
|
||||
"locale": self.language_code + "-" + self.country_code
|
||||
}
|
||||
}, lambda data: self._handle_wishlist(data, handle_func))
|
||||
|
||||
|
@ -52,8 +53,8 @@ class ShopApiCore(QObject):
|
|||
payload = {
|
||||
"query": search_query,
|
||||
"variables": {"category": "games/edition/base|bundles/games|editors|software/edition/base", "count": 1,
|
||||
"country": "DE", "keywords": name, "locale": self.locale, "sortDir": "DESC",
|
||||
"allowCountries": self.locale.upper(),
|
||||
"country": self.country_code, "keywords": name, "locale": self.locale, "sortDir": "DESC",
|
||||
"allowCountries": self.country_code,
|
||||
"start": 0, "tag": "", "withMapping": False, "withPrice": True}
|
||||
}
|
||||
|
||||
|
@ -102,7 +103,7 @@ class ShopApiCore(QObject):
|
|||
"variables": {
|
||||
"offerId": offer_id,
|
||||
"namespace": namespace,
|
||||
"country": self.locale.upper(),
|
||||
"country": self.country_code,
|
||||
"locale": self.locale
|
||||
},
|
||||
"query": add_to_wishlist_query
|
||||
|
|
|
@ -2,8 +2,6 @@ import datetime
|
|||
import random
|
||||
from dataclasses import dataclass
|
||||
|
||||
from rare.utils.utils import get_lang
|
||||
|
||||
|
||||
class ImageUrlModel:
|
||||
def __init__(self, front_tall: str = "", offer_image_tall: str = "",
|
||||
|
@ -111,7 +109,8 @@ class ShopGame:
|
|||
class BrowseModel:
|
||||
category: str = "games/edition/base|bundles/games|editors|software/edition/base"
|
||||
count: int = 30
|
||||
locale: str = get_lang()
|
||||
language_code: str = "en"
|
||||
country_code: str = "US"
|
||||
keywords: str = ""
|
||||
sortDir: str = "DESC"
|
||||
start: int = 0
|
||||
|
@ -126,11 +125,11 @@ class BrowseModel:
|
|||
def __dict__(self):
|
||||
payload = {"category": self.category,
|
||||
"count": self.count,
|
||||
"country": self.locale.upper(),
|
||||
"country": self.country_code,
|
||||
"keywords": self.keywords,
|
||||
"locale": self.locale,
|
||||
"locale": self.language_code + "-" + self.country_code,
|
||||
"sortDir": self.sortDir,
|
||||
"allowCountries": self.locale.upper(),
|
||||
"allowCountries": self.country_code,
|
||||
"start": self.start,
|
||||
"tag": self.tag,
|
||||
"withMapping": self.withMapping,
|
||||
|
|
|
@ -12,7 +12,6 @@ from rare.components.tabs.shop.game_widgets import GameWidget
|
|||
from rare.components.tabs.shop.shop_models import BrowseModel
|
||||
from rare.ui.components.tabs.store.store import Ui_ShopWidget
|
||||
from rare.utils.extra_widgets import WaitingSpinner, FlowLayout, ButtonLineEdit
|
||||
from rare.utils.utils import get_lang
|
||||
|
||||
logger = logging.getLogger("Shop")
|
||||
|
||||
|
@ -36,7 +35,6 @@ class ShopWidget(QScrollArea, Ui_ShopWidget):
|
|||
self.price = ""
|
||||
self.tags = []
|
||||
self.types = []
|
||||
self.locale = get_lang()
|
||||
self.update_games_allowed = True
|
||||
self.free_widget.setLayout(FlowLayout())
|
||||
self.free_games_now = QGroupBox(self.tr("Now Free"))
|
||||
|
@ -106,7 +104,9 @@ class ShopWidget(QScrollArea, Ui_ShopWidget):
|
|||
coming_free_games = []
|
||||
for game in free_games:
|
||||
try:
|
||||
if game['price']['totalPrice']['fmtPrice']['discountPrice'] == "0" and game['price']['totalPrice']['fmtPrice']['originalPrice'] != game['price']['totalPrice']['fmtPrice']['discountPrice']:
|
||||
if game['price']['totalPrice']['fmtPrice']['discountPrice'] == "0" and \
|
||||
game['price']['totalPrice']['fmtPrice']['originalPrice'] != \
|
||||
game['price']['totalPrice']['fmtPrice']['discountPrice']:
|
||||
free_games_now.append(game)
|
||||
continue
|
||||
|
||||
|
@ -224,7 +224,8 @@ class ShopWidget(QScrollArea, Ui_ShopWidget):
|
|||
self.game_stack.setCurrentIndex(1)
|
||||
date = f"[,{datetime.datetime.strftime(datetime.datetime.now(), '%Y-%m-%dT%X')}.{str(random.randint(0, 999)).zfill(3)}Z]"
|
||||
|
||||
browse_model = BrowseModel(locale=self.locale, date=date, count=20, price=self.price,
|
||||
browse_model = BrowseModel(language_code=self.core.language_code, country_code=self.core.country_code,
|
||||
date=date, count=20, price=self.price,
|
||||
onSale=self.on_discount.isChecked())
|
||||
browse_model.tag = "|".join(self.tags)
|
||||
|
||||
|
@ -237,11 +238,7 @@ class ShopWidget(QScrollArea, Ui_ShopWidget):
|
|||
child.deleteLater()
|
||||
del child
|
||||
|
||||
QWidget().setLayout(self.game_widget.layout())
|
||||
|
||||
if data:
|
||||
self.game_widget.setLayout(FlowLayout())
|
||||
|
||||
for game in data:
|
||||
w = GameWidget(self.path, game, 275)
|
||||
self.game_widget.layout().addWidget(w)
|
||||
|
|
|
@ -67,7 +67,8 @@ class Wishlist(QStackedWidget, Ui_Wishlist):
|
|||
if sort == 0:
|
||||
sorted_list = sorted(self.wishlist, key=lambda x: x["offer"]["title"])
|
||||
elif sort == 1:
|
||||
sorted_list = sorted(self.wishlist, key=lambda x: x["offer"]['price']['totalPrice']['fmtPrice']['discountPrice'])
|
||||
sorted_list = sorted(self.wishlist,
|
||||
key=lambda x: x["offer"]['price']['totalPrice']['fmtPrice']['discountPrice'])
|
||||
elif sort == 2:
|
||||
sorted_list = sorted(self.wishlist, key=lambda x: x["offer"]["seller"]["name"])
|
||||
elif sort == 3:
|
||||
|
|
|
@ -124,6 +124,7 @@ class Ui_LoginDialog(object):
|
|||
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
LoginDialog = QtWidgets.QDialog()
|
||||
ui = Ui_LoginDialog()
|
||||
|
|
|
@ -267,6 +267,7 @@ class Ui_LegendarySettings(object):
|
|||
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
LegendarySettings = QtWidgets.QWidget()
|
||||
ui = Ui_LegendarySettings()
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'shop_game_info.ui'
|
||||
# Form implementation generated from reading ui file 'rare/ui/components/tabs/store/shop_game_info.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.15.4
|
||||
#
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'store.ui'
|
||||
# Form implementation generated from reading ui file 'rare/ui/components/tabs/store/store.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.15.4
|
||||
#
|
||||
|
@ -8,7 +8,7 @@
|
|||
# run again. Do not edit this file unless you know what you are doing.
|
||||
|
||||
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_ShopWidget(object):
|
||||
|
|
|
@ -108,6 +108,7 @@ class Ui_Wishlist(object):
|
|||
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
Wishlist = QtWidgets.QStackedWidget()
|
||||
ui = Ui_Wishlist()
|
||||
|
|
|
@ -4,7 +4,7 @@ from logging import getLogger
|
|||
|
||||
import PIL
|
||||
from PIL import Image
|
||||
from PyQt5.QtCore import Qt, QRect, QSize, QPoint, pyqtSignal, QSettings
|
||||
from PyQt5.QtCore import Qt, QRect, QSize, QPoint, pyqtSignal
|
||||
from PyQt5.QtGui import QMovie, QPixmap
|
||||
from PyQt5.QtWidgets import QLayout, QStyle, QSizePolicy, QLabel, QFileDialog, QHBoxLayout, QWidget, QPushButton, \
|
||||
QStyleOptionTab, QStylePainter, QTabBar, QLineEdit, QToolButton
|
||||
|
|
|
@ -7,7 +7,6 @@ import requests
|
|||
from PyQt5.QtCore import QThread, pyqtSignal
|
||||
|
||||
from legendary.core import LegendaryCore
|
||||
|
||||
from rare import data_dir, cache_dir
|
||||
|
||||
replace_chars = ",;.:-_ "
|
||||
|
|
|
@ -9,7 +9,7 @@ from typing import Tuple
|
|||
|
||||
import requests
|
||||
from PIL import Image, UnidentifiedImageError
|
||||
from PyQt5.QtCore import pyqtSignal, QLocale, QSettings
|
||||
from PyQt5.QtCore import pyqtSignal, QSettings
|
||||
from PyQt5.QtGui import QPalette, QColor, QPixmap
|
||||
|
||||
# Windows
|
||||
|
@ -26,7 +26,6 @@ logger = getLogger("Utils")
|
|||
settings = QSettings("Rare", "Rare")
|
||||
|
||||
|
||||
|
||||
def download_images(signal: pyqtSignal, core: LegendaryCore):
|
||||
if not os.path.isdir(image_dir):
|
||||
os.makedirs(image_dir)
|
||||
|
@ -121,16 +120,6 @@ def download_image(game, force=False):
|
|||
logger.warning(f"File {image_dir}/{game.app_name}/DieselGameBoxTall.png doesn't exist")
|
||||
|
||||
|
||||
def get_lang():
|
||||
core = LegendaryCore()
|
||||
if "Legendary" in core.lgd.config.sections() and "locale" in core.lgd.config["Legendary"]:
|
||||
logger.info("Found locale in Legendary config: " + core.lgd.config.get("Legendary", "locale"))
|
||||
return core.lgd.config.get("Legendary", "locale").split("-")[0]
|
||||
else:
|
||||
logger.info("Found locale in system config: " + QLocale.system().name().split("_")[0])
|
||||
return QLocale.system().name().split("_")[0]
|
||||
|
||||
|
||||
color_role_map = {
|
||||
0: "WindowText",
|
||||
1: "Button",
|
||||
|
@ -289,7 +278,6 @@ def create_rare_desktop_link(type_of_link):
|
|||
def create_desktop_link(app_name, core: LegendaryCore, type_of_link="desktop") -> bool:
|
||||
igame = core.get_installed_game(app_name)
|
||||
|
||||
|
||||
if os.path.exists(p := os.path.join(image_dir, igame.app_name, 'Thumbnail.png')):
|
||||
icon = p
|
||||
elif os.path.exists(p := os.path.join(image_dir, igame.app_name, "DieselGameBoxLogo.png")):
|
||||
|
@ -390,7 +378,6 @@ def get_uninstalled_pixmap(app_name: str) -> QPixmap:
|
|||
return pixmap
|
||||
|
||||
|
||||
|
||||
def optimal_text_background(image: list) -> Tuple[int, int, int]:
|
||||
"""
|
||||
Finds an optimal background color for text on the image by calculating the
|
||||
|
@ -423,4 +410,3 @@ def text_color_for_background(background: Tuple[int, int, int]) -> Tuple[int,
|
|||
return 255, 255, 255
|
||||
else:
|
||||
return 0, 0, 0
|
||||
|
||||
|
|
Loading…
Reference in a new issue