FireFly Media Server › Firefly Media Server Forums › Firefly Media Server › General Discussion › Smart playlist help!
- This topic has 8 replies, 3 voices, and was last updated 16 years, 7 months ago by fizze.
-
AuthorPosts
-
13/04/2008 at 4:45 PM #2376AnonymousInactive
Hi,
I want to create a playlist that contain my 30 most played songs. How do I do that? can’t figure that out with help from the wizard. Please help me…
13/04/2008 at 5:10 PM #16818sonichouseParticipant@Dimi wrote:
Hi,
I want to create a playlist that contain my 30 most played songs. How do I do that? can’t figure that out with help from the wizard. Please help me…
Not sure if this is possible with the wizard, but you could create a static playlist using some script, and update regularly.
The SQL would look something like
select path,fname, play_count, datetime(time_played, 'unixepoch', 'localtime')
from songs
where play_count > 0 and artist''
group by 1,2,3,4
order by 3 desc,4 desc,1,2 asc
limit 30;Then you could create a m3u file with the results.
13/04/2008 at 6:21 PM #16819AnonymousInactiveThanks mate, for such a quick reply!
I will tell you how things went as soon as i
a) figured out how to run scripts in debian.
b) figured out how to create a m3u file that contains the information from SQL that previously were created with the script.But hey I love the challange!
Thanks.
13/04/2008 at 6:52 PM #16820sonichouseParticipant@Dimi wrote:
Thanks mate, for such a quick reply!
I will tell you how things went as soon as i
a) figured out how to run scripts in debian.
b) figured out how to create a m3u file that contains the information from SQL that previously were created with the script.But hey I love the challange!
Thanks.
A basic m3u file only needs the file listed whether that be fully qualified or relative diretory references.
You should have sqlite or sqlite3 installed to issue the query.
Pipe the results through to your m3u file.
I created test.sql as
select path
from songs
where play_count > 0 and artist''
order by play_count desc, time_played desc, 1 asc
limit 30;
and then ran
sqlite3 /opt/var/mt-daapd/test.db test.m3u
13/04/2008 at 7:45 PM #16821fizzeParticipantThat actually sounds like an elegant way to get such a feature. ๐
I guess I’ll enhance my cron jobs a little.13/04/2008 at 7:47 PM #16822sonichouseParticipant@fizze wrote:
That actually sounds like an elegant way to get such a feature. ๐
I guess I’ll enhance my cron jobs a little.When and if Ron returns to here I hope that he can implement the order and limit stuff in playlists.
Far better to be able to use the smart playlists than hack sql.
14/04/2008 at 9:48 AM #16823fizzeParticipantHehe, I hack SQL for a living, so there’s no pain in a little more.
Well, Ron wants to keep the smart playlist stuff backend-independent. So that could take quite a while.
14/04/2008 at 5:22 PM #16824sonichouseParticipant@fizze wrote:
Hehe, I hack SQL for a living, so there’s no pain in a little more.
Me too, but it is always fun when you try and switch between oracle, teradata, sqlite, access etc …
@fizze wrote:
Well, Ron wants to keep the smart playlist stuff backend-independent. So that could take quite a while.
Pity, there are plenty of options when in the database. makes it easier for extracting info.
14/04/2008 at 5:29 PM #16825fizzeParticipant@sonichouse wrote:
.., access etc …
You poor sod! My heart is with you ๐
Well, I played with the thought of doing a fork and just improving the smart playlists so they would play nice with sqlite2/3 at least. You know.
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.