Logging and variables

Hello there,

I would like to log my playlists in order to create report and send it to SACEM (which is managing copyright for artists in France).
Maybe i should log towards a sql database.

My question is : how to extract attributes in a log ?
I’ve got few attributes for each song (ISRC, author, compositor, etc…). And if i don’t send those to SACEM, i’m sure that artist will never get money…

Is there some french radio/weradio here ? What are your practice with SACEM ?


If you are using mAirListDB, all played items will be logged into the “playlistlog” table. If you know what data you need in the report, you can just run an SQL query against this table (joined with the “items” table etc.).

A built-in reporting tool is under development.

Oh ! Thanks for your reply !
I think it’s exactly what I need.
SQL is just one way I thought about but maybe not necessary.
I’m using mairlist DB for sure. But I don’t find playlist log table.

Take another look, it’s definitely there. Table “playlistlog”.

Hum right, so it seems there is not easy way to extract played songs with them items without using a script.
And what about the built-in reporting tool ? When do you think it will be released ?

You can use the SQL Console in the DB app which can export results as CSV. Do you know SQL. or do you need help with it?

Which fields etc. do you need anyway? Is there a mandatory format for SACEM?

I knew SQL and made some few years ago. I think I will be able to export some tables and certainly see the fields name.
I will try it !
Thanks !

Hi Torben,

I’m on a good way.
I’m exploring “playlislog” table, “items” table and “items_attributes” table.
Sounds great. But, my level in SQL is a little bit moderate.
Do you think it’s possible to create a SQL request wich will join “playlistlog”, “items”, “items_attribute”, and have something like

Maybe it’s possible to GROUP by Title and Artist too ?

I will looking for good SQL syntax, but eventually a buit-in reporting tool would be so great :slight_smile:




You must JOIN multiple times with item_attributes. This is a good starting point:

SELECT pl.starttime, i.title, i.artist, a1.value, a2.value
FROM playlistlog pl
JOIN items i ON pl.item=i.idx
LEFT JOIN item_attributes a1 ON a1.item=i.idx AND a1.name='ISRC'
LEFT JOIN item_attributes a2 ON a2.item=i.idx AND a2.name='Compositeur';

Now add filters etc.

Ok it’s perfect !
I will try to put some filters
You make me win a lot of time because my SQL memories are a little bit far !

Hi Torben,
It works ! Now, I can do exactly what i want.

Now, i want to have the created date of each items in Database.
This field exists in items table and is called “created”.
I’ve tried to create a new standard attribute called “created”, but there is no link.
So how can I add a field which is already exists in database in my item window ?

An another question : there is no field already exist which stores the bitrate ?


The “created” field is only used internally and not available as an attribute etc.

Bitrate is neither. I believe it doesn’t make much sense to store “technical” details of the items in the database, as you can easily replace the file at any time, and create an inconsistency.

Right, thanks for your answer !