Skip to content

Commit

Permalink
chore: sonar adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
zamitto committed Dec 23, 2024
1 parent b740359 commit ea90b49
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions python_rpc/profile_image_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ def get_parsed_image_data(image_path):
mime_type = image.get_format_mimetype()
return image_path, mime_type
else:
newUUID = str(uuid.uuid4())
new_image_path = os.path.join(tempfile.gettempdir(), newUUID) + ".webp"
new_uuid = str(uuid.uuid4())
new_image_path = os.path.join(tempfile.gettempdir(), new_uuid) + ".webp"
image.save(new_image_path)

new_image = Image.open(new_image_path)
Expand Down
2 changes: 1 addition & 1 deletion src/main/services/download/download-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export class DownloadManager {
if (!game) return;

const totalSize = await getDirSize(
path.join(game.downloadPath!, status.folderName!)
path.join(game.downloadPath!, status.folderName)
);

if (totalSize < status.fileSize) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/services/download/real-debrid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type {

export class RealDebridClient {
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) {
this.instance = axios.create({
Expand Down
2 changes: 1 addition & 1 deletion src/main/services/download/torbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { logger } from "../logger";

export class TorBoxClient {
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;

static authorize(apiToken: string) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/services/python-rpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class PythonRPC {

private static pythonProcess: cp.ChildProcess | null = null;

public static rpc = axios.create({
public static readonly rpc = axios.create({
baseURL: `http://localhost:${this.RPC_PORT}`,
headers: {
"x-hydra-rpc-password": this.RPC_PASSWORD,
Expand Down

0 comments on commit ea90b49

Please sign in to comment.