SHARE
TWEET

lastexport.py -> .scrobbler.log

a guest Sep 5th, 2015 234 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. $lines = file(__DIR__.'/exported_tracks.txt');
  4. $row = null;
  5. $ts = time();
  6.  
  7. $result = "#AUDIOSCROBBLER/1.0
  8. #TZ/UTC
  9. #CLIENT/Rockbox h3xx 1.1\n";
  10.  
  11. foreach ($lines as $line) {
  12.         $ts -= 19;
  13.         $row = explode("\t", $line);
  14.         $result .= implode("\t", [$row[2], $row[3], $row[1], '', 180, 'L', $ts])."\n";
  15. }
  16.  
  17. file_put_contents(__DIR__.'/.scrobbler.log', $result);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top