The site will be out of service again for further upgrades regarding security fixes. Work will be carried out between 4.30am and 5.30am tomorrow morning. We apologise for the inconvenience.

silkie

SkrobbleDs on Linux (CentOS)

Recommended Posts

Posted (edited)

Despite being circa 10 years behind the times I've forged a love for last.fm.

The last thing in my migration from a moodeaudio.org enabled Pi to a bit of Linn DS action is hooking up my last.fm account.

I found this... https://oss.linn.co.uk/trac/wiki/SkrobbleDs saucy! Rackfather's got us covered again!

However not being a programmer has me nobbled. I'm not scared of a bit of "IT" but I can't get this bastard running and the instructions remind me of IBM's from the 90's.

Quote

Linux / Mac

  • Ensure Python at version 2.5 or newer is installed
    • Open terminal window
    • Type python
    • The version of python will be reported
  • Extract supplied zip file to a suitable location
  • Add startup script if auto-start is required
  • Ensure python is added to firewall exceptions

So I have Python installed...

[root@minimserver SkrobbleDs_2]# python --version
Python 2.7.5

Files in place... I've even set the .py files to executable.

[root@minimserver SkrobbleDs_2]# ls -ltra
total 68
drwxr-xr-x.  5 root root 4096 Dec  9  2012 cherrypy
-rwxr-xr-x.  1 root root   87 Mar  6  2013 setup.py
-rwxr-xr-x.  1 root root 6430 Mar  6  2013 Settings.py
-rwxr-xr-x.  1 root root 9169 Mar  6  2013 Player.py
-rw-r--r--.  1 root root 1562 Mar  6  2013 Licence.txt
-rwxr-xr-x.  1 root root 4209 Mar  6  2013 LastFm.py
-rwxr-xr-x.  1 root root 5684 Oct 25  2013 Scrobbler.py
drwxr-xr-x.  2 root root  182 Oct 26  2013 Upnp
-rwxr-xr-x.  1 root root  821 Apr 18  2014 Logger.py
-rwxr-xr-x.  1 root root 3415 Aug 22  2016 SkrobbleDs.py
-rwxr-xr-x.  1 root root 7426 Aug 22  2016 WebUi.py
dr-xr-x---. 20 root root 4096 Apr 20 08:12 ..
drwxr-xr-x.  4 root root  196 Apr 20 08:15 .

The instructions don't share which script actually runs this bad boy so I took a stab at SkrobbleDs.py. No dice... :(

./SkrobbleDs.py
./SkrobbleDs.py: line 6: $'ScrobbleDs.py - LastFm scrobbler from Linn DS players\r\n\r\nCopyright (c) Rockfather 2016, All Rights Reserved\r\nSee the licence.txt file provided with this software\r\nfor full terms and conditions of use\r\n\r': command not found
./SkrobbleDs.py: line 7: import: command not found
./SkrobbleDs.py: line 8: import: command not found
./SkrobbleDs.py: line 9: import: command not found
./SkrobbleDs.py: line 10: import: command not found
./SkrobbleDs.py: line 11: import: command not found
./SkrobbleDs.py: line 12: import: command not found
./SkrobbleDs.py: line 13: import: command not found
./SkrobbleDs.py: line 14: syntax error near unexpected token `('
'/SkrobbleDs.py: line 14: `script_path = os.path.abspath(os.path.dirname(sys.argv[0]))

Computer said no!

Someone must have been here before me? These things are always errors found in the module between the keyboard and the chair.

Edited by silkie
Sausage fingers

Share this post


Link to post
Share on other sites

I've long wanted a scrobbler for the DS as well, but hadn't come across this.  It is very old and hasn't been touched for a long time.

Running:

python2 SkrobbleDS.py

on OpenSUSE 15 I get:

Traceback (most recent call last):
  File "SkrobbleDs.py", line 95, in <module>
    s = SkrobbleDs()
  File "SkrobbleDs.py", line 39, in __init__
    self.discovery1.Start( gDevType1 )
  File "/home/everard/Software/Binaries/SkrobbleDs_2/Upnp/Discovery.py", line 70, in Start
    self.iSsdpServer = Ssdp.SsdpServer( self.iIfAddr )
  File "/home/everard/Software/Binaries/SkrobbleDs_2/Upnp/Ssdp.py", line 41, in __init__
    self.iIfAddr = socket.gethostbyname( socket.gethostname() )
socket.gaierror: [Errno -2] Name or service not known

So it does try and run, but fails to set up the socket for the server by the looks of it.

I'd need it running on my QNAP NAS rather than my PC. There is a package, but it needs python 2.7, which doesn't seem to be available for my NAS, the app store only has v3 and it won't install with v3.

Given the age of this (last updated 8 years ago) I think we would really need someone to know what they are doing to get it to go and I don't think it would be very stable. Apart from anything else I'm pretty sure LastFM has altered their API since then, so it almost certainly wouldn't scrobble even if we could get it running.

Share this post


Link to post
Share on other sites
Posted (edited)

hahaha... it was so simple! It's a lack of python knowledge here. When scripting in my world we set the interpreter at the start of the script. Simply issuing...

python ./Scrobbler.py

...got it running.

 ps -ef | grep -i skr
root      43488  43028  0 08:38 pts/2    00:00:00 vi SkrobbleDs.py
root      45177   2909  0 11:29 pts/1    00:00:00 grep --color=auto -i skr

Also reading the scrobbler.py file looks like some tweaks have happened recently, I suspect this will work.

cat SkrobbleDs.py
"""ScrobbleDs.py - LastFm scrobbler from Linn DS players

Copyright (c) Rockfather 2016, All Rights Reserved
See the licence.txt file provided with this software
for full terms and conditions of use

I need to tweak my firewall to get this fully sorted and don't have time right now. Should get it sorted this evening.

Scrobbletastic!

Edited by silkie

Share this post


Link to post
Share on other sites
1 hour ago, silkie said:

hahaha... it was so simple! It's a lack of python knowledge here. When scripting in my world we set the interpreter at the start of the script. Simply issuing...


python ./Scrobbler.py

...got it running.


 ps -ef | grep -i skr
root      43488  43028  0 08:38 pts/2    00:00:00 vi SkrobbleDs.py
root      45177   2909  0 11:29 pts/1    00:00:00 grep --color=auto -i skr

Also reading the scrobbler.py file looks like some tweaks have happened recently, I suspect this will work.


cat SkrobbleDs.py
"""ScrobbleDs.py - LastFm scrobbler from Linn DS players

Copyright (c) Rockfather 2016, All Rights Reserved
See the licence.txt file provided with this software
for full terms and conditions of use

I need to tweak my firewall to get this fully sorted and don't have time right now. Should get it sorted this evening.

Scrobbletastic!

In my world we set the interpreter at the beginning of the script as well. My guess was that the path would be pointing into a wrong direction, not that it would've been absent.

The ps command doesn't show its running btw, it shows that you were using vi in one terminal, and that you grepped for skr in another.

ps -ef | grep -i skr | grep -v grep

Share this post


Link to post
Share on other sites

hahaha your dead right, I have another terminal reading the script in vi. who knows how this'll pan out then :)

Share this post


Link to post
Share on other sites

Works fine and dandy, execution command was...

python2.7 SkrobbleDs.py

Proof of scrobbling...

ascrobble.jpg.1af3ae1b81d21338db2b65b271d640f7.jpg

SkrobbleDs WebGUI...

skrobbleds.thumb.jpg.574d015e24b1d060d1babceefda3555c.jpg

Rockfather doth indeed rock, and rock he doth hard!

\m/,

Share this post


Link to post
Share on other sites
13 hours ago, Solanum said:

I'd need it running on my QNAP NAS rather than my PC.

I have it running on my QNAP. Cant remember how I got it going though! :$

Dave

Share this post


Link to post
Share on other sites
2 hours ago, Moomintroll said:

There’s a QKPG download link on the Linn OSS page linked to above.

’troll

It needs Python 2.7, which isn't available for the current QNAP OS. You can get an x86 version for NASs with an intel CPU, but there is no version available for the ones with an ARM CPU (ie mine), which are Python 3 only and the Linn app doesn't install with Python 3.

Share this post


Link to post
Share on other sites
Posted (edited)

@Solanum : While it's ideal to have the Scrobbler sat on the same tin as your disks (Music files) you are able to run the scrobbler on any machine on the same network. My solution is nasty but ultimately free, excluding hardware of course! I have a VM (VirtualBox) running CentOS that runs MinimServer, it's transcoder and now SkrobbleDS serving my Music files (over NFS) sat on another piece of tin that's my home-brew FreeBSD NAS, 12TB ZRAID6. I've had this for many years, way before SOHO NAS offerings like QNAP and Synology existed, which ultimately in my eyes limit flexibility. So, in short are you able to run a Linux VM/Jail/Docker etc etc on the QNAP thingy?

In fact a quick google came up with this... https://www.qnap.com/solution/container_station/en/ :)

Edited by silkie

Share this post


Link to post
Share on other sites
5 hours ago, Solanum said:

It needs Python 2.7, which isn't available for the current QNAP OS. You can get an x86 version for NASs with an intel CPU, but there is no version available for the ones with an ARM CPU (ie mine), which are Python 3 only and the Linn app doesn't install with Python 3.

Ah that explains why I got it working. Mine is an Intel based QNAP so has Python 2.7

Dave

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.