Giter VIP home page Giter VIP logo

radarr_import_subs.sh's People

Contributors

ftc2 avatar kyedavey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

radarr_import_subs.sh's Issues

is 2_Eng.srt always forced?

Hi there, I am needing to implement a similar solution to you (I might even just use your script) and I was wondering how successful you have been in selecting subtitle track 2 as the forced subtitle track? I was thinking I would have to determine this algorithmicly (e.g. checking which subtitle file is the smallest if there are multiple), but you seem to have been satisfied with the assumption that track 2 will usually be the forced track? Thanks.

Error on Run

I get errors in the radarr logs when running the script and nothing is imported.

I am running radarr as a docker in Unraid, with the script file in the appdata (config) folder. Have set the url and api key in the script file too.

Log extract below:

2022-09-07 18:28:36.0|Debug|radarr_import_subs.sh|Starting /config/radarr_import_subs.sh 
2022-09-07 18:28:36.1|Error|radarr_import_subs.sh|grep: unrecognized option: z
2022-09-07 18:28:36.1|Error|radarr_import_subs.sh|BusyBox v1.34.1 (2022-07-19 20:11:24 UTC) multi-call binary.
2022-09-07 18:28:36.1|Error|radarr_import_subs.sh|Usage: grep [-HhnlLoqvsrRiwFE] [-m N] [-A|B|C N] { PATTERN | -e PATTERN... | -f FILE... } [FILE]...
2022-09-07 18:28:36.1|Error|radarr_import_subs.sh|Search for PATTERN in FILEs (or stdin)
2022-09-07 18:28:36.1|Error|radarr_import_subs.sh|	-H	Add 'filename:' prefix
2022-09-07 18:28:36.1|Error|radarr_import_subs.sh|	-h	Do not add 'filename:' prefix
2022-09-07 18:28:36.1|Error|radarr_import_subs.sh|	-n	Add 'line_no:' prefix
2022-09-07 18:28:36.1|Error|radarr_import_subs.sh|	-l	Show only names of files that match
2022-09-07 18:28:36.1|Error|radarr_import_subs.sh|	-L	Show only names of files that don't match
2022-09-07 18:28:36.1|Error|radarr_import_subs.sh|	-c	Show only count of matching lines
2022-09-07 18:28:36.1|Error|radarr_import_subs.sh|	-o	Show only the matching part of line
2022-09-07 18:28:36.1|Error|radarr_import_subs.sh|	-q	Quiet. Return 0 if PATTERN is found, 1 otherwise
2022-09-07 18:28:36.1|Error|radarr_import_subs.sh|	-v	Select non-matching lines
2022-09-07 18:28:36.1|Error|radarr_import_subs.sh|	-s	Suppress open and read errors
2022-09-07 18:28:36.1|Error|radarr_import_subs.sh|	-r	Recurse
2022-09-07 18:28:36.1|Error|radarr_import_subs.sh|	-R	Recurse and dereference symlinks
2022-09-07 18:28:36.1|Error|radarr_import_subs.sh|	-i	Ignore case
2022-09-07 18:28:36.1|Error|radarr_import_subs.sh|	-w	Match whole words only
2022-09-07 18:28:36.1|Error|radarr_import_subs.sh|	-x	Match whole lines only
2022-09-07 18:28:36.1|Error|radarr_import_subs.sh|	-F	PATTERN is a literal (not regexp)
2022-09-07 18:28:36.1|Error|radarr_import_subs.sh|	-E	PATTERN is an extended regexp
2022-09-07 18:28:36.1|Error|radarr_import_subs.sh|	-m N	Match up to N times per file
2022-09-07 18:28:36.1|Error|radarr_import_subs.sh|	-A N	Print N lines of trailing context
2022-09-07 18:28:36.1|Error|radarr_import_subs.sh|	-B N	Print N lines of leading context
2022-09-07 18:28:36.1|Error|radarr_import_subs.sh|	-C N	Same as '-A N -B N'
2022-09-07 18:28:36.1|Error|radarr_import_subs.sh|	-e PTRN	Pattern to match
2022-09-07 18:28:36.1|Error|radarr_import_subs.sh|	-f FILE	Read pattern from file
2022-09-07 18:28:36.1|Debug|CustomScript|Executed external script: /config/radarr_import_subs.sh - Status: 0
2022-09-07 18:28:36.1|Debug|CustomScript|Script Output: 
09/07/2022 08:28:36 - Error - grep: unrecognized option: z
09/07/2022 08:28:36 - Error - BusyBox v1.34.1 (2022-07-19 20:11:24 UTC) multi-call binary.
09/07/2022 08:28:36 - Error - Usage: grep [-HhnlLoqvsrRiwFE] [-m N] [-A|B|C N] { PATTERN | -e PATTERN... | -f FILE... } [FILE]...
09/07/2022 08:28:36 - Error - Search for PATTERN in FILEs (or stdin)
09/07/2022 08:28:36 - Error - 	-H	Add 'filename:' prefix
09/07/2022 08:28:36 - Error - 	-h	Do not add 'filename:' prefix
09/07/2022 08:28:36 - Error - 	-n	Add 'line_no:' prefix
09/07/2022 08:28:36 - Error - 	-l	Show only names of files that match
09/07/2022 08:28:36 - Error - 	-L	Show only names of files that don't match
09/07/2022 08:28:36 - Error - 	-c	Show only count of matching lines
09/07/2022 08:28:36 - Error - 	-o	Show only the matching part of line
09/07/2022 08:28:36 - Error - 	-q	Quiet. Return 0 if PATTERN is found, 1 otherwise
09/07/2022 08:28:36 - Error - 	-v	Select non-matching lines
09/07/2022 08:28:36 - Error - 	-s	Suppress open and read errors
09/07/2022 08:28:36 - Error - 	-r	Recurse
09/07/2022 08:28:36 - Error - 	-R	Recurse and dereference symlinks
09/07/2022 08:28:36 - Error - 	-i	Ignore case
09/07/2022 08:28:36 - Error - 	-w	Match whole words only
09/07/2022 08:28:36 - Error - 	-x	Match whole lines only
09/07/2022 08:28:36 - Error - 	-F	PATTERN is a literal (not regexp)
09/07/2022 08:28:36 - Error - 	-E	PATTERN is an extended regexp
09/07/2022 08:28:36 - Error - 	-m N	Match up to N times per file
09/07/2022 08:28:36 - Error - 	-A N	Print N lines of trailing context
09/07/2022 08:28:36 - Error - 	-B N	Print N lines of leading context
09/07/2022 08:28:36 - Error - 	-C N	Same as '-A N -B N'
09/07/2022 08:28:36 - Error - 	-e PTRN	Pattern to match
09/07/2022 08:28:36 - Error - 	-f FILE	Read pattern from file```

Single SRT with 2 digit number renamed as forced.

Hi, I just ran into an occasion where a few releases I grabbed had a single SRT that began with a 2 digit number (15) in which it was renamed as forced. I believe it is expected to be renamed as normal given a single SRT file with a number higher than 4.

Below is one example:

2023-11-01 20:10:26.0|Error|radarr_import_subs.sh|Copying subtitle: Subs/15_English.srt --> /movies/Paranormal Activity 3 (2011)/Paranormal Activity 3 (2011) [imdbid-tt1778304] - [Bluray-1080p][AAC 5.1][x265]-RARBG.en.forced.srt

Is there a way to run this on a Windows radarr installation?

The script ending in .sh gives this error when I try to use it on Windows:
An error occurred trying to start process 'E:\radarr_import_subs.sh' with working directory 'C:\Windows\system32'. The specified executable is not a valid application for this OS platform.

Suggestion for handling of subtitles

Nice script. Haven't tested it yet but looks like what I need for handling RARBG, VXT releases.

Just one note with the renaming to forced, sdh, etc. I notice that RARBG does not follow a strict order when numbering the subtitles. Sometimes a movie has no forced sub but the normal sub is numbered 2. Sometimes its does have a forced sub (like Sonic 2) and the numbers are 11, 12 and 13. i.e. they are not always numbered 2,3,4 in the correct way you have it.

Perhaps a better way to do it for RARBG is to check how many subs there are then:

  1. if one then label as normal
  2. if two then larger one is sdh, other is normal
  3. if three or more then largest is sdh, smallest is forced and others are normal.

I note that this is not perfect. as some films (like Apocalypto (2006)) have only one sub and it is a forced sub. But in this case the user can select it when playing the file.

Let me know what you think.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.