Reply To: Smart playlist help!

#16820
sonichouse
Participant

@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