metherul / Automaton

The open modpack platform.
Other
58 stars 14 forks source link

Closing the file browser dialog when adding mod removes the mod entry, even if no mod was chosen. #58

Closed EmilGedda closed 5 years ago

EmilGedda commented 5 years ago

As title says.

Steps to reproduce: Load a modpack, choose any 2 folders and choose to manually download the mods. Click the find locally button (or whatever it is called) to the left of any mod, and close the file browser dialog without selecting any file. The mod entry will now disappear, even if no file was chosen.

Expected behaviour: Validate the path returned by the file browser dialog (or even just its exit status, which currently seems to be ignored) and show an error message if the path is invalid, and no error message if the dialog was closed without choosing a file, without removing the mod entry from the list of mods.

metherul commented 5 years ago

The entry gets moved to the bottom of the list to keep it from getting targeted by the queue system while you have the dialog open. It's hacky behavior most definitely, and will be getting a revamp soon.

EmilGedda commented 5 years ago

The entry gets moved to the bottom of the list

Ah, did not notice! Close this issue as invalid if you feel like it.

metherul commented 5 years ago

Alrighty!

nathanmerrill commented 5 years ago

When I do this, I'm now getting an error, and the app crashes.

Log below:

[13:22:23.2638892] [.ctor] 5/18/2019 1:22:23 PM Automaton/1.3.4.0 (Microsoft Windows NT 10.0.17763.0; x64) .NET Framework 4.7.3416.0 [13:22:23.2638892] [.ctor] 5/18/2019 1:22:23 PM Is admin: False [13:22:23.2638892] [.ctor] 5/18/2019 1:22:23 PM Automaton Start [13:22:23.4149407] [.ctor] Long path enabled. Continuing. [13:22:23.4268867] [.ctor] LineNumber: 0, FilenName: , MethodName: Callout_FoundName at MS.Internal.Xaml.Parser.GenericTypeNameParser.Callout_FoundName(String prefix, String name) Prefix 'materialDesign' does not map to a namespace. [13:22:25.3668230] [ChooseModpack] Opening modpack filesystemBrowser [13:22:30.7627792] [LoadModpack] Modpack loaded [13:22:46.5728801] [GetMissingMods] Missing mod count: 277 [13:25:13.4261974] [PurgeQueue] Queue purged of mod: A Matter of Time 2.0.10 with MD5 of e84889fa4154dc6a794f60cd17ead5bb [13:25:22.9600462] [QueueController] Detected new item to add to queue modname A Matter of Time 2.0.10 MD5 of e84889fa4154dc6a794f60cd17ead5bb [13:25:22.9610105] [DownloadFile] Downloading file: AMatterOfTime_v2_0_10-44091-v2-0-10.7z [13:25:22.9650093] [GenerateModDownloadLinkAsync] GenerateModDownloadLink() [13:25:22.9670332] [MakeGenericApiCall] User is out of API requests. This is no bueno. [13:25:22.9690075] [.ctor] LineNumber: 0, FilenName: , MethodName: MoveNext at Automaton.Model.NexusApi.ApiEndpoints.d__7.MoveNext() in C:\Programming\C#\Archive\Automaton\src\Automaton.Model\NexusApi\ApiEndpoints.cs:line 108 You are out of API requests for today. This is not set by me, but the Nexus instead. You should never see this. [13:25:22.9700342] [MakeGenericApiCall] Generic API request to URL: /v1/games/skyrim/mods/44091/files/1000263980/download_link has failed. You are out of API requests for today. This is not set by me, but the Nexus instead. You should never see this. [13:25:22.9700342] [.ctor] LineNumber: 0, FilenName: , MethodName: MoveNext at Automaton.Model.NexusApi.ApiEndpoints.d7.MoveNext() in C:\Programming\C#\Archive\Automaton\src\Automaton.Model\NexusApi\ApiEndpoints.cs:line 128 You are out of API requests for today. This is not set by me, but the Nexus instead. You should never see this. [13:25:22.9706657] [.ctor] LineNumber: 0, FilenName: , MethodName: ThrowForNonSuccess at Automaton.Model.NexusApi.ApiEndpoints.d7.MoveNext() in C:\Programming\C#\Archive\Automaton\src\Automaton.Model\NexusApi\ApiEndpoints.cs:line 128 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) You are out of API requests for today. This is not set by me, but the Nexus instead. You should never see this. [13:25:22.9706657] [.ctor] LineNumber: 0, FilenName: , MethodName: ThrowIfExceptional at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) One or more errors occurred.