mirror of
https://github.com/PredatH0r/ChanSort.git
synced 2026-05-07 21:35:55 +02:00
- added function to mark a channel for swapping + swap with current channel
- replaced misuse of "FileLoadException" with a custom LoaderException to handle file loading issues with better continue/fail logic - removed "Save As" and replaced it with "Convert list" menu item that shows information on how to use a reference list instead of direct conversion
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Xml;
|
||||
@@ -127,19 +126,19 @@ class Serializer : SerializerBase
|
||||
doc.Load(this.FileName);
|
||||
var sl = doc["servicelist"];
|
||||
if (sl == null)
|
||||
throw new FileLoadException("expected root element <servicelist>");
|
||||
throw LoaderException.TryNext("expected root element <servicelist>");
|
||||
|
||||
var tuners = sl["tuners"];
|
||||
if (tuners == null)
|
||||
throw new FileLoadException("missing <tuners> list");
|
||||
throw LoaderException.TryNext("missing <tuners> list");
|
||||
|
||||
var services = sl["services"];
|
||||
if (services == null)
|
||||
throw new FileLoadException("missing <services> list");
|
||||
throw LoaderException.TryNext("missing <services> list");
|
||||
|
||||
var favorites = sl["favorites"];
|
||||
if (favorites == null)
|
||||
throw new FileLoadException("missing <favorites> list");
|
||||
throw LoaderException.TryNext("missing <favorites> list");
|
||||
|
||||
LoadTuners(tuners);
|
||||
LoadServices(services);
|
||||
|
||||
Reference in New Issue
Block a user