My DP3 (version 3.6.7) seems to have gone a bit crazy lately. It's
running on a combined player/server that literally only EVER gets turned
on and off, that is, I turn it off when I get up in the morning and turn
it back on when I go to bed at night. I've been using this SQL:
Code:
--------------------
-- PlaylistName:Albums - entirely or partially unplayed
-- PlaylistGroups:
-- PlaylistLimitOption:unlimited
-- PlaylistTrackOrder: ordered
drop table if exists dynamicplaylist_random_albums;
--This step obtains *ONE* album ID for an album with at least one unplayed
track
create temporary table dynamicplaylist_random_albums as
select partiallyplayed.album as album from
(select distinct tracks.album as album from tracks
join tracks_persistent on
tracks_persistent.urlmd5 = tracks.urlmd5 and
(tracks_persistent.playCount = 0 or tracks_persistent.playCount is NULL or
tracks_persistent.lastPlayed is NULL)
left join dynamicplaylist_history on
dynamicplaylist_history.id=tracks.id and
dynamicplaylist_history.client='PlaylistPlayer'
where
tracks.url not like '%/DTS/%'
and tracks.url not like '%/AC3/%'
and tracks.url not like '%/Temp/%'
and tracks.url not like like '%Low%20Sample%20Rates%'
and tracks.audio = 1
and tracks.samplerate >= 44100
and dynamicplaylist_history.id is null
and not exists (select * from tracks t2, genre_track,
genres
where
t2.id =
tracks.id and
tracks.id =
genre_track.track and
genre_track.genre = genres.id and
genres.name in
('AC-3','Audiobook','Comedy','Commentary','Commercial','Documentary','DTS','History',
'Interview','Kiddie','Podcast','Self Hypnosis','Shortwave','Sound Collage',
'Sound Effects','Spoken','Spoken Word','Talk','Test'))
group by tracks.album
order by random()
limit 10) as partiallyplayed
order by random()
limit 1;
--This step uses the above-selected album ID to select all the tracks for
that album (played or not) except for those in unwanted genres
select distinct tracks.url
from tracks
join dynamicplaylist_random_albums on
dynamicplaylist_random_albums.album = tracks.album
join tracks_persistent on
tracks_persistent.urlmd5 = tracks.urlmd5
left join dynamicplaylist_history on
dynamicplaylist_history.id=tracks.id and
dynamicplaylist_history.client='PlaylistPlayer'
where
tracks.audio = 1
and dynamicplaylist_history.id is null
and not exists (select * from tracks t2, genre_track, genres
where
t2.id = tracks.id and
tracks.id =
genre_track.track and
genre_track.genre =
genres.id and
genres.name in
('AC-3','Audiobook','Comedy','Commentary','Commercial','Documentary','DTS','History',
'Interview','Kiddie','Podcast','Self Hypnosis','Shortwave','Sound Collage',
'Sound
Effects','Spoken','Spoken Word','Talk','Test'))
order by dynamicplaylist_random_albums.album,
tracks.disc,
tracks.tracknum;
drop table if exists dynamicplaylist_random_albums;
--------------------
Originally it worked exactly as intended, but recently it's begun
ignoring the genres I *don't* want, so I'll wake up in the middle of the
night to find it playing an audiobook (just for one example). It's been
happening rarely enough that I've just been living with it (and maybe I
did something wrong with the code?), but as of last night there's a new
level of weirdness:
1. I just want full albums, but during the night it started adding
tracks. Below is a sample of What Was That Tune? from last night:
38758
2. Additionally, though I have Max Number of Unplayed Songs set to 50,
Min Number of Unplayed Songs set to 4 and Number of Played Tracks to
Keep set to 100, I just noticed that my current playlist is enormous: 18
hours, 11 minutes, 43 seconds. The upcoming items mostly look like what
I want (that is, complete albums not in excluded genres), but not
entirely. There are some tracks without the rest of their albums and at
least one track where the genre is "Podcast" and another where it's
"Audiobook".
I haven't made any changes at all with the server, so I'm not sure
what's going on here. I haven't even rescanned in months.
Any advice?
+-------------------------------------------------------------------+
|Filename: Screenshot 2022-09-21 072252.jpg |
|Download: http://forums.slimdevices.com/attachment.php?attachmentid=38758|
+-------------------------------------------------------------------+
------------------------------------------------------------------------
atrocity's Profile: http://forums.slimdevices.com/member.php?userid=16009
View this thread: http://forums.slimdevices.com/showthread.php?t=115501
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins