I just added another library definition which I call "Lossless
Preferred": it attempts to solve the issue where users have two copies
of a track, once lossy (for mobile use) and once lossless. Previously
this would result in duplicate albums and tracks in your library. This
new library definition tries to filter out those dupes.
Please note that this will not merge albums if some tracks of the album
were lossy and others not. We can't easily compensate for the mess you
create ;-).
In order to get this virtual library you'll have to run a rescan (no
wipe required).
And for the geeks: here's the SQL I'm using. Please let me know if you
see any potential for improvement.
Code:
--------------------
SELECT tracks.id
FROM tracks, albums
WHERE albums.id = tracks.album
AND (
tracks.lossless
OR 1 NOT IN (
SELECT 1
FROM tracks other
JOIN albums otheralbums ON
other.album
WHERE other.title = tracks.title
AND other.lossless
AND other.primary_artist =
tracks.primary_artist
AND other.tracknum =
tracks.tracknum
AND other.year = tracks.year
AND otheralbums.title =
albums.title
)
)
--------------------
Tracks in this library are either lossless or there's no lossless track
with the same title, album title, primary artist, track number and year.
Michael
http://www.herger.net/slim-plugins - MusicArtistInfo, MusicInfoSCR,
Smart Mix
------------------------------------------------------------------------
mherger's Profile: http://forums.slimdevices.com/member.php?userid=50
View this thread: http://forums.slimdevices.com/showthread.php?t=101701
_______________________________________________
beta mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/beta