mirror of
https://github.com/PredatH0r/ChanSort.git
synced 2026-05-06 07:26:59 +02:00
- update to DX 17.1.7
- added a "DllName" property to all loaders (set automatically in the main app) for improved error output
- added a "View" class that lets loaders show a dialog prompt without adding direct references to DX assemblies
- Samsung SCM loader now prompts for TV series if it can't be auto-detected uniquely
- added fixes for Samsung .zip format from 288adf7bd2
- added popup to open download page for VC2010 x86 redist if not installed (needed to open SQLite files)
- added hack to work around a problem in the SharpZipLib when Windows returns an invalid code page
This commit is contained in:
@@ -3,6 +3,7 @@ using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using ChanSort.Api;
|
||||
using ICSharpCode.SharpZipLib.Zip;
|
||||
|
||||
@@ -233,7 +234,26 @@ namespace ChanSort.Loader.Samsung
|
||||
if (validCandidates.Length == 0)
|
||||
return false;
|
||||
|
||||
var series = validCandidates[0];
|
||||
char series;
|
||||
if (validCandidates.Length == 1)
|
||||
series = validCandidates[0];
|
||||
else
|
||||
{
|
||||
using (var dlg = View.View.Default?.CreateActionBox(""))
|
||||
{
|
||||
if (dlg == null) // during unit testing
|
||||
return false;
|
||||
dlg.Message = "File type could not be detected automatically.\nPlease choose the model series of your TV:";
|
||||
foreach(var cand in validCandidates)
|
||||
dlg.AddAction("Series " + cand, cand);
|
||||
dlg.AddAction("Cancel", 0);
|
||||
dlg.ShowDialog();
|
||||
if (dlg.SelectedAction == 0)
|
||||
return false;
|
||||
series = (char)dlg.SelectedAction;
|
||||
}
|
||||
}
|
||||
|
||||
this.modelConstants.TryGetValue("Series:" + series, out this.c);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user