Roon Extension: CD Ripper v0.6.1 (2022-12-24)

Hopefully you don’t mind if I step in for a moment. I want to help (I have a Synology DS713+)!

The path to docker.sock in DSM is correct. But in the Synology Docker package it is -probably for security reasons- not possible to set mount points to the root of DSM (eg /var/run/docker.sock). To make a root mount you have to install the Extension Manager manually in DSM commandline via SSH/Telnet.

I do not know if this make sense, but I found this statement on Synology’s website.

1 Like

Highly appreciated @Alfred_van_Hoorn.

@John_Warden, you might try the SSH route and using the full command line from the Docker Hub page, but the statement about optical drives probably makes the CD Ripper on Synology a no-go.

@Jan_Koudijs and @John_Warden, for your information. I think I used the following command in SSH on the command-line to create and running the Extension Manager container:

sudo docker run -d --network host --restart unless-stopped --name roon-extension-manager -v roon-extensions:/root/.RoonExtensions/lib -v /var/run/docker.sock:/var/run/docker.sock -e “TZ=Europe/Amsterdam” theappgineer/roon-extension-manager:latest

Thanks @Jan_Koudijs and @Alfred_van_Hoorn. I’d pretty much reached the conclusion that configuring the container through the Docker GUI isn’t possible because the files and folders exposed in the GUI through File Manager are very restricted and don’t allow access to /var (which I presume is a top level folder immediately under root).

However, if I can work out how to get to a command line to run the docker installation, I may still have a go. My thinking is that Synology’s DSM may not support a connection to an external drive, but then neither does DSM support accessing /var, but we know it can be done (Extension Manager running on Synology)

But first I’ll have to work out how to SSH to the server. I guess using PowerShell from my Windows 10 PC is an option … Any pointers welcome

Thanks for the command line instruction @Alfred_van_Hoorn. Got the Extension Manager running, installed the CD Ripper, and then sadly, just as we feared:

Now that you have found the command line, there are 2 final things you could check. If you connect a USB optical drive to the NAS and enter the dmesg command do you see any USB related messages at the end of the output?

For my optical drive the output is:

[  549.658969] usb 1-2: new high-speed USB device number 3 using xhci_hcd
[  549.935668] usb 1-2: New USB device found, idVendor=093b, idProduct=0048, bcdDevice= 4.35
[  549.935675] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  549.935679] usb 1-2: Product: DVDR   PX-755A  
[  549.935683] usb 1-2: Manufacturer: PLEXTOR         
[  550.463094] usb-storage 1-2:1.0: USB Mass Storage device detected
[  550.463537] scsi host3: usb-storage 1-2:1.0
[  550.463594] usbcore: registered new interface driver usb-storage
[  551.469965] scsi 3:0:0:0: CD-ROM            PLEXTOR  DVDR   PX-755A   1.06 PQ: 0 ANSI: 0
[  551.475036] sr 3:0:0:0: Power-on or device reset occurred
[  551.479694] sr 3:0:0:0: [sr1] scsi3-mmc drive: 40x/40x writer cd/rw xa/form2 cdda tray
[  551.497933] sr 3:0:0:0: Attached scsi CD-ROM sr1

The interesting part is the sr1 device, which brings us to the second check. Any output on a ls -l /dev/sr* command or just a “No such file or directory” message?

brw-rw----+ 1 root cdrom 11, 0 jul 30 17:01 /dev/sr0
brw-rw----+ 1 root cdrom 11, 1 jul 30 17:10 /dev/sr1
1 Like

I’ve tried those commands. Sifting through the masses of output relating to the first, I’ve picked out some lines which may (or may not) be relevant (and I may have deleted something interesting of course). The USB drive is detected but no sr device is set up. Do you think something can be done?

John@FFDSVR:~$ dmesg

[ 73.365314] usb usb2: We don’t know the algorithms for LPM for this host, disabling LPM.

[ 151.748948] usb-storage 1-4:1.0: USB Mass Storage device detected
[ 151.756398] scsi host4: usb-storage 1-4:1.0
[ 151.762571] usbcore: registered new interface driver usb-storage
[ 151.803592] iSCSI:target_core_file.c:146:fd_attach_hba RODSP plugin for fileio is enabled.
[ 151.815611] usbcore: registered new interface driver usblp
[ 151.822203] iSCSI:target_core_file.c:153:fd_attach_hba ODX Token Manager is enabled.
[ 151.834659] iSCSI:target_core_multi_file.c:91:fd_attach_hba RODSP plugin for multifile is enabled.
[ 151.849521] iSCSI:target_core_ep.c:786:ep_attach_hba RODSP plugin for epio is enabled.
[ 151.866587] iSCSI:target_core_ep.c:793:ep_attach_hba ODX Token Manager is enabled.
[ 151.929087] usbcore: registered new interface driver usbhid
[ 151.938611] usbhid: USB HID core driver
[ 152.785948] scsi 4:0:0:0: Direct-Access Synology DiskStation DL17 PQ: 0 ANSI: 6
[ 152.814009] sd 4:0:0:0: Attached scsi generic sg4 type 0
[ 152.820286] sd 4:0:0:0: [synoboot] 245760 512-byte logical blocks: (126 MB/120 MiB)
[ 152.838948] sd 4:0:0:0: [synoboot] Write Protect is off
[ 152.861953] sd 4:0:0:0: [synoboot] Mode Sense: 23 00 00 00
[ 152.863951] sd 4:0:0:0: [synoboot] No Caching mode page found
[ 152.898187] sd 4:0:0:0: [synoboot] Assuming drive cache: write through
[ 152.955667] GPT:Primary header thinks Alt. header is not at the end of the disk.
[ 152.988122] GPT:239649 != 245759
[ 153.010083] GPT:Alternate GPT header not at the end of the disk.
[ 153.044374] GPT:239649 != 245759
[ 153.053434] GPT: Use GNU Parted to correct GPT errors.
[ 153.068954] synoboot: synoboot1 synoboot2
[ 153.081967] sd 4:0:0:0: [synoboot] Attached SCSI disk

[987670.928364] usb 1-1: new high-speed USB device number 4 using xhci_hcd
[987671.073051] usb-storage 1-1:1.0: USB Mass Storage device detected
[987671.081570] scsi host5: usb-storage 1-1:1.0
[987672.099018] scsi 5:0:0:0: CD-ROM TSSTcorp BDDVDW SE-506AB TS01 PQ: 0 ANSI: 0
[987672.109186] scsi 5:0:0:0: Attached scsi generic sg5 type 5

And no sr device in evidence

John@FFDSVR:~$ ls -l /dev/sr*
ls: cannot access /dev/sr*: No such file or directory

Looks like this is the part we are interested in. You attached a Samsung or Toshiba drive, right?

It is recognized as a “scsi generic” device, while in my setup the drive was detected as a “scsi CD-ROM” device. I think that some drivers required for USB CD-ROM are not in, which matches with the statement that optical drives are not supported.

If you don’t have a generic Linux system but still would like to use the CD Ripper then a Raspberry Pi with DietPi is probably your best bet.

1 Like

Thanks @Jan_Koudijs. We’ve given it a good shot but looks like I’ll have to find another approach. Many thanks for your help with this

I found that my Samsung drive has an “AV Connectivity” mode which when you activate it seems to change things. Might this be helpful?

[1090389.548222] usb-storage 1-1:1.0: USB Mass Storage device detected
[1090389.557786] scsi host6: usb-storage 1-1:1.0
[1090390.568715] scsi 6:0:0:0: Direct-Access TSSTcorp BDDVDW SE-506AB TS01 PQ: 0 ANSI: 0
[1090390.580675] sd 6:0:0:0: Attached scsi generic sg5 type 0
[1090390.588753] sd 6:0:0:0: [sdq] 283297 2048-byte logical blocks: (580 MB/553 MiB)
[1090390.599093] sd 6:0:0:0: [sdq] Write Protect is on
[1090390.605385] sd 6:0:0:0: [sdq] Mode Sense: 00 03 00 80
[1090390.606582] sd 6:0:0:0: [sdq] No Caching mode page found
[1090390.613953] sd 6:0:0:0: [sdq] Assuming drive cache: write through
[1090390.628960] sdq:
[1090390.635326] sd 6:0:0:0: [sdq] Attached SCSI removable disk
John@FFDSVR:~$ ls -l /dev/sdq
brw------- 1 root root 65, 0 Jul 31 11:51 /dev/sdq

I don’t know, you can give it a try. For this you uninstall the ripper and then install it again, but in the Extension Manager you first open the Docker Install Options group end enter /dev/sdq for the Optical Drive Path.

I noticed that the generic SCSI device that you had initially (/dev/sg5 in your case) works for me for the CD Player extension but unfortunately not for the CD Ripper.

I tried - it didn’t work. I then reverted the drive to the normal “Optical Disk Drive” mode and tried /dev/sg5 as well. That didn’t work either. That really must be the end of the road. Thanks again

1 Like

Hello @Jan_Koudijs , Thanks for another great extension. Just starting to use it.
I’m trying to rip a multi disc cd, but I do not see the options like in the video.
Am I missing something?
If I rip the first disc, then I can see it at Manage Staging Area - select album.
Then If I select it, I see the songs of the first disc and I have the options Push and Remove.
Then I insert the second CD and after the Rip completes, I can select the album again, and I see the songs of the second disc.
I do not see any options like in your video, I also only have just 1 time the title of the disc, so I don’t see how I can select the “Convert to Multi Disk” option. Looks like ripping the second disc overwrites the first.

Do the 2 CDs have the exact same name, meaning that there is no disk 1, disk 2 kind of differentiation?

Which album is it you try to rip?

Thanks for reacting, Fortunately I’ve been able to rip it now. It is an Amnesty compilation ‘Chimes of Freedom - The Songs of Bob Dylan’ (Various Artists)

After ripping another completely different cd, I had 2 albums to select in the Staging Area menu: Chimes of Freedom and the other disk, Selecting Chimes of Freedom still gave me the songs of disc 2.
But now I did have the “Convert to Multi Disk” option.
Also now I could see the complete title if I select the “Convert to Multi Disk” option and then I can see it did ends with disc 2 of 4. (Couldn’t see the end of the title before.)
So I didn’t select it, since I needed to start with disc number 1.
I’ve tried to re-rip number 1, but it failed, because it was already staged. I’ve deleted disc 2. Then Chimes of Freedom wasn’t selectable anymore.
Next I’ve tried to re-rip disc 1 again, but still the message that it was already staged, but I couldn’t see it anymore.
Then I’ve entered the bash of the docker and located disc1 and removed it.
Next attempt to rip disc1 succeeded.
Now I had to albums to select in the staging area again. Chimes of Freedom and the other cd.
Now I could select Chimes of Freedom, and select the “Convert to Multi Disk” option. Now I renamed this by removing the disc 1 of 4 part.
And then I could rip disc 2, and add it, and similar for disc 3 and 4.

I hope you can make some sense out of this.

Anyway, I’ve also started to doubt if my setup is completely correct.
I hope it won’t get to much off topic in the next part, but I get back to CD ripper.
I started with a first extension (apple tv remote) during summer when my core was still on my Synology. Last Friday I’ve moved my core to a Rock.
And now I’ve also started with the Queue bot extension and for this I installed the Extension Manager in Docker on the Synology. Reading and watching along I also found this CD ripper and read it wouldn’t work with Synology, so I’ve taken a RPi3B and installed DietPi and the extension manager again and now with the CD ripper.
Initially CD Ripper installation failed, but it turned out my 2 GB sd card was to small. Retried with an 8GB, had some auto install issues, but after some reboot I did see docker and extension manager get installed, so I happily continued, and from Roon I installed the CD Ripper and started to rip some discs.

But I do see something else missing, I do not find the “Auto Rip” option in Global Settings.
I will try to re-install the Pi to make sure it will go all smooth, and nothing is missed there, but if something is I wouldn’t expect I would get ripping at all, correct?
Is it good/supported to run two extension managers in parallel, one on the Synology and one on the Pi, or could this cause the issues I see?(idea is that the NAS is on 24/7, and the Pi only when I rip a disc.)

update… after reading forth and back some more, I guess I’ve missed the udev part to get the Auto Rip going. Will try that tomorrow. Thanks anyway.

Indeed, the dev part solves the ‘Auto Rip’ being not available.

Thanks for sharing your experiences, there is clearly room for improvement.

For the “Convert to Multi Disk” option to appear there have to be at least 2 disks in the staging area, probably only because of my workflow in which I rip all disks first, then do the conversion and then push.

In the Staging Area dropdown there is only a limited number of characters available, which often causes that 2 entries appear with the same name for multi disk rips, but if you select one you should see the full name.

I don’t know what can cause that disk 1 gets overwritten by the rip of disk 2. To analyze this it would be helpful if you can restart the CD Ripper with logging, via the Extension Manager, and then re-rip disk 1 and 2 of the album and get the log via the Extension Manager link in the Extensions overview in Roon. Also a screenshot of what the Staging Area dropdown looks like might be helpful. If you can share a link and image in this thread then I will have a look.

Hi Jan,

Thanks for having a look.
Here are the screenshots:
After ripping CD1 of Chimes of Freedom:

As you see, no disc number mentioned and the first song is “One Too Many Morngings”

No options to create a multi disc yet or change the name…

And then I rip the second disc:

Still just one album name to select:

But now the first song is the one of the second disc: “Outlaw Blues”

Still no option to change disc name or something:

So this is why I was confused regarding the multi-disc funcitonaliyt last week.
But I guess, I had also just bad luck with the first box I picked being a tricky one.
It was just on top in a drawer full of CD’s that I want to rip and then store far away since I hardly touch the cd’s anymore, so why should they still use space in my living?

I do realise that I’ve enabled logging, but I’m wondering how I can attach it to share it with you. It’s to big to past in… any idea?

Thanks in advance

Ripping 2 CDs with the same name is something the current implementation can’t cope with. I’m working on an update of the CD Ripper in which a single ripped CD can already be converted to multi-disk, so that will be a workaround for your use case. There will be other changes as well, all meant to make it a more usable and robust solution.

What the ripper needs is that it gets fed with as many different CDs as possible to get edge cases like this covered. If you discover more troublesome rips, please let me know.

I send you a PM with an e-mail address to which you can send the log file.

CD Ripper v0.5.0 is now available

This release has some improvements and bug fixes:

  • Added forced rip, to rip CDs for which no metadata is available
  • Improved progress reporting during rip
  • Improved administration of the staging area to avoid mismatches causing “already ripped” messages
  • Allow multi-disk conversion even if there is only one rip in staging area
  • Fixed bug that caused truncating of album titles

@Geert_van_den_Belt, thanks for your feedback! This release is a direct result of it.

How to install / update

If the Extension Manager has auto update enabled then the changes will be pulled in the next time the update is performed. It is also possible to update manually via the Settings dialog, select the CD Ripper from the Tools category and perform the update action.