mirror of
https://github.com/PredatH0r/ChanSort.git
synced 2026-08-30 11:17:02 +02:00
- unified handling for deleting channels (action based on file format support either mark-as-deleted, remove-from-file, append-at-end)
- added unit tests - internal code cleanup
This commit is contained in:
@@ -9,9 +9,10 @@
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>ChanSort.Loader.PhilipsXml</RootNamespace>
|
||||
<AssemblyName>ChanSort.Loader.PhilipsXml</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@@ -21,32 +22,36 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<OutputPath>..\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||
<OutputPath>..\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
<OutputPath>..\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace ChanSort.Loader.PhilipsXml
|
||||
public Serializer(string inputFile) : base(inputFile)
|
||||
{
|
||||
this.Features.ChannelNameEdit = ChannelNameEditMode.All;
|
||||
this.Features.CanDeleteChannels = true;
|
||||
this.Features.DeleteMode = DeleteMode.Physically;
|
||||
|
||||
this.DataRoot.AddChannelList(this.terrChannels);
|
||||
this.DataRoot.AddChannelList(this.cableChannels);
|
||||
@@ -59,11 +59,6 @@ namespace ChanSort.Loader.PhilipsXml
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region DisplayName
|
||||
public override string DisplayName => "Philips *.xml loader";
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Load()
|
||||
|
||||
@@ -134,8 +129,8 @@ namespace ChanSort.Loader.PhilipsXml
|
||||
if (setupNode.HasAttribute("ChannelName"))
|
||||
{
|
||||
this.formatVersion = 1;
|
||||
this.DataRoot.SupportedFavorites = Favorites.A;
|
||||
this.DataRoot.SortedFavorites = true;
|
||||
this.Features.SupportedFavorites = Favorites.A;
|
||||
this.Features.SortedFavorites = true;
|
||||
|
||||
var dtype = bcastNode.GetAttribute("DecoderType");
|
||||
if (dtype == "1")
|
||||
@@ -150,8 +145,8 @@ namespace ChanSort.Loader.PhilipsXml
|
||||
else if (setupNode.HasAttribute("name"))
|
||||
{
|
||||
this.formatVersion = 2;
|
||||
this.DataRoot.SupportedFavorites = 0;
|
||||
this.DataRoot.SortedFavorites = false;
|
||||
this.Features.SupportedFavorites = 0;
|
||||
this.Features.SortedFavorites = false;
|
||||
foreach (var list in this.DataRoot.ChannelLists)
|
||||
{
|
||||
list.VisibleColumnFieldNames.Remove("Favorites");
|
||||
|
||||
Reference in New Issue
Block a user