chore: sonar adjustments

This commit is contained in:
Zamitto 2024-12-23 10:50:35 -03:00
parent b74035979f
commit ea90b49604
5 changed files with 6 additions and 6 deletions

View File

@ -15,8 +15,8 @@ class ProfileImageProcessor:
mime_type = image.get_format_mimetype() mime_type = image.get_format_mimetype()
return image_path, mime_type return image_path, mime_type
else: else:
newUUID = str(uuid.uuid4()) new_uuid = str(uuid.uuid4())
new_image_path = os.path.join(tempfile.gettempdir(), newUUID) + ".webp" new_image_path = os.path.join(tempfile.gettempdir(), new_uuid) + ".webp"
image.save(new_image_path) image.save(new_image_path)
new_image = Image.open(new_image_path) new_image = Image.open(new_image_path)

View File

@ -172,7 +172,7 @@ export class DownloadManager {
if (!game) return; if (!game) return;
const totalSize = await getDirSize( const totalSize = await getDirSize(
path.join(game.downloadPath!, status.folderName!) path.join(game.downloadPath!, status.folderName)
); );
if (totalSize < status.fileSize) { if (totalSize < status.fileSize) {

View File

@ -9,7 +9,7 @@ import type {
export class RealDebridClient { export class RealDebridClient {
private static instance: AxiosInstance; private static instance: AxiosInstance;
private static baseURL = "https://api.real-debrid.com/rest/1.0"; private static readonly baseURL = "https://api.real-debrid.com/rest/1.0";
static authorize(apiToken: string) { static authorize(apiToken: string) {
this.instance = axios.create({ this.instance = axios.create({

View File

@ -10,7 +10,7 @@ import { logger } from "../logger";
export class TorBoxClient { export class TorBoxClient {
private static instance: AxiosInstance; private static instance: AxiosInstance;
private static baseURL = "https://api.torbox.app/v1/api"; private static readonly baseURL = "https://api.torbox.app/v1/api";
public static apiToken: string; public static apiToken: string;
static authorize(apiToken: string) { static authorize(apiToken: string) {

View File

@ -28,7 +28,7 @@ export class PythonRPC {
private static pythonProcess: cp.ChildProcess | null = null; private static pythonProcess: cp.ChildProcess | null = null;
public static rpc = axios.create({ public static readonly rpc = axios.create({
baseURL: `http://localhost:${this.RPC_PORT}`, baseURL: `http://localhost:${this.RPC_PORT}`,
headers: { headers: {
"x-hydra-rpc-password": this.RPC_PASSWORD, "x-hydra-rpc-password": this.RPC_PASSWORD,