hi, does anybody know how to upload scrobbler.log files to listenbrainz? I like to listen to music on an mp3 player running rockbox, which generates scrobbler.log files, there are a couple tools ive found to upload to last.fm but nothing that ive been able to download or build can upload to listenbrainz.
I don’t know of a ready made solution, and also don’t know what formats these log files have. In general it shouldn’t be difficult to get something running here.
Maybe if you know some Python the following script could give you some starting point:
It’s a really rough tool I just put together for my personal use where I re-submitted the listens from a ListenBrainz export JSON file to my ListenBrainz account again, after I had reset it. I guess that could be turned into a proper tool, but I only needed it once.
Hi! I am not sure what the data inside these files looks like but it should be possible to write a script to submit them using LB api. If you can share a sample, I can try to help you with that.
this is rockbox’s wiki page on it
https://www.rockbox.org/wiki/LastFMLog
im not sure how to attacha text file but heres a sample:
#AUDIOSCROBBLER/1.1
#TZ/UNKNOWN
#CLIENT/Rockbox sansaclipplus $Revision$
Remix 2008 Elif Turan - Büyüt Ýstersen 4 279 L 1260341207
Özcan Deniz Ses ve Ayrilik Sevdanin rengi (sipacik) byMrTurkey 5 306 L 1260342084
Ozcan Deniz °°° Www.Setforum.Com °°° By Yorgunsevdali °°° Hediye °°° Www.Setforum.Com °°° By Yorgunsevdali °°° Nasip Degilmis 7 241 L 1260342391
Özcan Deniz Hediye 2@V@7 Bir Dudaktan 1 210 L 1260342633
KOMPROMAT Traum und Existenz Possession 1 220 L 1260357290 d66b1084-b2ae-4661-8382-5d0c1c484b6d
KOMPROMAT Traum und Existenz Traum Und Existenz 2 275 L 1260357511 4a5c6d60-47ed-4b4b-ac90-ad0530ff96c6
KOMPROMAT Traum und Existenz Niemand 3 243 L 1260357786 2ddba3e7-e7f3-4ce7-b4f3-dfe5630470e5
KOMPROMAT Traum und Existenz De mon âme à ton âme 4 265 S 1260357912 0c535517-8c8d-413a-a2d7-08aa1440f37b
Kraftwerk Trans-Europe Express The Hall of Mirrors 2 474 S 1260358000 385ba9e9-626d-4750-a607-58e541dca78e
Kraftwerk The Man·Machine The Model 4 224 L 1260358094 6f78de43-5c10-4a81-8095-cb0e70e45ca6
Kraftwerk The Man·Machine Neon Lights 5 534 L 1260358318 07e66e1c-c8d7-450c-b2ea-dddd7d9561ad
Kraftwerk The Man·Machine The Man·Machine 6 332 L 1260358852 fc468954-6d42-468f-b6a5-9ba6aa4f1c49
Teeth Agency You Don't Have To Live In Pain Anon 1 196 L 1260359207 8f1da775-4277-4b4b-89df-30d2b10311ed
Teeth Agency You Don't Have To Live In Pain Wolfs Jam 2 107 L 1260359404 1262beaf-19f8-4534-b9ed-7eef9ca8e83f
Teeth Agency You Don't Have To Live In Pain Many People (remake) 3 254 L 1260359512 58cf7138-0224-45d7-b252-b4cc7d299725
Teeth Agency You Don't Have To Live In Pain Jesse / Eska Games 4 240 L 1260359766 1a869d6b-0301-4c6f-afa5-0136831bb47f
Teeth Agency You Don't Have To Live In Pain The Dummy Run 5 185 L 1260360006 6fdc5237-895f-4125-b2c1-e15bf69c2517
Teeth Agency You Don't Have To Live In Pain Fazer Folk (Teeth version) 6 240 L 1260360192 4cc0c6dd-af04-4f04-a296-598c57f21aeb
Teeth Agency You Don't Have To Live In Pain Abbana Kange 7 184 L 1260360432 c20e6502-7166-4219-b7ee-597e8303daf6
Teeth Agency You Don't Have To Live In Pain Queen of the Night 1 257 L 1260360616 23f48ffe-a5b5-4153-a99d-04a9d9a4094c
Teeth Agency You Don't Have To Live In Pain One for Tusk 2 97 L 1260360874 6b8b7fa6-101e-4ac1-b761-45daefb1b12b
Teeth Agency You Don't Have To Live In Pain Harpoon Land (remake) 3 203 L 1260360971 89ab218d-9703-47fc-a75c-51af97ab65ea
Teeth Agency You Don't Have To Live In Pain Fly Porridge 4 255 L 1260361175 2f70d072-f664-41b2-9948-65636e4763da
From https://github.com/ultraelephant/pyapplier/blob/master/pyapplier.py#L83 , I see that this is a tsv file and what various columns are. It shouldn’t be hard to modify the script @outsidecontext shared above to read this format. I can do that in the upcoming week and share it here so that you can run it locally to submit listens to LB.
Hi Lucifer,
Just wondering—did you ever get around to do this?
Hi! Sorry I had forgotten about this earlier. The latest ping reminded me of this so I modified @outsidecontext 's script for submitting such scrobble.log files. Here’s the gist: https://gist.github.com/amCap1712/bb63c802d277242e71ff03dcad516b9c
You need Python 3 installed. Download both files from the gist. Put both those files and scrobble.log file in the same directory. Open a terminal and move to the directory where the files are located. The script can be run like: python3 listenbrainz-import.py YOUR_TOKEN YOUR_FILE
.
I started making a program to upload different file formats to ListenBrainz GitHub - Coloradohusky/ListenBrainz_File_Parser: Parses database files from different music listen tracker applications, and imports them into ListenBrainz
I’ll work on adding it whenever I get a chance
Assuming the example given is correct, I have a working RockBox submitter in v0.0.3.
Any input is appreciated, and a sample log file would be great to prove it works on the source.
Also, what does ‘Rating’ do? I see in lucifer’s gist he skips tracks that don’t have ‘L’ in Rating, but I wasn’t able to find any documentation about what it means - maybe it means ‘Listened’ or ‘Skipped’? If so, then does ‘duration’ mean the duration listened to, or simply the duration of the entire track, even if you skipped a couple of seconds?