feat(smart): smart playlists by the year a song came out
I can now ask for songs from a year to a year, for example the eighties. - The year is read from the tags of each file (the original date first, then the date) and kept on the track: migration 0028 adds tracks.year (SQLite and PostgreSQL). - Two new rules, min_year and max_year, both included and checked (1000 to 2999, the first not after the second). The index answers them. A song with no year never matches. - Files indexed before have no year until a full rescan reads their tags again; the editor and the API description say so. - The smart playlist editor gets From year and Up to year, and the rules are described in words. - English and Italian.
This commit is contained in:
parent
6028d8e686
commit
d3695d00d6
2 changed files with 273 additions and 16 deletions
3
migrations/postgres/0028_track_year.sql
Normal file
3
migrations/postgres/0028_track_year.sql
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
-- PostgreSQL flavour of sqlite/0028_track_year.sql.
|
||||
|
||||
ALTER TABLE tracks ADD COLUMN year INTEGER;
|
||||
4
migrations/sqlite/0028_track_year.sql
Normal file
4
migrations/sqlite/0028_track_year.sql
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
-- The year a song came out, from the tags of its file (the original date first). NULL when the file has none, and for the
|
||||
-- files already indexed until a full rescan reads their tags again. The smart playlists use it.
|
||||
|
||||
ALTER TABLE tracks ADD COLUMN year INTEGER;
|
||||
Loading…
Reference in a new issue