v0.32.0: folder tree in Rabbit Sync Settings, quieter art pass, tink, VLC-style Preferences

- Rabbit Sync Settings shows the sidebar's folder tree. A folder has its own
  tristate checkbox; a fully ticked folder is stored as device_sync.folder_ids
  and follows the folder, so playlists added to it later sync too.
- The album-art pass compares covers against the sizes the planner's device
  scan already read (plan.art_sizes) instead of an MTP stat per album, caches
  "no art" as a .none marker, and only unlinks covers that are really there.
  The summary reports covers actually updated rather than every cover.
- A quiet tink when a Rabbit sync, export or URL import finishes, with an
  on/off switch (sound_effects, on by default).
- Preferences is now General / Appearance / Integrations, a list on the left
  and the page on the right, opened big enough for the tallest page.
This commit is contained in:
2026-10-01 00:45:42 -07:00
parent 5c19eb7b8e
commit 3888248231
13 changed files with 699 additions and 80 deletions
+13 -12
View File
@@ -26,7 +26,10 @@ from lintunes.gui.album_art_dialog import AlbumArtDialog
from lintunes.gui.art_ops import embed_artwork
from lintunes.gui.cast_dialog import ChromecastDialog
from lintunes.gui.cassette_ui import CassetteUi
from lintunes.gui.device_sync_dialog import DeviceSyncSettingsDialog
from lintunes.gui import sounds
from lintunes.gui.device_sync_dialog import (
DeviceSyncSettingsDialog, resolve_sync_playlists,
)
from lintunes.gui.export_dialog import ExportKindDialog, WebMixDialog
from lintunes.gui.identify_dialog import IdentifyDialog
from lintunes.gui.sidebar import SIDEBAR_INSET, SidebarPanel
@@ -595,16 +598,9 @@ class MainWindow(QMainWindow):
dialog.exec()
def _selected_sync_playlists(self) -> list:
"""The ticked playlists, in the order they were ticked in settings.
Ids that no longer resolve are skipped rather than cleaned up: a
playlist can be missing because the other machine hasn't synced yet,
and silently forgetting the choice would be worse than ignoring it.
"""
library = self._manager.library
return [library.playlists[pid]
for pid in self._prefs.device_sync.get("playlist_ids", [])
if pid in library.playlists]
"""The ticked playlists (and everything in ticked folders)."""
return resolve_sync_playlists(self._manager.library,
self._prefs.device_sync)
def _sync_to_andtunes(self):
# Everything may have changed since the menu opened — re-verify.
@@ -693,7 +689,9 @@ class MainWindow(QMainWindow):
msg = (f"Synced {summary['playlists']} playlist(s) to the "
f"{summary['device']}: {summary['tracks']} tracks "
f"({summary['copied']} copied, {summary['kept']} up to date), "
f"{summary['albums']} covers, {summary['removed']} removed")
f"{summary['removed']} removed")
if summary.get("covers_copied"):
msg += f", {summary['covers_copied']} covers updated"
if summary["skipped"]:
msg += f", {summary['skipped']} skipped (no local file)"
if summary.get("refused"):
@@ -709,6 +707,7 @@ class MainWindow(QMainWindow):
# waiting for the file watcher.
self._manager.reload_from_disk()
self.statusBar().showMessage(msg, 10000)
sounds.play_done(self._prefs)
if unwritable:
# Worth a dialog: these songs are *not* in the library the app
# reads, so they'd otherwise just be quietly absent from the
@@ -953,6 +952,7 @@ class MainWindow(QMainWindow):
msg += (f", {summary['vanished']} changed under us "
"(export again to pick them up)")
self.statusBar().showMessage(msg, 12000)
sounds.play_done(self._prefs)
def _on_export_cancelled(self, summary):
self._export_inhibitor.release()
@@ -1296,6 +1296,7 @@ class MainWindow(QMainWindow):
msg = f"Import cancelled — {count} song(s) imported"
else:
msg = f"Imported {count} song(s) from the link"
sounds.play_done(self._prefs)
target = self._url_target
playlist = (self._manager.library.playlists.get(target.pid)
if target is not None else None)