mirror of
https://github.com/darkzoul5/YoutubePlaylistSync.git
synced 2026-09-18 20:43:54 +03:00
fix: remove stale calls to data field
This commit is contained in:
+1
-1
@@ -131,7 +131,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
||||
cfg_path = getattr(self._settings, "path", None)
|
||||
if cfg_path is None:
|
||||
return {}
|
||||
raw = load_config(cfg_path).data
|
||||
raw = load_config(cfg_path)
|
||||
ui = raw.get("ui")
|
||||
ui = ui if isinstance(ui, dict) else {}
|
||||
tray = ui.get("tray")
|
||||
|
||||
@@ -2,7 +2,7 @@ from __future__ import annotations
|
||||
|
||||
import json
|
||||
|
||||
from PySide6 import QtWidgets
|
||||
from PySide6 import QtGui, QtWidgets
|
||||
|
||||
from ..smooth_scroll import enable_smooth_scrolling
|
||||
|
||||
@@ -41,4 +41,4 @@ class LogsPage(QtWidgets.QWidget):
|
||||
except Exception:
|
||||
line = f"{name}: {payload}"
|
||||
self._text.appendPlainText(line)
|
||||
self._text.moveCursor(self._text.textCursor().End)
|
||||
self._text.moveCursor(QtGui.QTextCursor.MoveOperation.End)
|
||||
|
||||
@@ -134,7 +134,7 @@ class PlaylistManagerPage(QtWidgets.QWidget):
|
||||
self._config_path = getattr(self._settings, "path", None)
|
||||
if self._config_path is None:
|
||||
raise RuntimeError("Config path not available")
|
||||
self._config = normalize_config(load_config(self._config_path).data)
|
||||
self._config = normalize_config(load_config(self._config_path))
|
||||
rows = self._rows_from_settings()
|
||||
except Exception as exc:
|
||||
self._status.setText(f"Failed to load config: {exc}")
|
||||
|
||||
@@ -109,7 +109,7 @@ class SettingsPage(QtWidgets.QWidget):
|
||||
try:
|
||||
self._suppress_autosave = True
|
||||
cfg = load_config(self._config_path)
|
||||
self._config = dict(cfg.data)
|
||||
self._config = dict(cfg)
|
||||
|
||||
self._ffmpeg_path.setText(str(self._config.get("ffmpeg_path") or ""))
|
||||
self._max_parallel.setValue(int(self._config.get("max_parallel_downloads") or 2))
|
||||
|
||||
Reference in New Issue
Block a user