arkq / cmusfm

Last.fm standalone scrobbler for the cmus music player
GNU General Public License v3.0
234 stars 5 forks source link

Cannot scrobble behind restricted firewall #26

Open ElDifinitivo opened 5 years ago

ElDifinitivo commented 5 years ago

A lot of my listening is done in a building with a very restrictive firewall on their network: any outgoing connections seem to be completely dropped for the most part.

I'm giving cmus a try after some grievances with mpd + ncmpcpp, but scrobbling is a must no matter what I choose.

Now below are the (scrubbed) logs when I run cmusfm server in the foreground on this network:

DEBUG server.c:318: Starting server
DEBUG server.c:357: Entering server main loop
DEBUG server.c:365: New client accepted: 6
DEBUG server.c:365: New client accepted: 7
DEBUG server.c:142: Payload:  -  - 0.  (180s)
DEBUG server.c:143: Location: 
DEBUG server.c:147: Server hiccup test (5s)
DEBUG libscrobbler2.c:327: Session validation wrapper
DEBUG libscrobbler2.c:289: Now playing: 0
DEBUG libscrobbler2.c:292: Payload:  - (null) ((null)) - 0.  (0s)
DEBUG libscrobbler2.c:163: Signature data: $API_KEY
DEBUG libscrobbler2.c:198: Params: $API_KEY
DEBUG libscrobbler2.c:114: Check: status: 28, body: (null)
DEBUG libscrobbler2.c:309: Now playing status: 2
DEBUG server.c:365: New client accepted: 7
DEBUG server.c:365: New client accepted: 8
DEBUG server.c:142: Payload: The Beatles - Sgt. Pepper's Lonely Hearts Club Band (Deluxe Edition) - 1. Sgt. Pepper's Lonely Hearts Club Band (122s)
DEBUG server.c:143: Location: /mnt/main/med/music/library/The Beatles/The Beatles-Sgt. Pepper's Lonely Hearts Club Band (Deluxe Edition) [Disc 1]/01.Sgt. Peppers Lonely Hearts Club Band.flac
DEBUG server.c:147: Server hiccup test (5s)
DEBUG server.c:230: Notification not enabled
DEBUG server.c:365: New client accepted: 8
DEBUG server.c:365: New client accepted: 9
DEBUG server.c:142: Payload: The Beatles - Sgt. Pepper's Lonely Hearts Club Band (Deluxe Edition) - 2. With A Little Help From My Friends (165s)
DEBUG server.c:143: Location: /mnt/main/med/music/library/The Beatles/The Beatles-Sgt. Pepper's Lonely Hearts Club Band (Deluxe Edition) [Disc 1]/02.With A Little Help From My Friends.flac
DEBUG server.c:147: Server hiccup test (5s)
DEBUG cache.c:121: Cache update: 1553011031
DEBUG cache.c:124: Payload: The Beatles - Sgt. Pepper's Lonely Hearts Club Band (Deluxe Edition) ((null)) - 1. Sgt. Pepper's Lonely Hearts Club Band (122s)
DEBUG server.c:230: Notification not enabled
^CDEBUG server.c:302: Stopping server

It didn't make much sense to me as I know from my experience using mpdscribble to scrobble with mpd that those work fine on this network. So I tested this again but proxying cmusfm server through Tor. Seems like it connects appropriately and scrobbles what I had in my cache as well. Also just as a sidenote, where is the XML cache file located?

[proxychains] config file found: /etc/proxychains4.conf
[proxychains] preloading /usr/lib/x86_64-linux-gnu/libproxychains.so.4
[proxychains] DLL init: proxychains-ng 4.13
DEBUG server.c:318: Starting server
DEBUG server.c:357: Entering server main loop
DEBUG server.c:365: New client accepted: 10
DEBUG server.c:365: New client accepted: 11
DEBUG server.c:142: Payload:  -  - 0.  (180s)
DEBUG server.c:143: Location: 
DEBUG server.c:147: Server hiccup test (5s)
DEBUG libscrobbler2.c:327: Session validation wrapper
DEBUG libscrobbler2.c:289: Now playing: 0
DEBUG libscrobbler2.c:292: Payload:  - (null) ((null)) - 0.  (0s)
DEBUG libscrobbler2.c:163: Signature data: $API_KEY
DEBUG libscrobbler2.c:198: Params: $API_KEY
[proxychains] Strict chain  ...  127.0.0.1:9050  ...  ws.audioscrobbler.com:443  ...  OK
DEBUG libscrobbler2.c:57: Read: size: 292, body: <?xml version="1.0" encoding="UTF-8"?>
<lfm status="ok">
  <nowplaying>
    <track corrected="0"></track>
    <artist corrected="0"></artist>
    <album corrected="0"></album>
    <albumArtist corrected="0"></albumArtist>
    <ignoredMessage code="1"></ignoredMessage>
  </nowplaying>
</lfm>

DEBUG libscrobbler2.c:114: Check: status: 0, body: <?xml version="1.0" encoding="UTF-8"?>
<lfm status="ok">
  <nowplaying>
    <track corrected="0"></track>
    <artist corrected="0"></artist>
    <album corrected="0"></album>
    <albumArtist corrected="0"></albumArtist>
    <ignoredMessage code="1"></ignoredMessage>
  </nowplaying>
</lfm>

DEBUG libscrobbler2.c:309: Now playing status: 0
DEBUG cache.c:159: Cache submit
DEBUG cache.c:192: Record size: 127
DEBUG cache.c:234: Cache: The Beatles - Sgt. Pepper's Lonely Hearts Club Band (Deluxe Edition) ((null)) - 1. Sgt. Pepper's Lonely Hearts Club Band (122s)
DEBUG libscrobbler2.c:232: Scrobble: 1553009960
DEBUG libscrobbler2.c:235: Payload: The Beatles - Sgt. Pepper's Lonely Hearts Club Band (Deluxe Edition) ((null)) - 1. Sgt. Pepper's Lonely Hearts Club Band (122s)
DEBUG libscrobbler2.c:163: Signature data: albumSgt. Pepper's Lonely Hearts Club Band (Deluxe Edition)$API_KEYartistThe Beatlesduration122methodtrack.scrobbleskdVSvIFyqXhse0mR6-lq8CZ97IV-pGjc4timestamp1553009960trackSgt. Pepper's Lonely Hearts Club BandtrackNumber1
DEBUG libscrobbler2.c:198: Params: album=Sgt.%20Pepper%27s%20Lonely%20Hearts%20Club%20Band%20%28Deluxe%20Edition%29&$API_KEY&artist=The%20Beatles&duration=122&method=track.scrobble&sk=dVSvIFyqXhse0mR6-lq8CZ97IV-pGjc4&timestamp=1553009960&track=Sgt.%20Pepper%27s%20Lonely%20Hearts%20Club%20Band&trackNumber=1&api_sig=$API_SIG
[proxychains] Strict chain  ...  127.0.0.1:9050  ...  ws.audioscrobbler.com:443  ...  OK
DEBUG libscrobbler2.c:57: Read: size: 508, body: <?xml version="1.0" encoding="UTF-8"?>
<lfm status="ok">
  <scrobbles ignored="0" accepted="1">
    <scrobble>
      <track corrected="0">Sgt. Pepper&apos;s Lonely Hearts Club Band</track>
      <artist corrected="0">The Beatles</artist>
      <album corrected="0">Sgt. Pepper&apos;s Lonely Hearts Club Band (Deluxe Edition)</album>
      <albumArtist corrected="0"></albumArtist>
      <timestamp>1553009960</timestamp>
      <ignoredMessage code="0"></ignoredMessage>
    </scrobble>
  </scrobbles>
</lfm>

DEBUG libscrobbler2.c:114: Check: status: 0, body: <?xml version="1.0" encoding="UTF-8"?>
<lfm status="ok">
  <scrobbles ignored="0" accepted="1">
    <scrobble>
      <track corrected="0">Sgt. Pepper&apos;s Lonely Hearts Club Band</track>
      <artist corrected="0">The Beatles</artist>
      <album corrected="0">Sgt. Pepper&apos;s Lonely Hearts Club Band (Deluxe Edition)</album>
      <albumArtist corrected="0"></albumArtist>
      <timestamp>1553009960</timestamp>
      <ignoredMessage code="0"></ignoredMessage>
    </scrobble>
  </scrobbles>
</lfm>

DEBUG libscrobbler2.c:255: Scrobble status: 0
DEBUG cache.c:192: Record size: 127
DEBUG cache.c:234: Cache: The Beatles - Sgt. Pepper's Lonely Hearts Club Band (Deluxe Edition) ((null)) - 1. Sgt. Pepper's Lonely Hearts Club Band (122s)
DEBUG libscrobbler2.c:232: Scrobble: 1553010388
DEBUG libscrobbler2.c:235: Payload: The Beatles - Sgt. Pepper's Lonely Hearts Club Band (Deluxe Edition) ((null)) - 1. Sgt. Pepper's Lonely Hearts Club Band (122s)
DEBUG libscrobbler2.c:163: Signature data: albumSgt. Pepper's Lonely Hearts Club Band (Deluxe Edition)$API_KEYartistThe Beatlesduration122methodtrack.scrobbleskdVSvIFyqXhse0mR6-lq8CZ97IV-pGjc4timestamp1553010388trackSgt. Pepper's Lonely Hearts Club BandtrackNumber1
DEBUG libscrobbler2.c:198: Params: album=Sgt.%20Pepper%27s%20Lonely%20Hearts%20Club%20Band%20%28Deluxe%20Edition%29&api_key=$API_KEY&artist=The%20Beatles&duration=122&method=track.scrobble&sk=dVSvIFyqXhse0mR6-lq8CZ97IV-pGjc4&timestamp=1553010388&track=Sgt.%20Pepper%27s%20Lonely%20Hearts%20Club%20Band&trackNumber=1&api_sig=$API_SIG
[proxychains] Strict chain  ...  127.0.0.1:9050  ...  ws.audioscrobbler.com:443  ...  OK
DEBUG libscrobbler2.c:57: Read: size: 508, body: <?xml version="1.0" encoding="UTF-8"?>
<lfm status="ok">
  <scrobbles ignored="0" accepted="1">
    <scrobble>
      <track corrected="0">Sgt. Pepper&apos;s Lonely Hearts Club Band</track>
      <artist corrected="0">The Beatles</artist>
      <album corrected="0">Sgt. Pepper&apos;s Lonely Hearts Club Band (Deluxe Edition)</album>
      <albumArtist corrected="0"></albumArtist>
      <timestamp>1553010388</timestamp>
      <ignoredMessage code="0"></ignoredMessage>
    </scrobble>
  </scrobbles>
</lfm>

DEBUG libscrobbler2.c:114: Check: status: 0, body: <?xml version="1.0" encoding="UTF-8"?>
<lfm status="ok">
  <scrobbles ignored="0" accepted="1">
    <scrobble>
      <track corrected="0">Sgt. Pepper&apos;s Lonely Hearts Club Band</track>
      <artist corrected="0">The Beatles</artist>
      <album corrected="0">Sgt. Pepper&apos;s Lonely Hearts Club Band (Deluxe Edition)</album>
      <albumArtist corrected="0"></albumArtist>
      <timestamp>1553010388</timestamp>
      <ignoredMessage code="0"></ignoredMessage>
    </scrobble>
  </scrobbles>
</lfm>

DEBUG libscrobbler2.c:255: Scrobble status: 0
DEBUG cache.c:192: Record size: 124
DEBUG cache.c:234: Cache: The Beatles - Sgt. Pepper's Lonely Hearts Club Band (Deluxe Edition) ((null)) - 2. With A Little Help From My Friends (165s)
DEBUG libscrobbler2.c:232: Scrobble: 1553010511
DEBUG libscrobbler2.c:235: Payload: The Beatles - Sgt. Pepper's Lonely Hearts Club Band (Deluxe Edition) ((null)) - 2. With A Little Help From My Friends (165s)
DEBUG libscrobbler2.c:163: Signature data: albumSgt. Pepper's Lonely Hearts Club Band (Deluxe Edition)$API_KEYartistThe Beatlesduration165methodtrack.scrobbleskdVSvIFyqXhse0mR6-lq8CZ97IV-pGjc4timestamp1553010511trackWith A Little Help From My FriendstrackNumber2
DEBUG libscrobbler2.c:198: Params: album=Sgt.%20Pepper%27s%20Lonely%20Hearts%20Club%20Band%20%28Deluxe%20Edition%29&api_key=67082e45dab1f6433da72a00e3bc037a&artist=The%20Beatles&duration=165&method=track.scrobble&sk=dVSvIFyqXhse0mR6-lq8CZ97IV-pGjc4&timestamp=1553010511&track=With%20A%20Little%20Help%20From%20My%20Friends&trackNumber=2&api_sig=$API_SIG
[proxychains] Strict chain  ...  127.0.0.1:9050  ...  ws.audioscrobbler.com:443  ...  OK
DEBUG libscrobbler2.c:57: Read: size: 500, body: <?xml version="1.0" encoding="UTF-8"?>
<lfm status="ok">
  <scrobbles ignored="0" accepted="1">
    <scrobble>
      <track corrected="0">With A Little Help From My Friends</track>
      <artist corrected="0">The Beatles</artist>
      <album corrected="0">Sgt. Pepper&apos;s Lonely Hearts Club Band (Deluxe Edition)</album>
      <albumArtist corrected="0"></albumArtist>
      <timestamp>1553010511</timestamp>
      <ignoredMessage code="0"></ignoredMessage>
    </scrobble>
  </scrobbles>
</lfm>

DEBUG libscrobbler2.c:114: Check: status: 0, body: <?xml version="1.0" encoding="UTF-8"?>
<lfm status="ok">
  <scrobbles ignored="0" accepted="1">
    <scrobble>
      <track corrected="0">With A Little Help From My Friends</track>
      <artist corrected="0">The Beatles</artist>
      <album corrected="0">Sgt. Pepper&apos;s Lonely Hearts Club Band (Deluxe Edition)</album>
      <albumArtist corrected="0"></albumArtist>
      <timestamp>1553010511</timestamp>
      <ignoredMessage code="0"></ignoredMessage>
    </scrobble>
  </scrobbles>
</lfm>

DEBUG libscrobbler2.c:255: Scrobble status: 0
DEBUG cache.c:192: Record size: 127
DEBUG cache.c:234: Cache: The Beatles - Sgt. Pepper's Lonely Hearts Club Band (Deluxe Edition) ((null)) - 1. Sgt. Pepper's Lonely Hearts Club Band (122s)
DEBUG libscrobbler2.c:232: Scrobble: 1553011031
DEBUG libscrobbler2.c:235: Payload: The Beatles - Sgt. Pepper's Lonely Hearts Club Band (Deluxe Edition) ((null)) - 1. Sgt. Pepper's Lonely Hearts Club Band (122s)
DEBUG libscrobbler2.c:163: Signature data: albumSgt. Pepper's Lonely Hearts Club Band (Deluxe Edition)$API_KEYartistThe Beatlesduration122methodtrack.scrobbleskdVSvIFyqXhse0mR6-lq8CZ97IV-pGjc4timestamp1553011031trackSgt. Pepper's Lonely Hearts Club BandtrackNumber1
DEBUG libscrobbler2.c:198: Params: album=Sgt.%20Pepper%27s%20Lonely%20Hearts%20Club%20Band%20%28Deluxe%20Edition%29&api_key=67082e45dab1f6433da72a00e3bc037a&artist=The%20Beatles&duration=122&method=track.scrobble&sk=dVSvIFyqXhse0mR6-lq8CZ97IV-pGjc4&timestamp=1553011031&track=Sgt.%20Pepper%27s%20Lonely%20Hearts%20Club%20Band&trackNumber=1&api_sig=$API_SIG
[proxychains] Strict chain  ...  127.0.0.1:9050  ...  ws.audioscrobbler.com:443  ...  OK
DEBUG libscrobbler2.c:57: Read: size: 508, body: <?xml version="1.0" encoding="UTF-8"?>
<lfm status="ok">
  <scrobbles ignored="0" accepted="1">
    <scrobble>
      <track corrected="0">Sgt. Pepper&apos;s Lonely Hearts Club Band</track>
      <artist corrected="0">The Beatles</artist>
      <album corrected="0">Sgt. Pepper&apos;s Lonely Hearts Club Band (Deluxe Edition)</album>
      <albumArtist corrected="0"></albumArtist>
      <timestamp>1553011031</timestamp>
      <ignoredMessage code="0"></ignoredMessage>
    </scrobble>
  </scrobbles>
</lfm>

DEBUG libscrobbler2.c:114: Check: status: 0, body: <?xml version="1.0" encoding="UTF-8"?>
<lfm status="ok">
  <scrobbles ignored="0" accepted="1">
    <scrobble>
      <track corrected="0">Sgt. Pepper&apos;s Lonely Hearts Club Band</track>
      <artist corrected="0">The Beatles</artist>
      <album corrected="0">Sgt. Pepper&apos;s Lonely Hearts Club Band (Deluxe Edition)</album>
      <albumArtist corrected="0"></albumArtist>
      <timestamp>1553011031</timestamp>
      <ignoredMessage code="0"></ignoredMessage>
    </scrobble>
  </scrobbles>
</lfm>

DEBUG libscrobbler2.c:255: Scrobble status: 0
^CDEBUG server.c:302: Stopping server