Skip to content

Commit

Permalink
- Grundig: added support for dvb*_config.xml channel lists
Browse files Browse the repository at this point in the history
- experimental feature to allow editing Audio-PID (but turned out to have no effect for webOS 5)
  • Loading branch information
Horst Beham committed Jan 2, 2021
1 parent dc1e6e7 commit 7fc413e
Show file tree
Hide file tree
Showing 11 changed files with 589 additions and 16 deletions.
2 changes: 2 additions & 0 deletions source/ChanSort.Api/Controller/SerializerBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ public class SupportedFeatures
public bool MixedSourceFavorites { get; set; }
public bool AllowGapsInFavNumbers { get; set; }
public bool CanEditFavListNames { get; set; }

public bool CanEditAudioPid { get; set; }
}
#endregion

Expand Down
6 changes: 4 additions & 2 deletions source/ChanSort.Loader.GlobalClone/GcJsonSerializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public GcJsonSerializer(string filename, string content) : base(filename)
this.Features.CanHideChannels = true;
this.Features.CanSkipChannels = true;
this.Features.CanLockChannels = true;
this.Features.CanEditAudioPid = false;

this.DataRoot.AddChannelList(new ChannelList(SignalSource.AnalogT | SignalSource.Tv | SignalSource.Data, "Analog Antenna"));
this.DataRoot.AddChannelList(new ChannelList(SignalSource.DvbT | SignalSource.Tv | SignalSource.Data, "DVB-T TV"));
Expand Down Expand Up @@ -72,7 +73,7 @@ public override void Load()

var dlg = View.Default.CreateActionBox("!!! WARNING !!!\n\n" +
"Support for LG webOS 5 channel lists is experimental only!\n" +
"There is a HIGH RISK that your TV will not import the list correctly and you need to run a new search or even reset the TV.\n" +
"There is a RISK that your TV will not import the list correctly and you need to run a new search or even reset the TV.\n" +
"Please read the information on github with steps that MAY lead to a successful import.\n" +
"Any feedback about failure or success is highly appreciated.");
dlg.AddAction("Read information about webOS 5 support on github.com", 1);
Expand Down Expand Up @@ -267,6 +268,7 @@ private void UpdateJsonDoc()
node["skipped"] = ch.Skip;
node["locked"] = ch.Lock;
node["Invisible"] = ch.Hidden;
node["audioPid"] = ch.AudioPid;

// the only successfully imported file was one where these flags were NOT set by ChanSort
// these flags do get set when changing numbers through the TV's menu, but then prevent further modifications, e.g. through an import
Expand All @@ -277,7 +279,7 @@ private void UpdateJsonDoc()
//}

//node["disableUpdate"] = true; // No-Go! This blocked the whole list and required a factory reset. Regardless of the setting, the TV showed wrong numbers.

//node["factoryDefault"] = true; // an exported file after manually changing numbers through the TV-menu had all channels set to userEditChNumber=true, userSelCHNo=true, factoryDefault=true;
}
}
Expand Down
76 changes: 76 additions & 0 deletions source/ChanSort.Loader.Grundig/ChanSort.Loader.Grundig.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{4D5AF0A3-1B96-42C8-910D-0C4852EA22F4}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ChanSort.Loader.Grundig</RootNamespace>
<AssemblyName>ChanSort.Loader.Grundig</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<LangVersion>latest</LangVersion>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<LangVersion>latest</LangVersion>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Channel.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Serializer.cs" />
<Compile Include="SerializerPlugin.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ChanSort.Api\ChanSort.Api.csproj">
<Project>{dccffa08-472b-4d17-bb90-8f513fc01392}</Project>
<Name>ChanSort.Api</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
21 changes: 21 additions & 0 deletions source/ChanSort.Loader.Grundig/Channel.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System.Xml;
using ChanSort.Api;

namespace ChanSort.Loader.Grundig
{
internal class Channel : ChannelInfo
{
public readonly XmlNode Node;
public string RawName;
public string RawSatellite;
public int Format;

internal Channel(SignalSource source, int order, int rowId, XmlNode node)
{
this.SignalSource = source;
this.RecordOrder = order;
this.RecordIndex = rowId;
this.Node = node;
}
}
}
36 changes: 36 additions & 0 deletions source/ChanSort.Loader.Grundig/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("ChanSort.Loader.Grundig")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ChanSort.Loader.Grundig")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("4d5af0a3-1b96-42c8-910d-0c4852ea22f4")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
Loading

0 comments on commit 7fc413e

Please sign in to comment.