v0.29.0: Cassette friend mode — browse a friend's library, cassette songs

- A ▾ cut from the right end of the Library button (shown once there's a
  friend) opens a popup of friends. Choosing one enters friend mode: the
  button becomes "<Name>'s Library" in light purple, the sidebar lists
  their shared playlists with a UFO follow toggle on each, and the content
  area is their library — browse only, nothing plays or edits.
- A cassette column on the far left and cassette buttons on every artist
  and album: pressed grey = send me this, medium grey on hover to let go.
  An artist cassettes all its albums and tracks (a snapshot).
- Bottom bar: Hide tracks I have (exact matches: artist, album, title,
  length within 2 s); close matches show light grey. Size of what's
  cassetted against free space: orange when Syncthing would stall at its
  free-space floor, red when it won't fit.
- Save and Close writes requests.json; Cancel discards; the ▾ or quitting
  with changes asks Save / Don't Save / Cancel.
This commit is contained in:
2026-09-28 21:27:06 -07:00
parent 662217a7b7
commit 8d2af17c70
15 changed files with 1565 additions and 14 deletions
+19
View File
@@ -209,6 +209,8 @@ class MainWindow(QMainWindow):
# Wiring
self._transport.play_clicked.connect(self.play_pause)
self._sidebar.library_selected.connect(self._show_library)
self._sidebar.friend_selector_clicked.connect(
self._cassette.show_friend_menu)
self._sidebar.playlist_selected.connect(self._show_playlist)
self._sidebar.tree.export_requested.connect(self._export_playlist)
self._sidebar.art.download_art_requested.connect(
@@ -392,6 +394,19 @@ class MainWindow(QMainWindow):
def cassette(self) -> CassetteUi:
return self._cassette
# What friend mode swaps in and out.
@property
def content_stack(self):
return self._content
@property
def sidebar(self):
return self._sidebar
def show_my_library(self):
self._sidebar.reflect_library()
self._show_library()
def _add_action(self, menu, text, shortcut, slot):
action = QAction(text, self)
if shortcut:
@@ -1684,6 +1699,10 @@ class MainWindow(QMainWindow):
self._inhibitor.release()
def closeEvent(self, event):
# Unsaved cassette choices in friend mode: Save / Don't Save / Cancel.
if not self._cassette.confirm_quit():
event.ignore()
return
# Quitting mid-transfer abandons a partial file on the device (it
# self-heals next sync, but silently) — make it a deliberate choice.
# A link import has nothing half-written on a device to warn about: