Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Alternative eject method for Synology devices #215

Open
find0x90 opened this issue Aug 13, 2024 · 1 comment
Open

[Feature request] Alternative eject method for Synology devices #215

find0x90 opened this issue Aug 13, 2024 · 1 comment

Comments

@find0x90
Copy link

Idea

I'm experiencing the same problem described in this issue: #84

That account has been deleted so I filed a new issue to suggest a workaround.

While searching around online for a solution, I found this page which describes how to send raw SCSI commands (including eject): https://github.com/hreinecke/sg3_utils/blob/master/doc/sg_raw.8#L218

The sg_raw utility is available in this package: https://pkgs.alpinelinux.org/package/edge/community/x86/sg3_utils

I tried this out in the container:

$ sudo docker exec -it makemkv sh
/tmp # apk add sg3_utils
/tmp # sg_raw /dev/sg6 1b 00 00 00 02 00

And it successfully opened the tray of the WH16NS60 drive connected to my Synology.

Would it be possible to add this as an alternative eject method behind an SG_RAW_EJECT environment variable or something? That would minimize the risk to other users while allowing the AUTO_DISC_RIPPER_EJECT to function properly on Synology devices.

I'm a little bit new to Docker but I'd be happy to try to implement this if you'd prefer a PR.

@find0x90
Copy link
Author

I tried this Dockerfile and it works as expected on my Synology:

FROM jlesage/makemkv

RUN apk add sg3_utils
RUN sed -i 's/eject "$DRV_DEV"/sg_raw "$DRV_DEV" 1b 00 00 00 02 00/' /opt/makemkv/bin/autodiscripper

Built with: sudo docker build -t custom-makemkv:latest .

Run with image: custom-makemkv:latest in my usual docker-compose.yml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant