-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
SABnzbd support #35
Comments
Would very much appreciate it if you could make the Subliminal subtitle script built for NZBGet compatible with SABnzbd. Thanks much in advance. |
Sure, the only issue i can see is the configuration side of things. Subliminal has many, many, many options. SABnzbd users might have to manage a config file for this to work... i could generate one with default values if one isn't present. Alternatively, i don't know how far you're planning to go with the development of post-process scripting. Were you considering adding ability to dynamically define configuration entries depending on what the script is (kind of like NZBGet does in within comments at the top)? I noticed SABnzbd (from the wiki link) is also using environment variables now. That's cool! I could almost add you as a supported script type in pynzbget as another supported post processing type. A meet in the middle approach might be to allow users to enter a key/value pair (and add them per script as environment variables). So for example... Lets say someone defines a 'language' as a key and 'fr,en' as it's value. Well that would generate an environment variable like SAB_CONFIG_SUBLIMINAL_LANGUAGE=fr,en. Where SAB_CONFIG is just fixed, SUBLIMINAL is the capitalized script name and LANGUAGE was the capitalized key that was defined. The value would be set as is. Anyway... I'm okay with the configuration file approach too. I just wanted to bounce more ideas off of you. What are your thoughts? |
SABnzbd users that use Notification Scripts should not be complete noobs 🤣 And maybe a rename from Completely off topic, but how did you get your donation page to look so nice on PayPal? Ours look 100 years old and I can't find where to change it. Can also email me about that 👍 |
Thank you so kindly for the donation! 😄 I sent you an email about PayPal. As per Subliminal, I'll play a bit around with a wrapper this weekend. Renaming the tool won't be a problem. With regards to the post-processing part of SABnzbd: If i send content straight to stdout, will that get picked up in your logs? Or should i be managing my own log file as well? It will be important to me for debugging issues when/if they should arise with your followers. |
We indeed capture the whole |
The last push doesn't work yet, I'm getting closer though! Do you know if there an easy way to just re-post process my script from within SABnzbd without having to re-download something each time? I'm trying to grasp what the environment variables all are and examples of what they might be set to (such as SAB_PP_STATUS). Some answers are on your wiki I realize, but not all. Although, I suppose I could just grep through the SABnzbd code and see for myself... Anyway, I'll see where I get too tomorrow. 😉 |
There's no easy way to execute it, only to download a tiny NZB. |
Okay... it's working for me; but it doesn't mean it will necessary work for you 😉. I'm using the SABnzbd Environment Variables to drive the entire operation. By doing this SABnzbd can literally just point to the same Subliminal.py* that NZBGet does. Just copy the Subliminal directory and Subliminal.py into sabnzbd/scripts/ and you're good to go (assuming you configure SABnzbd to call it too). I really love this approach because i made this possible through my backend framework. I can easily tailor post process scripts i write to work for both NZBGet and SABnzbd with almost no effort at all. At this time, this feature is in a different branch; so those who want to test it out in your community need to reference this link which pulls from the SABnzbd_support branch. I added some basic support for a configuration files too; its a bit messy though so I'll probably start tidying/refactoring this up a bit going forward - not sure yet. For now, Subliminal resorts to the same defaults that NZBGet does (in it's untouched state). But if you want to over-ride anything, just create a Subliminal.ini file and place it in the same directory as the Subliminal.py file (so... sabnzbd/scripts/). The syntax looks like this: # this is Subliminal.ini which resides in the same directory as Subliminal.py
[main]
Languages: en, fr, es
ForceEncoding: No
TvCategories: tv, tv2, Series
Addic7edUser: somedude
Addic7edPass: hispassword
# If subtitles of your specified language was already detected in the video
# do you want to ignore this and keep going anyway? Setting this to no
# causes a bit more overhead (because the video needs to be scanned
# to see if it has subtitles already in it), but it can be worth it as it will
# prevent going off and fetching more subs later on.
IgnoreEmbedded: no
# Setting this to yes before creating a ticket would 'really' help me debug
# any strange issues you have.
Debug: no
# The providers you want to explicilty reference. By default all of them are
# checked... but here you can filter the list if you choose:
Providers: opensubtitles, tvsubtitles, podnapisi, addic7ed, thesubdb
# My version of subliminal is significantly forked/altered from the original one
# so you can also help the filtering and accuracy of your response by telling
# the tool what to use when the nzb is detected to be either a movie or tv show
# by default these are not set (but it's really worth doing!) :)
MovieProviders: opensubtitles, podnapisi, thesubdb
TVShowProviders: tvsubtitles, addic7ed
If you don't define a special directive (e.g. Languages, ForceEncoding, ...) then they're defaults will be used instead. I'll have to take some time and pull all these defaults out for people and document them accordingly They're all defined in the header of Subliminal.py (in comments) for those who are interested. I tried to put some of the main options that people would most likely want to set/over-ride above in my example. |
@Safihre maybe there is someone else in your community we could ask? Just on a side note, since this is a post-process script for SABnzbd (only running once after a download): Brand new stuff won't have subs simply because they haven't been created by other communities yet. Therefore this script works best if it's also periodically called against your media library and/or video downloads every so often (through a cron, or windows schedule) too. That way it will pull in the subs when they become available. |
@caronc I will put it on our Extensions page and link to your comment here. If anyone reads this, please let us know if it is working as expected! 👍 |
Thanks @Safihre; that's great! Would it make more sense to put it in the Post-Process part of your wiki? I'm fine where it is now though too (it doesn't matter to me; it fits where you have it already too). Also, once we get confirmation it's working, I'll then rename the script (nzbget-subliminal -> nzb-subliminal as you implied). Thanks again for all of your support! |
I was also debating this, since it's a Post-Processing script that does Automation 😃 |
It doesn't work for me. Did you install SABnzbd and test it with a test-movie/show? Before you mentioned something about a config-file but I couldn't find it anymore. How can SABnzbd users change things like the language?
|
Doh! I'll look into this as soon as i can (hopefully later this evening). It worked for me but i only tried one NZB-File. Would you mind emailing me the NZB-File you used for this case? |
It happens on all of them, maybe it's a Windows-specific thing? |
Well after our backports issue we had earlier, i'm all set up on windows now 😉. So i'll focus on windows first. But I'll also double check it's still working for me on Linux too. Either way i'll keep you posted when i have more info :) Thanks for being the first tester to report back! (heh) I knew the ol' "well it works for me" wasn't going to cut it. |
So a couple of things:
|
Hmm, we don't save the NZB. We only save the gzipped NZB. I could provide the path to that I think. |
I will add the variable |
Thank you! That would be great! 😄 I'll download your master branch and try it out. Will this NZB-File also be present for users who fetch from an API and/or RSS feed too? |
Should use |
Would you be able to add to the sabnzbd part of the Readme how to use the Config file? I guess just remove the example part? |
Hopefully this wiki page linkable from the main page should suffice for now. Let me know if i should change anything or be more specific in a certain area. |
👍 |
Am I doing something wrong? I set it up with latest version and the logs only show:
That means that there were no subtitles? EDIT: I was trying with a TV show, but it seems I probably should make an addic7ed-account? |
Wow, first off I'm not sure why my full debug mode is enabled in your logs (VDEBUG). I'll check my last commit (As i sometimes turn that on for testing/debugging). I didn't mean to push that upstream enabled. You don't need an addicted account to get subtitles at all; having one just allows you to tailor the subs for you before they're fetched. So that's definitely not your problem; the log entries you shared aren't even showing a request for this type of content. - really strange You definitely didn't do anything wrong on your side; in fact you're just doing a much better job testing than i am. 😊 I appreciate your patients and passing this stuff back to me (seriously; thank you and sorry for your troubles). As per looking at what you shared (log wise): The parsing of the NZB-File happens at the start (if it can). But whether it's successful or not, it From my side: |
@Safihre So it seems it's not working because some of the environment variables changed a bit. it works with SABnzbd v2.3.0 but breaks in v2.3.1. It seems SAB_PP_STATUS doesn't have a value defined in it (used to be a numeric value) anymore. I do see a new environment variable called SAB_STATUS with the text 'running' defined in it. Does that make sense? Should i be using it instead? Perhaps it's a bug that the PP_STATUS isn't set to zero any more? Should i start using all of the new environment variables you defined from this point forward? Is there any reason to maybe leave the old ones for backwards compatibility? Here is what the env looked for me in 2.3.1:
|
That's a mistake, I'll fix it. |
With your fix plus the 3 small changes i just made, i'm able to use 2.3.1 and successfully pull subs down (using Linux at the moment though). Changes are small; so it should still work in your environment too! |
Cool, now it's doing stuff. But something else is now wrong:
|
Hmm, this is completely unrelated to everything we've been doing here.
Subliminal attempts to cache the TV shows from each site for a few days so it doesn't have to re-request the same data again each time. The error you're seeing is just it being unable to cache addi7ed's content due to some formatting error in their listing (or they changed it around a bit). This error is not critical by any means. I'll open a different ticket for this. With respect to this ticket, i think things are looking good! 😄 |
Confirmed! The English sub is there 🥇 So I would say this is done and good to go 👍 |
So the info below means "could not find subtitle" or something went wrong?
|
Hi, it's me again!
Would it be possible to maybe also include a script that can be used as SABnzbd post processing script?
https://sabnzbd.org/wiki/scripts/post-processing-scripts
I know ist basically a 1 line script, but it would make it easier for users.
We can then also list this extension on our website.
It worked great for NZB-notify, users love it :)
The text was updated successfully, but these errors were encountered: