mirror of
https://github.com/PredatH0r/ChanSort.git
synced 2026-01-18 13:22:04 +01:00
- bugfix for Sharp/Dyon/... .csv file formats with less than 52 colums
- improved reference list channel matching: if multiple channels match the same name, then the candidates are narrowed down by service type (TV/radio/data - if known), case sensitivity (upper/lowercase), encryption (unencrypted first)
This commit is contained in:
@@ -72,6 +72,8 @@ namespace ChanSort.Loader.Sharp
|
||||
var content = File.ReadAllBytes(this.FileName);
|
||||
this.encoding = Tools.IsUtf8(content) ? new UTF8Encoding(false) : Encoding.GetEncoding(1252);
|
||||
this.lines = this.encoding.GetString(content).Replace("\r", "").Split('\n');
|
||||
if (lines.Length > 2)
|
||||
this.cols = lines[2].ToLowerInvariant().Split(',');
|
||||
|
||||
this.formatVersion = DetectFormatVersion();
|
||||
this.AdjustVisibleColumns();
|
||||
@@ -194,7 +196,6 @@ namespace ChanSort.Loader.Sharp
|
||||
return FormatVersion.Sharp7Columns;
|
||||
|
||||
// fallback for formats with more information, as long as they contain the required columns
|
||||
this.cols = lines[2].ToLowerInvariant().Split(',');
|
||||
var dict = new HashSet<string>();
|
||||
foreach (var col in cols)
|
||||
dict.Add(col);
|
||||
|
||||
Reference in New Issue
Block a user