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

[SUGGESTION] French language detection with subs and audio #2275

Closed
minitoine opened this issue Nov 7, 2017 · 29 comments
Closed

[SUGGESTION] French language detection with subs and audio #2275

minitoine opened this issue Nov 7, 2017 · 29 comments

Comments

@minitoine
Copy link

minitoine commented Nov 7, 2017

Hi,

The language parsed for file containing VO+STFR is not correct. Here English is found.
Also, FASTSUB or SUBFRENCH are often used on release names and conduct to the same error.
Could you add this to a french detection ?

(?(?:\W|)(?:FR|VOSTFR)(?:\W|)) to
(?(?:\W|)(?:FR|VOSTFR|VO+STFR|SUBFRENCH)(?:\W|))

Or remove FR and VOSTFR detection and set it to English as we can use tags behind to filter VOSTFR releases with English.

As we still need need to specify a langage in a profile, we are blocked in France with release names.

Or let us have profile without Language and let us filter releases with tags
Thanks,

minitoine

Trace:

17-11-7 17:08:52.2|Debug|NzbSearchService|Total of 3 reports were found for [The Shannara Chronicles : S02E04] from 6 indexers
17-11-7 17:08:52.2|Info|DownloadDecisionMaker|Processing 3 releases
17-11-7 17:08:52.2|Debug|Parser|Parsing string 'The Shannara Chronicles S02E04 1080p AMZN WEBRip DDP2 0 x264-ViSUM (VO+STFR)'
17-11-7 17:08:52.2|Debug|Parser|Episode Parsed. The Shannara Chronicles - S02E04
17-11-7 17:08:52.2|Debug|Parser|Language parsed: English
17-11-7 17:08:52.2|Debug|QualityParser|Trying to parse quality for The Shannara Chronicles S02E04 1080p AMZN WEBRip DDP2 0 x264-ViSUM (VO+STFR)
17-11-7 17:08:52.2|Debug|Parser|Quality parsed: WEBDL-1080p v1
17-11-7 17:08:52.2|Debug|Parser|Release Group parsed: ViSUM
17-11-7 17:08:52.3|Debug|AcceptableSizeSpecification|Beginning size check for: The Shannara Chronicles S02E04 1080p AMZN WEBRip DDP2 0 x264-ViSUM (VO+STFR)
17-11-7 17:08:52.3|Debug|AcceptableSizeSpecification|Item: The Shannara Chronicles S02E04 1080p AMZN WEBRip DDP2 0 x264-ViSUM (VO+STFR), meets size constraints.
17-11-7 17:08:52.3|Debug|CutoffSpecification|Comparing file quality with report. Existing file is HDTV-720p v1
17-11-7 17:08:52.3|Debug|LanguageSpecification|Checking if report meets language requirements. English
17-11-7 17:08:52.3|Debug|LanguageSpecification|Report Language: English rejected because it is not wanted, wanted French
17-11-7 17:08:52.3|Debug|ReleaseRestrictionsSpecification|Checking if release meets restrictions: The Shannara Chronicles S02E04 1080p AMZN WEBRip DDP2 0 x264-ViSUM (VO+STFR)
17-11-7 17:08:52.3|Debug|ReleaseRestrictionsSpecification|[The Shannara Chronicles S02E04 1080p AMZN WEBRip DDP2 0 x264-ViSUM (VO+STFR)] No restrictions apply, allowing
17-11-7 17:08:52.3|Debug|QualityAllowedByProfileSpecification|Checking if report meets quality requirements. WEBDL-1080p v1
17-11-7 17:08:52.3|Debug|MinimumAgeSpecification|Not checking minimum age requirement for non-usenet report
17-11-7 17:08:52.3|Debug|RetentionSpecification|Not checking retention requirement for non-usenet report
17-11-7 17:08:52.4|Debug|UpgradeDiskSpecification|Comparing file quality with report. Existing file is HDTV-720p v1
17-11-7 17:08:52.4|Debug|SeriesSpecification|Checking if series matches searched series
17-11-7 17:08:52.4|Debug|DelaySpecification|Ignoring delay for user invoked search
17-11-7 17:08:52.4|Debug|HistorySpecification|Skipping history check during search
17-11-7 17:08:52.4|Debug|MonitoredEpisodeSpecification|Skipping monitored check during search
17-11-7 17:08:52.4|Debug|DownloadDecisionMaker|Release rejected for the following reasons: [Permanent] French is wanted, but found English

@markus101
Copy link
Member

Are you saying VO+STFR and SUBFRENCH should all be detected as french?

I think the issue with this is wanting to move away from sub language being used to determine the language, since the audio may still be English and the subs may not be hardcoded. v3 will offer the ability to have multiple languages in a profile so it will be a little more flexible and allow further filtering with restrictions.

@minitoine
Copy link
Author

minitoine commented Nov 21, 2017

"wanting to move away from sub language being used to determine the language"

Well, yes I would like to move away, but currently it's not.
Currently, VOSTFR is considered as French since it's English audio and French subtitles. In this logic, there is a lot of [French?] trackers where people use different tag than VOSTFR.

Actually VOSTFR = VO+STFR = SUBFRENCH = FASTSUB, etc etc

So, I succeed to solve my problem by making a script before Sonarr parse results to "fakely" rename releases on the fly (using Jackett), if it contains one of the following strings (VO+STFR, FASTSUB, SUBFRENCH, MULTI, NF), it adds VOSTFR in the name to be parsed and retained by Sonarr successfully.

Of course, as you said it, V3 should solve the problem by allowing French and English and by adding tag to filter results. But, V3 is not here yet... ;)

@thezoggy
Copy link

you can also add VFF which is the same as TRUEFRENCH
http://astuto.fr/definitions-vf-vost-vfq-truefrench-subforced-vostfr/

@minitoine
Copy link
Author

minitoine commented Nov 22, 2017

To sum up (even if not used), FRENCH language could be detected in these cases:

audio:

FR : FRench
VFF : France French Version
TRUEFRENCH
VFI : International French Version

subtitles:

VOSTFR
VO+STFR
SUBFRENCH

Exception case:

(means French is not explicitly named)
MULTI : used when multi audio including French in French trackers
NF : NetFlix which include French subtitles
FASTSUB (in French trackers ofc)

At least, in my opinion, audio and subtitles tags should be added.

@thezoggy
Copy link

would be nice for sonarr to not wronly detect a show as foreign if a language is used in the ep title..

@markus101
Copy link
Member

@thezoggy #861

@drskullster
Copy link

@minitoine would you be ok to share your script ? I'd be interested in using it on my server :)

@minitoine
Copy link
Author

It is more a trick than a script :)

I use Jackett as a source of releases.
So in the definition YAML files of my trackers set in Jackett, I just modified few lines to replace strings in the names.

For exemple, for an definition file (at search function definition):

title_normal:
selector: "a.torrent-name"
filters:
- name: tolower
- name: replace
args: ["subfrench", "vostfr"]
- name: replace
args: ["vo+stfr", "vostfr"]
- name: replace
args: ["multi", "multi.vostfr"]
- name: replace
args: ["fastsub", "vostfr"]
- name: replace
args: ["nf", "nf.vostfr"]

And it works.

@kriegalex
Copy link

FASTSUB is by no mean linked to French language. It just means the subs where translated with Google Translate and corrected only for major translation problems (hence the FAST).

Maybe some teams use it for VOSTFR, but then they are wrong, because you can have fastsub for spanish subtitles too. The rule is that you specifiy your language and then specify if PROPER or FASTSUB translation.

@minitoine
Copy link
Author

Yeah, I know. But as you mentioned, a lot of teams do that.. :'(

@drskullster
Copy link

When consuming data from a non english tracker (like YGG for us french speaking users) I guess we can safely assume that FASTSUB means that the release is subbed in the tracker language. @minitoine snippet is great in this situation.

@minitoine minitoine changed the title VO+STFR french language detection French language detection with subs and audio. Dec 3, 2017
@minitoine minitoine changed the title French language detection with subs and audio. French language detection with subs and audio Dec 3, 2017
@minitoine minitoine changed the title French language detection with subs and audio [SUGGESTION] French language detection with subs and audio Dec 3, 2017
@lrnv
Copy link

lrnv commented Dec 5, 2017

I'm facing the completly opposite issue : i want VOSTFR to be caught as being english ( in ygg ). Sonarr, thinking thoose files are french audio, does not take them, but i would like him to understand thoose VOSTFR tags as still "English audio". How could i adapt your script to do that ?

@minitoine
Copy link
Author

minitoine commented Dec 5, 2017

Yo Irnv,

maybe by replacing vostfr by en ?
it's a manual cheat..

title_normal:
        selector: "a.torrent-name"
        filters:
          - name: tolower
          - name: replace
            args: ["subfrench", "en"]
          - name: replace
            args: ["vo+stfr", "en"]
          - name: replace
            args: ["multi", "multi.en"]
          - name: replace
            args: ["fastsub", "en"]
          - name: replace
            args: ["nf", "nf.en"]

@lrnv
Copy link

lrnv commented Dec 6, 2017

Thanks very much, worked for a while but i still get some error in sonarr's detection.

However, someone talked here about the V3 that would implement correct separation between spoken language of the show and subtitles. Do you know where i can get more informations about that ? Is there a alpha version of something ?

@HLFH
Copy link

HLFH commented Dec 17, 2017

@lrnv To make it work, I had to uncheck within Jackett WebUI on YGGtorrent indexer:

Try to normalize releases names by moving year after the title

And then within Jackett/Definitions/yggtorrent.yml:

      title_normal:
        selector: "a.torrent-name"
        filters:
          - name: replace
            args: ["VOSTFR", "en"]

@ghost
Copy link

ghost commented Jan 25, 2018

Hi @minitoine
is it possible to adapt your trick to abnormal and xthor as they do not have any .xml config file. They have .cs file instead it's C# but I don't really know what to do.

@minitoine
Copy link
Author

@jenkinsddl

Well, give me some files to work on or something. I guess your pb has no links with Jackett.
I can't do all the searching stuffs for you. You can't just throw your problem like a bomb. Give details..
abnormal ? xthor ? C# files ? Which files ? What do you use ? What to you intend to do ?

@ghost
Copy link

ghost commented Jan 29, 2018

@minitoine
I'm trying to replace the multi, nf, etc ... to multi.vostfr, nf.vostfr as you did for yggtorrent so Sonarr and Radarr thinks that it's a french release but this time with xthor and abnormal. Here are the files (maybe it's not possible for these providers I don't know) It's a dirty way to do it but your trick is the only thing that works for me with ygg, so thank you anyway !

Abn : https://github.com/Jackett/Jackett/blob/master/src/Jackett.Common/Indexers/Abnormal.cs
xthor: https://github.com/Jackett/Jackett/blob/master/src/Jackett.Common/Indexers/Xthor.cs

@minitoine
Copy link
Author

minitoine commented Jan 29, 2018

@jenkinsddl
It seems possible in the piece of code "Results Loop" in those two files to do the cheat.
But, the fact is those indexer files are C#, and have to be compiled (if I'm right). Unless you are compiling yourself Jackett from the github source, I cannot help you. If you do :

Try replacing :

                    // Release Name
                    string name = tRow.Find("td:eq(1) > a").Text();
                    output("Release: " + name); 

to something like

                    // Release Name
                    string name = tRow.Find("td:eq(1) > a").Text();
                    name = Replace("multi", "multi.vostfr").Replace("nf","nf.vostfr");   // and so on
                    output("Release: " + name); 

Compile Jackett, install, should be ok
But I can't test for you.

GL ;)

@minitoine
Copy link
Author

minitoine commented Jan 29, 2018

@lrnv
Kind of late, but what kind of errors ?
Did what HLFH said resolve your pb ?

About V3, we all don't know.

@ghost
Copy link

ghost commented Jan 31, 2018

Thank you once again minitoine 👍 Got it working for xthor, abn and ygg !

here are the changes I made
YGG :

        selector: "a.torrent-name"
        filters:
          - name: tolower
          - name: replace
            args: ["subfrench", "vostfr"]
          - name: replace
            args: ["vo+stfr", "vostfr"]
          - name: replace
            args: ["multi", "multi.vostfr"]
          - name: replace
            args: ["fastsub", "vostfr"]
          - name: replace
            args: ["nf", "nf.vostfr"]

ABN:

                    // Release Name
                    string name = tRow.Find("td:eq(1) > a").Text();
                    name = name.ToLower();
                    name = name.Replace("multi", "multi.vostfr").Replace("nf","nf.vostfr").Replace("subfrench", "vostfr").Replace("vo+stfr", "vostfr"); // little cheat
                    output("Release: " + name);

xThor was a bit different (probably because it's a different api or something ...). You have a section // Mapping Data with a line Title = torrent.name you have to modify this line like this

                            Title = torrent.name.ToLower().Replace("multi", "multi.vostfr").Replace("nf","nf.vostfr").Replace("subfrench", "vostfr").Replace("vo+stfr", "vostfr"), // little cheat

And of course for xthor and Abn you'll have to rebuild it from source.
If you don't know how to do that. I did for you here -> https://github.com/jenkinsddl/Jackett/releases/tag/unofficial-modified-version

Don't forget to disable auto update or the changes will be overwritten.
I don't recommend to do this trick as you won't get any update if you don't pull new changes and build it from time to time.

@BenBenJD
Copy link

BenBenJD commented Mar 9, 2018

Hi,
Can we try to think more on this suggestion ?

I use sonnar but not with torrent but nzb, so i don't use jackett and I cannot use the trick of minitoine (good trick btw). I use NZBHydra who fetches information mostly from my prefered indexer : NZBGeek. It index a lot of French content but mostly with this tag: "multi" (means French language and original langage). I know it won't satisfy everybody but i realy whant in my system that when the parser see "multi" he know it's french content and auto download.

I've spend hours trying to modify the parser in the src code and recompile it (installing glup and other npm things on my server) whitout any success

I've tryed to find an option in nzbhydra allowing me to rename result before sending to sonnarr, no success neither.

So

  • Can somehone has a solution for me ? (i'm not against intalling another http thing who will be between sonarr and nzbhydra who will have the only fuction to replace string in requests)
  • Is There a way in nzbhydra to whrite somewhere that instead of sending "multi" you send VOSTFR for exemple
  • Can in the future the langage parsing module be accessible by user on the webui ?
  • At least can someone help me compiling sonarr ?

Thanks' for your help.

@minitoine
Copy link
Author

minitoine commented Mar 10, 2018

Hi !

If you look at there( src/NzbDrone.Core/Parser/LanguageParser.cs file):
https://github.com/Sonarr/Sonarr/blob/9a82f4502098806f11f1aea243dabb857587970e/src/NzbDrone.Core/Parser/LanguageParser.cs

Line 14, you have the regex used to detect French.
Maybe try to replace
|(?<french>(?:\W|_)(?:FR|VOSTFR)(?:\W|_))|
by something like
|(?<french>(?:\W|_)(?:FR|VOSTFR|MULTI)(?:\W|_))|

From what you said, you didn't succeed to compile your own Sonarr ? Or you succeed, but your modifications didn't change anything on the french detection ?

Keep us in touch.

@BenBenJD
Copy link

BenBenJD commented Mar 11, 2018

Hi,

Following your advice i've gone deeper in the compile work. Actually I had one step missing who seems obvious now : Visual Studio.

So i download VS, Git and gulp on my windows computer. Open the VS project, change the language parser thing and rebuild the projet. Run the .exe : Great news it work... on windows. I can see Sonarr detecting a "multi" release as french !

After that i :

  • copy the content of _output directory on my dedian at /opt/NzbDrone
  • Run mono --debug /opt/NzbDrone/NzbDrone.exe

An I have all those error, i'm completely lost...

[Info] Bootstrap: Starting Sonarr - /opt/NzbDrone/NzbDrone.exe - Version 10.0.0.18341
[Info] Router: Application mode: Interactive
[Info] MigrationLogger: *** Migrating data source=/root/.config/NzbDrone/nzbdrone.db;cache size=-10485760;datetimekind=Utc;journal mode=Wal;pooling=True;version=3 ***
[Info] MigrationLogger: *** Migrating data source=/root/.config/NzbDrone/logs.db;cache size=-10485760;datetimekind=Utc;journal mode=Wal;pooling=True;version=3 ***
[Info] OwinHostController: Listening on the following URLs:
[Info] OwinHostController:   http://*:8989/
[Info] NancyBootstrapper: Starting Web Server
[Fatal] WindowsApp: EPIC FAIL

[v10.0.0.18344] TinyIoC.TinyIoCResolutionException: Unable to resolve type: NzbDrone.SysTray.SystemTrayApp ---> System.TypeInitializationException: The type initializer for 'System.Windows.Forms.WindowsFormsSynchronizationContext' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Windows.Forms.XplatUI' threw an exception. ---> System.ArgumentNullException: Could not open display (X-Server required. Check your DISPLAY environment variable)
Parameter name: Display
  at System.Windows.Forms.XplatUIX11.SetDisplay (System.IntPtr display_handle) [0x00408] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUIX11.cs:547
  at System.Windows.Forms.XplatUIX11..ctor () [0x0006c] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUIX11.cs:262
  at System.Windows.Forms.XplatUIX11.GetInstance () [0x00019] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUIX11.cs:291
  at System.Windows.Forms.XplatUI..cctor () [0x00066] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUI.cs:112
   --- End of inner exception stack trace ---
  at System.Windows.Forms.Theme.get_MenuAccessKeysUnderlined () [0x00000] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/Theme.cs:482
  at System.Windows.Forms.SystemInformation.get_MenuAccessKeysUnderlined () [0x00000] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/SystemInformation.cs:317
  at System.Windows.Forms.Control..ctor () [0x000e4] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/Control.cs:901
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control..ctor()
  at System.Windows.Forms.WindowsFormsSynchronizationContext..cctor () [0x00000] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/WindowsFormsSynchronizationContext.cs:45
   --- End of inner exception stack trace ---
  at System.Windows.Forms.Control..ctor () [0x00014] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/Control.cs:871
  at System.Windows.Forms.ScrollableControl..ctor () [0x00000] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/ScrollableControl.cs:158
  at System.Windows.Forms.ContainerControl..ctor () [0x0000e] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/ContainerControl.cs:54
  at System.Windows.Forms.Form..ctor () [0x00012] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/Form.cs:387
  at System.Windows.Forms.NotifyIcon+NotifyIconWindow..ctor (System.Windows.Forms.NotifyIcon owner) [0x00000] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/NotifyIcon.cs:61
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.NotifyIcon+NotifyIconWindow..ctor(System.Windows.Forms.NotifyIcon)
  at System.Windows.Forms.NotifyIcon..ctor () [0x00006] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/NotifyIcon.cs:389
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.NotifyIcon..ctor()
  at NzbDrone.SysTray.SystemTrayApp..ctor (NzbDrone.Host.IBrowserService browserService, NzbDrone.Common.EnvironmentInfo.IRuntimeInfo runtimeInfo, NzbDrone.Common.Processes.IProcessProvider processProvider) [0x00000] in <85e7e68285d34987b9c8b9219c4b6e89>:0
  at (wrapper remoting-invoke-with-check) NzbDrone.SysTray.SystemTrayApp..ctor(NzbDrone.Host.IBrowserService,NzbDrone.Common.EnvironmentInfo.IRuntimeInfo,NzbDrone.Common.Processes.IProcessProvider)
  at (wrapper dynamic-method) System.Object.lambda_method(System.Runtime.CompilerServices.Closure,object[])
  at TinyIoC.TinyIoCContainer.ConstructType (System.Type requestedType, System.Type implementationType, System.Reflection.ConstructorInfo constructor, TinyIoC.NamedParameterOverloads parameters, TinyIoC.ResolveOptions options) [0x0015d] in <a127077b9e044775a7f46f644261e6e0>:0
   --- End of inner exception stack trace ---
  at TinyIoC.TinyIoCContainer.ConstructType (System.Type requestedType, System.Type implementationType, System.Reflection.ConstructorInfo constructor, TinyIoC.NamedParameterOverloads parameters, TinyIoC.ResolveOptions options) [0x00174] in <a127077b9e044775a7f46f644261e6e0>:0
  at TinyIoC.TinyIoCContainer.ConstructType (System.Type requestedType, System.Type implementationType, System.Reflection.ConstructorInfo constructor, TinyIoC.ResolveOptions options) [0x0000a] in <a127077b9e044775a7f46f644261e6e0>:0
  at TinyIoC.TinyIoCContainer+SingletonFactory.GetObject (System.Type requestedType, TinyIoC.TinyIoCContainer container, TinyIoC.NamedParameterOverloads parameters, TinyIoC.ResolveOptions options) [0x00047] in <a127077b9e044775a7f46f644261e6e0>:0
  at TinyIoC.TinyIoCContainer.ResolveInternal (TinyIoC.TinyIoCContainer+TypeRegistration registration, TinyIoC.NamedParameterOverloads parameters, TinyIoC.ResolveOptions options) [0x0002c] in <a127077b9e044775a7f46f644261e6e0>:0
  at TinyIoC.TinyIoCContainer.Resolve (System.Type resolveType) [0x00012] in <a127077b9e044775a7f46f644261e6e0>:0
  at TinyIoC.TinyIoCContainer.Resolve[ResolveType] () [0x00001] in <a127077b9e044775a7f46f644261e6e0>:0
  at NzbDrone.Common.Composition.Container.Resolve[T] () [0x00001] in <a127077b9e044775a7f46f644261e6e0>:0
  at NzbDrone.WindowsApp+<>c.<Main>b__1_0 (NzbDrone.Common.Composition.IContainer container) [0x00008] in <85e7e68285d34987b9c8b9219c4b6e89>:0
  at NzbDrone.Host.Bootstrap.Start (NzbDrone.Common.EnvironmentInfo.StartupContext startupContext, NzbDrone.Host.IUserAlert userAlert, System.Action`1[T] startCallback) [0x00093] in <edd4b366073e4434b1b0cbe2f36aa53c>:0
  at NzbDrone.WindowsApp.Main (System.String[] args) [0x00018] in <85e7e68285d34987b9c8b9219c4b6e89>:0

EPIC FAIL: System.TypeInitializationException: The type initializer for 'System.Windows.Forms.WindowsFormsSynchronizationContext' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Windows.Forms.XplatUI' threw an exception. ---> System.ArgumentNullException: Could not open display (X-Server required. Check your DISPLAY environment variable)
Parameter name: Display
  at System.Windows.Forms.XplatUIX11.SetDisplay (System.IntPtr display_handle) [0x00408] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUIX11.cs:547
  at System.Windows.Forms.XplatUIX11..ctor () [0x0006c] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUIX11.cs:262
  at System.Windows.Forms.XplatUIX11.GetInstance () [0x00019] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUIX11.cs:291
  at System.Windows.Forms.XplatUI..cctor () [0x00066] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUI.cs:112
   --- End of inner exception stack trace ---
  at System.Windows.Forms.Theme.get_MenuAccessKeysUnderlined () [0x00000] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/Theme.cs:482
  at System.Windows.Forms.SystemInformation.get_MenuAccessKeysUnderlined () [0x00000] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/SystemInformation.cs:317
  at System.Windows.Forms.Control..ctor () [0x000e4] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/Control.cs:901
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control..ctor()
  at System.Windows.Forms.WindowsFormsSynchronizationContext..cctor () [0x00000] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/WindowsFormsSynchronizationContext.cs:45
   --- End of inner exception stack trace ---
  at (wrapper managed-to-native) System.Object.__icall_wrapper_mono_generic_class_init(intptr)
  at System.Windows.Forms.WindowsFormsSynchronizationContext.get_AutoInstall () [0x00000] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/WindowsFormsSynchronizationContext.cs:55
  at System.Windows.Forms.Control..ctor () [0x00014] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/Control.cs:871
  at System.Windows.Forms.ScrollableControl..ctor () [0x00000] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/ScrollableControl.cs:158
  at System.Windows.Forms.ContainerControl..ctor () [0x0000e] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/ContainerControl.cs:54
  at System.Windows.Forms.Form..ctor () [0x00012] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/Form.cs:387
  at System.Windows.Forms.MessageBox+MessageBoxForm..ctor (System.Windows.Forms.IWin32Window owner, System.String text, System.String caption, System.Windows.Forms.MessageBoxButtons buttons, System.Windows.Forms.MessageBoxIcon icon, System.Boolean displayHelpButton) [0x0000c] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/MessageBox.cs:72
  at System.Windows.Forms.MessageBox+MessageBoxForm..ctor (System.Windows.Forms.IWin32Window owner, System.String text, System.String caption, System.Windows.Forms.MessageBoxButtons buttons, System.Windows.Forms.MessageBoxIcon icon) [0x00000] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/MessageBox.cs:139
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.MessageBox+MessageBoxForm..ctor(System.Windows.Forms.IWin32Window,string,string,System.Windows.Forms.MessageBoxButtons,System.Windows.Forms.MessageBoxIcon)
  at System.Windows.Forms.MessageBox.Show (System.String text, System.String caption, System.Windows.Forms.MessageBoxButtons buttons, System.Windows.Forms.MessageBoxIcon icon) [0x00000] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/MessageBox.cs:640
  at NzbDrone.WindowsApp.Main (System.String[] args) [0x0006e] in <85e7e68285d34987b9c8b9219c4b6e89>:0
[Fatal] GlobalExceptionHandlers: EPIC FAIL.

[v10.0.0.18344] System.TypeInitializationException: The type initializer for 'System.Windows.Forms.WindowsFormsSynchronizationContext' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Windows.Forms.XplatUI' threw an exception. ---> System.ArgumentNullException: Could not open display (X-Server required. Check your DISPLAY environment variable)
Parameter name: Display
  at System.Windows.Forms.XplatUIX11.SetDisplay (System.IntPtr display_handle) [0x00408] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUIX11.cs:547
  at System.Windows.Forms.XplatUIX11..ctor () [0x0006c] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUIX11.cs:262
  at System.Windows.Forms.XplatUIX11.GetInstance () [0x00019] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUIX11.cs:291
  at System.Windows.Forms.XplatUI..cctor () [0x00066] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUI.cs:112
   --- End of inner exception stack trace ---
  at System.Windows.Forms.Theme.get_MenuAccessKeysUnderlined () [0x00000] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/Theme.cs:482
  at System.Windows.Forms.SystemInformation.get_MenuAccessKeysUnderlined () [0x00000] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/SystemInformation.cs:317
  at System.Windows.Forms.Control..ctor () [0x000e4] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/Control.cs:901
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control..ctor()
  at System.Windows.Forms.WindowsFormsSynchronizationContext..cctor () [0x00000] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/WindowsFormsSynchronizationContext.cs:45
   --- End of inner exception stack trace ---
  at (wrapper managed-to-native) System.Object.__icall_wrapper_mono_generic_class_init(intptr)
  at System.Windows.Forms.WindowsFormsSynchronizationContext.get_AutoInstall () [0x00000] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/WindowsFormsSynchronizationContext.cs:55
  at System.Windows.Forms.Control..ctor () [0x00014] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/Control.cs:871
  at System.Windows.Forms.ScrollableControl..ctor () [0x00000] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/ScrollableControl.cs:158
  at System.Windows.Forms.ContainerControl..ctor () [0x0000e] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/ContainerControl.cs:54
  at System.Windows.Forms.Form..ctor () [0x00012] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/Form.cs:387
  at System.Windows.Forms.MessageBox+MessageBoxForm..ctor (System.Windows.Forms.IWin32Window owner, System.String text, System.String caption, System.Windows.Forms.MessageBoxButtons buttons, System.Windows.Forms.MessageBoxIcon icon, System.Boolean displayHelpButton) [0x0000c] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/MessageBox.cs:72
  at System.Windows.Forms.MessageBox+MessageBoxForm..ctor (System.Windows.Forms.IWin32Window owner, System.String text, System.String caption, System.Windows.Forms.MessageBoxButtons buttons, System.Windows.Forms.MessageBoxIcon icon) [0x00000] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/MessageBox.cs:139
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.MessageBox+MessageBoxForm..ctor(System.Windows.Forms.IWin32Window,string,string,System.Windows.Forms.MessageBoxButtons,System.Windows.Forms.MessageBoxIcon)
  at System.Windows.Forms.MessageBox.Show (System.String text, System.String caption, System.Windows.Forms.MessageBoxButtons buttons, System.Windows.Forms.MessageBoxIcon icon) [0x00000] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/MessageBox.cs:640
  at NzbDrone.WindowsApp.Main (System.String[] args) [0x0006e] in <85e7e68285d34987b9c8b9219c4b6e89>:0

[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'System.Windows.Forms.WindowsFormsSynchronizationContext' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Windows.Forms.XplatUI' threw an exception. ---> System.ArgumentNullException: Could not open display (X-Server required. Check your DISPLAY environment variable)
Parameter name: Display
  at System.Windows.Forms.XplatUIX11.SetDisplay (System.IntPtr display_handle) [0x00408] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUIX11.cs:547
  at System.Windows.Forms.XplatUIX11..ctor () [0x0006c] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUIX11.cs:262
  at System.Windows.Forms.XplatUIX11.GetInstance () [0x00019] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUIX11.cs:291
  at System.Windows.Forms.XplatUI..cctor () [0x00066] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUI.cs:112
   --- End of inner exception stack trace ---
  at System.Windows.Forms.Theme.get_MenuAccessKeysUnderlined () [0x00000] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/Theme.cs:482
  at System.Windows.Forms.SystemInformation.get_MenuAccessKeysUnderlined () [0x00000] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/SystemInformation.cs:317
  at System.Windows.Forms.Control..ctor () [0x000e4] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/Control.cs:901
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control..ctor()
  at System.Windows.Forms.WindowsFormsSynchronizationContext..cctor () [0x00000] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/WindowsFormsSynchronizationContext.cs:45
   --- End of inner exception stack trace ---
  at (wrapper managed-to-native) System.Object.__icall_wrapper_mono_generic_class_init(intptr)
  at System.Windows.Forms.WindowsFormsSynchronizationContext.get_AutoInstall () [0x00000] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/WindowsFormsSynchronizationContext.cs:55
  at System.Windows.Forms.Control..ctor () [0x00014] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/Control.cs:871
  at System.Windows.Forms.ScrollableControl..ctor () [0x00000] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/ScrollableControl.cs:158
  at System.Windows.Forms.ContainerControl..ctor () [0x0000e] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/ContainerControl.cs:54
  at System.Windows.Forms.Form..ctor () [0x00012] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/Form.cs:387
  at System.Windows.Forms.MessageBox+MessageBoxForm..ctor (System.Windows.Forms.IWin32Window owner, System.String text, System.String caption, System.Windows.Forms.MessageBoxButtons buttons, System.Windows.Forms.MessageBoxIcon icon, System.Boolean displayHelpButton) [0x0000c] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/MessageBox.cs:72
  at System.Windows.Forms.MessageBox+MessageBoxForm..ctor (System.Windows.Forms.IWin32Window owner, System.String text, System.String caption, System.Windows.Forms.MessageBoxButtons buttons, System.Windows.Forms.MessageBoxIcon icon) [0x00000] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/MessageBox.cs:139
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.MessageBox+MessageBoxForm..ctor(System.Windows.Forms.IWin32Window,string,string,System.Windows.Forms.MessageBoxButtons,System.Windows.Forms.MessageBoxIcon)
  at System.Windows.Forms.MessageBox.Show (System.String text, System.String caption, System.Windows.Forms.MessageBoxButtons buttons, System.Windows.Forms.MessageBoxIcon icon) [0x00000] in /build/mono-5.10.0.160/mcs/class/System.Windows.Forms/System.Windows.Forms/MessageBox.cs:640
  at NzbDrone.WindowsApp.Main (System.String[] args) [0x0006e] in <85e7e68285d34987b9c8b9219c4b6e89>:0

@minitoine
Copy link
Author

minitoine commented Mar 11, 2018

Don't you have any target thing before compiling the project ? (Something like a mono target ?) I guess you cannot just copy your build for windows on Linux based computers.

You should have, I guess, some configuration to do before, no ?

Unfortunately, I cannot help you more in this way, maybe try to contact a Sonarr Dev..

@BenBenJD
Copy link

Ok, found a workaround: It works with the application :
mono --debug /opt/NzbDrone/NzbDrone.Console.exe

Maybe it's because in the Readme they said

Make sure NzbDrone.Console is set as the startup project

So i have done this in Visual Studio.

I should try putting the NzbDrone.Core as Startup in visual studio and try again.
I should also improve the french detection (adding VFF VFI, etc..)

Right after that I will write here the all process if someone whants to try to modify the code for his own.

I don't know what would happen when an update will be avaiable...

@minitoine
Copy link
Author

Clearly, if you update Sonarr, the build will be replaced (If Sonarr updates on its own).

But, if you pulled the GitHub project, and modified some files. You still can pull updates and see if it merges your modifications. After this, you should be able to compile again with the update.

I guess you should write a shell, or whatever, script to do all this stuff automatically.

Good luck.

@the-lazy-fox
Copy link

Just to let you know, I have the same "problem" and I fixed it by settings my quality set to French language and then adding mandatory words like VOSTFR, SUBFRENCH, etc.

From my point of view, the assumption that VO is English is very bad because it can be German (DARK) or Spanish (La Casa de papal) may be we need an "original" language option?

@markus101
Copy link
Member

v3 will have the ability to prefer otherwise equal releases as well as multiple languages per profile (similar to qualities), which should help in some of these cases. Closing this, but we can reconsider after v3 is out if necessary.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants