Playlist reporting?

Events happening in the community are now at Drupal community events on www.drupal.org.
markuslowe's picture

Wondering if anyone uses the Station module Playlists to do music charting/reporting? If so, how do you accomplish this?

Thanks!

Comments

Not currently

thumb's picture

Hello. No, the 5.x versions do not provide this feature. I'm not sure if they're plans to to add this feature. It's something I've considered building but my customer has since gone off the air.

darn!

refreshingapathy-gdo's picture

I would love to have a functionality like that. It would make my life easier and cut down on the amount of time I spend with my homebrew charting app.

rick
Operations Manager and general tech guy
WONY, 90.9FM Oneonta

Operations Manager and general tech guy
WONY, 90.9FM Oneonta

Count me in

bcarlson33's picture

That would be a huge time-saver for our station as well.

Here's the PHP Code

neskiem's picture

Here's the start of some charting code. It would be good to do a JOIN with {station_playlist} so that we can make use of the timestamp to only look at newer playlists.

<?php
$result
= db_query('SELECT COUNT(t.artist), t.artist, t.album FROM {station_playlist_track} t GROUP BY t.album ORDER BY COUNT(t.artist) DESC');

while (
$row = db_fetch_array($result)) {
     echo
$row['COUNT(t.artist)'] ." ". $row['artist']. "  -  ".$row['album'] . "<br />";
}

?>

Hmmm

refreshingapathy-gdo's picture

Maybe something like this? In probably not-the-most-efficient code ever.

<?php
$result
= db_query('SELECT station_playlist_track.artist, station_playlist_track.album, node.nid, node.created FROM node, station_playlist_track
WHERE TIMEDIFF(UNIX_TIMESTAMP(), node.created)<604800
GROUP BY station_playlist_track.album ORDER BY COUNT(station_playlist_track.album) DESC;'
);

while (
$row = db_fetch_array($result)) {
     echo
$row['COUNT(station_playlist_track.artist)'] ." ". $row['artist']. "  -  ".$row['album'] . "<br />";
}
?>

Where you're looking for the TIMEDIFF to give you only the last 7 days (604800 seconds) worth of playlist data.

Rick
Operations Manager and general tech guy
WONY, 90.9FM Oneonta

Operations Manager and general tech guy
WONY, 90.9FM Oneonta

I started looking at doing

drewish's picture

I started looking at doing this via Views but it'll take some work since making this a base table views would require a new primary key field which in turn would require updating the node edit form.

Radio

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: