One thing that I've been trying to figure out how to do is report the tracks I've listened to/played via RadioDJ to last.fm[1]. With the little bit of time I've had the best solution I've been able to come up with thus far is creating a log file from the info stored in RadioDJ's database, then uploading that log file via someone else's "scrobbler".
First, the SQL query to build a .scrobbler.log file: SELECTartist,album,title,track_no, cast(duration as decimal(10,0)), 'L' ASlistened_dummy_field, UNIX_TIMESTAMP(date_played) FROMhistoryWHEREsong_type='0' ANDdate_playedLIKE '2015-06-25%' ORDER BYdate_playedDESC INTO OUTFILE 'C:/.scrobbler.log' FIELDS TERMINATED BY '\t';
The code above currently pulls the info from the history table--assuming that the RadioDJ database has already been selected for use, of course--and outputs all the plays for the set date (set by the ``date_playedLIKE '2015-06-25%') into a tab delimited text file. As of now, I've found two services that will use the file created: the online scroblr.net[2], and a standalone client called LogScrobbler[3]. I'm hoping that I can later tweak the query and find a way to inject the proper headers into the .scrobbler.log file, so that the log-file is more compatible with other scrobbling clients. My end-goal is to create either a batch process that does all that, and uses a command-line scrobbling client, OR some sort of php script that handles querying the database and posting to last.fm...
=> 2: https://web.archive.org/web/20170916173038/http://scroblr.net:80/ | 3: https://code.google.com/p/logscrobbler/
...needless to say, I also want a better way to handle the date option. And, finding a way to scrobble in "real-time" would be preferable, rather than this "bulk" scrobbling option.
Inspiration for this little project: http://www.rockbox.org/wiki/LastFMLog[4] http://www.audioscrobbler.net/wiki/Portable_Player_Logging[5] Tags: #radio automation, #RadioDJ
=> 4: http://www.rockbox.org/wiki/LastFMLog | 5: http://www.audioscrobbler.net/wiki/Portable_Player_Logging
[…] “Build a .scrobbler.log file from the RadioDJ history table” was originally published on J. Palmer […]
=> 🔙 Previous Page This content has been proxied by September (ba2dc).Proxy Information
text/gemini