DrKain / subclean

A cross-platform CLI tool and node module to remove advertising from subtitles. Supports Bazarr and bulk cleaning!
MIT License
54 stars 5 forks source link

[Bug] Permission issues #31

Closed steve1977 closed 1 year ago

steve1977 commented 1 year ago

I am quite sure this is not a bug, but an issue on my end. Don't know any better place to ask this question, so hope this is ok if I do so here.

I am using bazarr and added post-processing. I am getting permission errors when the script gets executed. No clue why and thought I said the permissions in the right way. Any idea?

-rw-rw-rw- 1 nobody users 74349566 Jul 31 22:12 subclean

DrKain commented 1 year ago

This is out of scope as this is an issue with your file permissions, not subclean. There's not a lot of input I can give but here are some resources you might find useful:
https://en.wikipedia.org/wiki/Chmod?useskin=vector
https://en.wikipedia.org/wiki/Chgrp?useskin=vector https://serverfault.com/questions/970699/how-to-troubleshoot-permission-denied-errors-while-accessing-files-in-linux?rq=1

steve1977 commented 1 year ago

Thanks for helping. I will work through the links you kindly shared.

Another off-topic question, possible to run subclean on all existing subtitles (based on bazarr library)? Or better to delete all and start fresh?

DrKain commented 1 year ago

Yes, 1.3.0+ added bulk cleaning using the --sweep parameter :) https://github.com/DrKain/subclean/wiki/Bulk-Cleaning

steve1977 commented 1 year ago

Thanks for your kind message. Let me figure this out.

I fixed my permission issue (thanks!), but now getting a new error in bazarr:

BAZARR Post-processing result for file /movies/[folder]/[movie].mkv : /bin/sh: /config/scripts/subclean: not found

DrKain commented 1 year ago

It seems Bazarr is unable to locate the binary, is the directory in the $PATH environment variable?

DrKain commented 1 year ago

As mentioned in the wiki, /usr/local/bin or /usr/bin are quick and easy places to drop binaries, as long as the permissions are correct they should be usable by Bazarr.

steve1977 commented 1 year ago

Ah... I copied it into the container folder. Let me try to figure this out.

steve1977 commented 1 year ago

I used the correct path mapping, so it should work. I can manually run it from the docker console. Weird...

steve1977 commented 1 year ago

This is really odd. I can use putty to access and can manually run subclean. However, when I use the docker console, it does not work and I get the following error message: bash: /config/scripts/subclean: cannot execute: required file not found

I tried to copy instead into /usr/local/bin, but same issue.

It seems there is some dependency missing in bazarr container?

DrKain commented 1 year ago

Unfortunately I do not use Docker so there's not much input I can give here

steve1977 commented 1 year ago

Got it. If that’s the case, there’s a fair chance that it just doesn’t work as some dependency may be missing. I think you said the bazarr folks are not as supportive of the script? Maybe i’ll try the hotio docker or ping hotio.

DrKain commented 1 year ago

I think you said the bazarr folks are not as supportive of the script?

To a point. I agree that VIP is a great price but it is not the only provider out there. Either way it might be worth asking about your issue in the Discord, I'm sure they would be able to help you out. https://github.com/DrKain/subclean/wiki/Bazarr#note

steve1977 commented 1 year ago

Agree. They seem to have increased from 10 to 20, plus all fees it’s basically 25 per annum. But of course you’re right that it’s still very reasonable for what seems to be a good service. I’ll make sure to give vip a try.

But as you say, i plan to use several services and some of my legacy subtitles may have ads. So, i still think your script is quite excellent and something to run on top even after paying for vip.