Set cache_dir and data_dir in one place (xdg)
This commit is contained in:
parent
983e80a4c6
commit
59a7359e19
|
@ -1,5 +1,26 @@
|
|||
import os
|
||||
|
||||
__version__ = "1.4.1"
|
||||
|
||||
style_path = os.path.join(os.path.dirname(__file__), "styles/")
|
||||
lang_path = os.path.join(os.path.dirname(__file__), "languages/")
|
||||
|
||||
# Cache Directory: Store images
|
||||
if p := os.getenv("XDG_CACHE_HOME"):
|
||||
cache_dir = os.path.join(p, "rare/cache")
|
||||
elif os.name == "nt":
|
||||
cache_dir = os.path.expandvars("%APPDATA%/rare/cache")
|
||||
else:
|
||||
cache_dir = os.path.expanduser("~/.cache/rare/cache")
|
||||
if not os.path.exists(cache_dir):
|
||||
os.makedirs(cache_dir)
|
||||
|
||||
# Data Directory: Images
|
||||
if p := os.getenv("XDG_DATA_HOME"):
|
||||
data_dir = os.path.join(p, "rare")
|
||||
if os.name == "nt":
|
||||
data_dir = os.path.expandvars("%APPDATA%/rare/")
|
||||
else:
|
||||
data_dir = os.path.expanduser("~/.local/share/rare/")
|
||||
if not os.path.exists(data_dir):
|
||||
os.makedirs(data_dir)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
import os
|
||||
from argparse import ArgumentParser
|
||||
|
||||
from rare import __version__
|
||||
from rare import __version__, data_dir
|
||||
from rare.utils import singleton, utils
|
||||
|
||||
|
||||
|
@ -47,7 +47,7 @@ def main():
|
|||
except singleton.SingleInstanceException:
|
||||
print("Rare is already running")
|
||||
|
||||
with open(os.path.expanduser("~/.cache/rare/lockfile"), "w") as file:
|
||||
with open(os.path.join(data_dir, "lockfile"), "w") as file:
|
||||
if args.subparser == "launch":
|
||||
file.write("launch " + args.app_name)
|
||||
else:
|
||||
|
|
|
@ -9,14 +9,14 @@ from PyQt5.QtGui import QIcon
|
|||
from PyQt5.QtWidgets import QApplication, QSystemTrayIcon, QStyleFactory
|
||||
|
||||
from custom_legendary.core import LegendaryCore
|
||||
from rare import lang_path, style_path
|
||||
from rare import lang_path, style_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
|
||||
|
||||
start_time = time.strftime('%y-%m-%d--%H-%M') # year-month-day-hour-minute
|
||||
file_name = os.path.expanduser(f"~/.cache/rare/logs/Rare_{start_time}.log")
|
||||
file_name = os.path.join(cache_dir, f"logs/Rare_{start_time}.log")
|
||||
if not os.path.exists(os.path.dirname(file_name)):
|
||||
os.makedirs(os.path.dirname(file_name))
|
||||
if "--debug" in sys.argv:
|
||||
|
|
|
@ -7,6 +7,7 @@ from PyQt5.QtWidgets import QDialog
|
|||
from requests.exceptions import ConnectionError
|
||||
|
||||
from custom_legendary.core import LegendaryCore
|
||||
from rare import data_dir, cache_dir
|
||||
from rare.components.dialogs.login import LoginDialog
|
||||
from rare.ui.components.dialogs.launch_dialog import Ui_LaunchDialog
|
||||
from rare.utils import steam_grades
|
||||
|
@ -37,14 +38,14 @@ class SteamThread(QThread):
|
|||
|
||||
def run(self) -> None:
|
||||
gamelist = self.core.get_game_list(True)
|
||||
if not os.path.exists(os.path.expanduser("~/.cache/rare/game_list.json")):
|
||||
if not os.path.exists(os.path.join(data_dir, "game_list.json")):
|
||||
self.action.emit(self.tr("Getting data from ProtonDB"))
|
||||
steam_grades.upgrade_all([(i.app_title, i.app_name) for i in gamelist], self.progress)
|
||||
self.progress.emit(99)
|
||||
|
||||
self.action.emit(self.tr("Checking Games for data"))
|
||||
grades = json.load(open(os.path.expanduser("~/.cache/rare/game_list.json")))
|
||||
ids = json.load(open(os.path.expanduser("~/.cache/rare/steam_ids.json")))
|
||||
grades = json.load(open(os.path.join(data_dir, "game_list.json")))
|
||||
ids = json.load(open(os.path.join(cache_dir, "steam_ids.json")))
|
||||
for game in gamelist:
|
||||
if not grades.get(game.app_name):
|
||||
steam_id = steam_grades.get_steam_id(game.app_title, ids)
|
||||
|
@ -58,7 +59,7 @@ class SteamThread(QThread):
|
|||
if not grades[game.app_name].get("grade"):
|
||||
grades[game.app_name]["grade"] = steam_grades.get_grade(game.app_title)
|
||||
|
||||
with open(os.path.expanduser("~/.cache/rare/game_list.json"), "w") as f:
|
||||
with open(os.path.join(data_dir, "game_list.json"), "w") as f:
|
||||
f.write(json.dumps(grades))
|
||||
f.close()
|
||||
|
||||
|
@ -121,7 +122,7 @@ class LaunchDialog(QDialog, Ui_LaunchDialog):
|
|||
|
||||
def launch(self, offline=False):
|
||||
# self.core = core
|
||||
if not os.path.exists(p := os.path.expanduser("~/.cache/rare/images")):
|
||||
if not os.path.exists(p := QSettings().value("img_dir", os.path.join(data_dir, "images"))):
|
||||
os.makedirs(p)
|
||||
self.offline = offline
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ from PyQt5.QtGui import QCloseEvent
|
|||
from PyQt5.QtWidgets import QMainWindow, QMessageBox, QApplication
|
||||
|
||||
from custom_legendary.core import LegendaryCore
|
||||
from rare import data_dir
|
||||
from rare.components.tab_widget import TabWidget
|
||||
from rare.utils.rpc import DiscordRPC
|
||||
|
||||
|
@ -56,7 +57,7 @@ class MainWindow(QMainWindow):
|
|||
self.timer.start(1000)
|
||||
|
||||
def timer_finished(self):
|
||||
file_path = os.path.expanduser("~/.cache/rare/lockfile")
|
||||
file_path = os.path.join(data_dir, "lockfile")
|
||||
if os.path.exists(file_path):
|
||||
file = open(file_path, "r")
|
||||
action = file.read()
|
||||
|
|
|
@ -8,6 +8,7 @@ from qtawesome import icon
|
|||
|
||||
from custom_legendary.core import LegendaryCore
|
||||
from custom_legendary.models.game import Game, InstalledGame
|
||||
from rare import data_dir
|
||||
from rare.components.tabs.games.game_info.dlcs import DlcTab
|
||||
from rare.components.tabs.games.game_info.game_settings import GameSettings
|
||||
from rare.ui.components.tabs.games.game_info.game_info import Ui_GameInfo
|
||||
|
@ -73,7 +74,7 @@ class GameInfo(QWidget, Ui_GameInfo):
|
|||
"bronze": self.tr("Bronze"),
|
||||
"fail": self.tr("Could not get grade"),
|
||||
"pending": self.tr("Not enough reports")}
|
||||
if os.path.exists(p := os.path.expanduser("~/.cache/rare/game_list.json")):
|
||||
if os.path.exists(p := os.path.join(data_dir, "game_list.json")):
|
||||
self.grade_table = json.load(open(p))
|
||||
else:
|
||||
self.grade_table = {}
|
||||
|
|
|
@ -6,6 +6,7 @@ from PyQt5.QtWidgets import QGroupBox, QHBoxLayout, QVBoxLayout, QScrollArea, QL
|
|||
|
||||
from custom_legendary.core import LegendaryCore
|
||||
from custom_legendary.models.game import Game
|
||||
from rare import data_dir
|
||||
from rare.utils.utils import download_image
|
||||
|
||||
|
||||
|
@ -82,7 +83,7 @@ class DLCWidget(QGroupBox):
|
|||
super(DLCWidget, self).__init__()
|
||||
self.main_layout = QHBoxLayout()
|
||||
self.dlc = dlc
|
||||
IMAGE_DIR = QSettings().value("img_dir", os.path.expanduser("~/.cache/rare/images"))
|
||||
IMAGE_DIR = QSettings().value("img_dir", os.path.join(data_dir, "images"))
|
||||
if installed:
|
||||
|
||||
if os.path.exists(os.path.join(IMAGE_DIR, dlc.app_name, "FinalArt.png")):
|
||||
|
|
|
@ -8,6 +8,7 @@ from qtawesome import icon
|
|||
|
||||
from custom_legendary.core import LegendaryCore
|
||||
from custom_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
|
||||
|
@ -65,7 +66,7 @@ class UninstalledInfo(QWidget, Ui_GameInfo):
|
|||
"bronze": self.tr("Bronze"),
|
||||
"fail": self.tr("Could not get grade"),
|
||||
"pending": self.tr("Not enough reports")}
|
||||
if os.path.exists(p := os.path.expanduser("~/.cache/rare/game_list.json")):
|
||||
if os.path.exists(p := os.path.join(data_dir, "game_list.json")):
|
||||
self.grade_table = json.load(open(p))
|
||||
else:
|
||||
self.grade_table = {}
|
||||
|
|
|
@ -7,6 +7,7 @@ from PyQt5.QtGui import QPixmap
|
|||
from PyQt5.QtWidgets import QScrollArea, QWidget, QLabel, QVBoxLayout, QStackedWidget
|
||||
|
||||
from custom_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
|
||||
|
@ -64,7 +65,7 @@ class GameList(QStackedWidget):
|
|||
self.list_layout = QVBoxLayout()
|
||||
self.list_layout.addWidget(QLabel(self.info_text))
|
||||
|
||||
self.IMAGE_DIR = self.settings.value("img_dir", os.path.expanduser("~/.cache/rare/images"), str)
|
||||
self.IMAGE_DIR = self.settings.value("img_dir", os.path.join(data_dir, "images"), str)
|
||||
self.updates = []
|
||||
self.widgets = {}
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ from PyQt5.QtWidgets import QGroupBox, QMessageBox, QAction
|
|||
|
||||
from custom_legendary.core import LegendaryCore
|
||||
from custom_legendary.models.game import InstalledGame
|
||||
from rare import cache_dir
|
||||
from rare.components.dialogs.uninstall_dialog import UninstallDialog
|
||||
from rare.utils import legendary_utils
|
||||
from rare.utils.utils import create_desktop_link
|
||||
|
@ -133,7 +134,7 @@ class BaseInstalledWidget(QGroupBox):
|
|||
def stderr(self):
|
||||
stderr = bytes(self.proc.readAllStandardError()).decode("utf-8")
|
||||
self.game_logger.error(stderr)
|
||||
QMessageBox.warning(self, "Warning", stderr + "\nSee ~/.cache/rare/logs/")
|
||||
QMessageBox.warning(self, "Warning", stderr + f"\nSee {cache_dir}/logs/")
|
||||
|
||||
def finished(self, exit_code):
|
||||
logger.info("Game exited with exit code: " + str(exit_code))
|
||||
|
|
|
@ -5,12 +5,12 @@ import sys
|
|||
from logging import getLogger
|
||||
|
||||
from PyQt5.QtCore import QSettings, Qt
|
||||
from PyQt5.QtWidgets import QFileDialog, QWidget
|
||||
from PyQt5.QtWidgets import QWidget
|
||||
|
||||
from rare import cache_dir, data_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.extra_widgets import PathEdit
|
||||
from rare.utils.utils import get_lang, get_possible_langs, get_color_schemes, get_style_sheets
|
||||
|
||||
logger = getLogger("RareSettings")
|
||||
|
@ -39,13 +39,13 @@ class RareSettings(QWidget, Ui_RareSettings):
|
|||
]
|
||||
|
||||
self.settings = QSettings()
|
||||
self.img_dir_path = self.settings.value("img_dir", os.path.expanduser("~/.cache/rare/images/"), type=str)
|
||||
self.img_dir_path = self.settings.value("img_dir", os.path.join(data_dir, "images"), type=str)
|
||||
language = self.settings.value("language", get_lang(), type=str)
|
||||
self.logdir = os.path.expanduser("~/.cache/rare/logs")
|
||||
self.logdir = os.path.join(cache_dir, "logs")
|
||||
|
||||
# Select Image directory
|
||||
self.img_dir = PathEdit(self.img_dir_path, file_type=QFileDialog.DirectoryOnly, save_func=self.save_path)
|
||||
self.img_dir_layout.addWidget(self.img_dir)
|
||||
# self.img_dir = PathEdit(self.img_dir_path, file_type=QFileDialog.DirectoryOnly, save_func=self.save_path)
|
||||
# self.img_dir_layout.addWidget(self.img_dir)
|
||||
|
||||
# Select lang
|
||||
self.lang_select.addItems([i[1] for i in languages])
|
||||
|
@ -125,7 +125,7 @@ class RareSettings(QWidget, Ui_RareSettings):
|
|||
self.log_dir_open_button.clicked.connect(self.open_dir)
|
||||
self.log_dir_clean_button.clicked.connect(self.clean_logdir)
|
||||
|
||||
logdir = os.path.expanduser("~/.cache/rare/logs")
|
||||
logdir = os.path.join(cache_dir, "logs")
|
||||
# get size of logdir
|
||||
size = 0
|
||||
for i in os.listdir(logdir):
|
||||
|
@ -137,8 +137,8 @@ class RareSettings(QWidget, Ui_RareSettings):
|
|||
# self.log_dir_size_label.setVisible(False)
|
||||
|
||||
def clean_logdir(self):
|
||||
for i in os.listdir(os.path.expanduser("~/.cache/rare/logs")):
|
||||
os.remove(os.path.expanduser("~/.cache/rare/logs/") + i)
|
||||
for i in os.listdir(os.path.join(cache_dir, "logs")):
|
||||
os.remove(os.path.join(cache_dir, "logs/") + i)
|
||||
self.log_dir_size_label.setText("0KB")
|
||||
|
||||
def create_start_menu_link(self):
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
import os
|
||||
|
||||
from PyQt5.QtWidgets import QStackedWidget, QTabWidget
|
||||
|
||||
from custom_legendary.core import LegendaryCore
|
||||
from rare import cache_dir
|
||||
from rare.components.tabs.shop.browse_games import BrowseGames
|
||||
from rare.components.tabs.shop.search_results import SearchResults
|
||||
from rare.components.tabs.shop.shop_info import ShopGameInfo
|
||||
|
@ -15,15 +14,9 @@ class Shop(QStackedWidget):
|
|||
def __init__(self, core: LegendaryCore):
|
||||
super(Shop, self).__init__()
|
||||
self.core = core
|
||||
if p := os.getenv("XDG_CACHE_HOME"):
|
||||
self.path = p
|
||||
else:
|
||||
self.path = os.path.expanduser("~/.cache/rare/cache/")
|
||||
if not os.path.exists(self.path):
|
||||
os.makedirs(self.path)
|
||||
|
||||
self.shop = ShopWidget(self.path)
|
||||
self.browse_games = BrowseGames(self.path)
|
||||
self.shop = ShopWidget(cache_dir)
|
||||
self.browse_games = BrowseGames(cache_dir)
|
||||
|
||||
self.store_tabs = QTabWidget()
|
||||
self.store_tabs.addTab(self.shop, self.tr("Games"))
|
||||
|
|
|
@ -118,6 +118,10 @@ class Ui_RareSettings(object):
|
|||
self.img_dir_group.setObjectName("img_dir_group")
|
||||
self.img_dir_layout = QtWidgets.QVBoxLayout(self.img_dir_group)
|
||||
self.img_dir_layout.setObjectName("img_dir_layout")
|
||||
self.label = QtWidgets.QLabel(self.img_dir_group)
|
||||
self.label.setWordWrap(True)
|
||||
self.label.setObjectName("label")
|
||||
self.img_dir_layout.addWidget(self.label)
|
||||
self.rare_layout.addWidget(self.img_dir_group, 0, 0, 1, 1, QtCore.Qt.AlignTop)
|
||||
spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||
self.rare_layout.addItem(spacerItem2, 3, 0, 1, 2)
|
||||
|
@ -150,6 +154,8 @@ class Ui_RareSettings(object):
|
|||
self.lang_label.setText(_translate("RareSettings", "Language"))
|
||||
self.color_label.setText(_translate("RareSettings", "Color Scheme"))
|
||||
self.img_dir_group.setTitle(_translate("RareSettings", "Image Cache Directory"))
|
||||
self.label.setText(_translate("RareSettings",
|
||||
"To change image directory, edit XDG_DATA_HOME variable. To change cache directory edit XDG_CACHE_HOME variable"))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
@ -231,10 +231,23 @@
|
|||
</item>
|
||||
<item row="0" column="0" alignment="Qt::AlignTop">
|
||||
<widget class="QGroupBox" name="img_dir_group">
|
||||
<property name="title">
|
||||
<string>Image Cache Directory</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="img_dir_layout"/>
|
||||
<property name="title">
|
||||
<string>Image Cache Directory</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="img_dir_layout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>To change image directory, edit XDG_DATA_HOME variable. To change cache directory edit
|
||||
XDG_CACHE_HOME variable
|
||||
</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
|
|
|
@ -9,7 +9,7 @@ from PyQt5.QtWidgets import QLayout, QStyle, QSizePolicy, QLabel, QFileDialog, Q
|
|||
QStyleOptionTab, QStylePainter, QTabBar, QLineEdit, QToolButton
|
||||
from qtawesome import icon
|
||||
|
||||
from rare import style_path
|
||||
from rare import style_path, cache_dir
|
||||
from rare.ui.utils.pathedit import Ui_PathEdit
|
||||
from rare.utils.utils import QtRequestManager
|
||||
|
||||
|
@ -262,10 +262,7 @@ class ImageLabel(QLabel):
|
|||
|
||||
def __init__(self):
|
||||
super(ImageLabel, self).__init__()
|
||||
path = os.path.expanduser("~/.cache/rare/cache")
|
||||
if p := os.environ.get("XDG_CACHE_HOME"):
|
||||
path = os.path.join(p, "rare", "cache")
|
||||
self.path = path
|
||||
self.path = cache_dir
|
||||
self.manager = QtRequestManager("bytes")
|
||||
self.manager.data_ready.connect(self.image_ready)
|
||||
|
||||
|
|
|
@ -6,9 +6,11 @@ from datetime import date
|
|||
import requests
|
||||
from PyQt5.QtCore import pyqtSignal
|
||||
|
||||
from rare import data_dir, cache_dir
|
||||
|
||||
replace_chars = ",;.:-_ "
|
||||
|
||||
file = os.path.expanduser("~/.cache/rare/game_list.json")
|
||||
file = os.path.join(data_dir, "game_list.json")
|
||||
url = "https://api.steampowered.com/ISteamApps/GetAppList/v2/"
|
||||
|
||||
|
||||
|
@ -28,7 +30,7 @@ def get_grade(steam_code):
|
|||
|
||||
|
||||
def load_json() -> dict:
|
||||
if not os.path.exists(p := os.path.expanduser("~/.cache/rare/steam_ids.json")):
|
||||
if not os.path.exists(p := os.path.join(cache_dir, "steam_ids.json")):
|
||||
response = requests.get(url)
|
||||
steam_ids = json.loads(response.text)["applist"]["apps"]
|
||||
ids = {}
|
||||
|
@ -40,7 +42,7 @@ def load_json() -> dict:
|
|||
f.close()
|
||||
return ids
|
||||
else:
|
||||
return json.loads(open(os.path.expanduser("~/.cache/rare/steam_ids.json"), "r").read())
|
||||
return json.loads(open(os.path.join(cache_dir, "steam_ids.json"), "r").read())
|
||||
|
||||
|
||||
def upgrade_all(games, progress: pyqtSignal = None):
|
||||
|
@ -59,7 +61,7 @@ def upgrade_all(games, progress: pyqtSignal = None):
|
|||
if progress:
|
||||
progress.emit(int(i / len(games) * 100))
|
||||
|
||||
with open(os.path.expanduser("~/.cache/rare/game_list.json"), "w") as f:
|
||||
with open(os.path.join(data_dir, "game_list.json"), "w") as f:
|
||||
f.write(json.dumps(data))
|
||||
f.close()
|
||||
|
||||
|
@ -67,7 +69,7 @@ def upgrade_all(games, progress: pyqtSignal = None):
|
|||
def get_steam_id(title: str, json_data=None):
|
||||
title = title.replace("Early Access", "").replace("Experimental", "").strip()
|
||||
if not json_data:
|
||||
if not os.path.exists(p := os.path.expanduser("~/.cache/rare/steam_ids.json")):
|
||||
if not os.path.exists(p := os.path.join(cache_dir, "steam_ids.json")):
|
||||
response = requests.get(url)
|
||||
ids = {}
|
||||
steam_ids = json.loads(response.text)["applist"]["apps"]
|
||||
|
@ -78,7 +80,7 @@ def get_steam_id(title: str, json_data=None):
|
|||
f.write(json.dumps(steam_ids))
|
||||
f.close()
|
||||
else:
|
||||
ids = json.loads(open(os.path.expanduser("~/.cache/rare/steam_ids.json"), "r").read())
|
||||
ids = json.loads(open(os.path.join(cache_dir, "steam_ids.json"), "r").read())
|
||||
else:
|
||||
ids = json_data
|
||||
steam_name = difflib.get_close_matches(title, ids.keys(), n=1)
|
||||
|
|
|
@ -14,14 +14,14 @@ from PyQt5.QtNetwork import QNetworkAccessManager, QNetworkRequest, QNetworkRepl
|
|||
if os.name == "nt":
|
||||
from win32com.client import Dispatch
|
||||
|
||||
from rare import lang_path, style_path
|
||||
from rare import lang_path, style_path, data_dir
|
||||
# Mac not supported
|
||||
|
||||
from custom_legendary.core import LegendaryCore
|
||||
|
||||
logger = getLogger("Utils")
|
||||
s = QSettings("Rare", "Rare")
|
||||
IMAGE_DIR = s.value("img_dir", os.path.expanduser("~/.cache/rare/images"), type=str)
|
||||
IMAGE_DIR = s.value("img_dir", os.path.join(data_dir, "images"), type=str)
|
||||
|
||||
|
||||
def download_images(signal: pyqtSignal, core: LegendaryCore):
|
||||
|
@ -272,12 +272,12 @@ def create_desktop_link(app_name, core: LegendaryCore, type_of_link="desktop"):
|
|||
igame = core.get_installed_game(app_name)
|
||||
|
||||
if os.path.exists(
|
||||
os.path.join(QSettings('Rare', 'Rare').value('img_dir', os.path.expanduser('~/.cache/rare/images'), str),
|
||||
os.path.join(QSettings('Rare', 'Rare').value('img_dir', os.path.join(data_dir, 'images'), str),
|
||||
igame.app_name, 'Thumbnail.png')):
|
||||
icon = os.path.join(QSettings('Rare', 'Rare').value('img_dir', os.path.expanduser('~/.cache/rare/images'), str),
|
||||
icon = os.path.join(QSettings('Rare', 'Rare').value('img_dir', os.path.join(data_dir, 'images'), str),
|
||||
igame.app_name, 'Thumbnail')
|
||||
else:
|
||||
icon = os.path.join(QSettings('Rare', 'Rare').value('img_dir', os.path.expanduser('~/.cache/rare/images'), str),
|
||||
icon = os.path.join(QSettings('Rare', 'Rare').value('img_dir', os.path.join('images'), str),
|
||||
igame.app_name, 'DieselGameBoxTall')
|
||||
# Linux
|
||||
if os.name == "posix":
|
||||
|
|
Loading…
Reference in a new issue