v0.25.0: New Tracks, a soft emboss, date added pinned

Groundwork for Cassette (friend library sharing) that stands on its own:

- A brand-new library (fresh data dir, or a fresh iTunes import) starts
  with a "New Tracks" smart playlist: added in the last 3 months, newest
  first. Fixed persistent id, so two machines seeding one unsynced share
  merge into a single playlist.
- Every non-flat button, the sidebar Library button and the transport
  boxes get a very slight top-lit gradient computed from the live palette,
  with the chosen color kept exactly at its midpoint.
- Tests pin that individual imports stamp date added = now even for an
  old file, and that the iTunes migration keeps the XML's dates.
This commit is contained in:
2026-09-28 20:56:28 -07:00
parent 6fc6c335c5
commit 549c5bf94f
9 changed files with 275 additions and 11 deletions
+10
View File
@@ -145,6 +145,16 @@ class LibraryManager(QObject):
redo=lambda: self._insert_playlists([folder])))
return folder
def seed_new_library(self):
"""Add the playlists a brand-new library starts with (not undoable —
there is nothing before them to go back to)."""
from lintunes.seed_playlists import seed_new_library
added = seed_new_library(dict(self.library.playlists))
if added:
self._insert_playlists(added)
for playlist in added:
self.recompute_smart_playlist(playlist.persistent_id, force=True)
def create_smart_playlist(self, name: str, criteria, parent_pid: str = "") -> Playlist:
playlist = Playlist(
name=name,