Merging two cablecard tuners and lineups

An evolving, supported alternative to Rovi
Forum rules
★ Download the latest EPG123 here: https://garyan2.github.io/ <> Setup guide here: https://garyan2.github.io/install.html
illuminated

Posts: 11
Joined: Sun Sep 15, 2013 4:10 pm
Location:

HTPC Specs: Show details

#21

Post by illuminated » Sat Feb 20, 2021 6:46 pm

I've gone through my entire guide and found no issues whatsoever. This is really great.

Some channels have the same numbers but WMC chooses the appropriate tuner when selected.

The guide is completely functional as-is now but it's not obvious which provider a channel comes from. I prefer to record all my content from one provider over the other due to quality concerns (compression, etc.), and so for me having the channels separated is useful.

This is an edge case on top of my edge case and so I wouldn't expect this function to be in the client so I have rolled my own solution which I'll provide here in the event it helps others.

After doing some research and experimentation, I found I can do this by running a backup, extracting the lineup file, editing it and then importing it back in using epg123client's manual import function.

My research and experimentation and a desire to get this done quickly led me to use a brute force sed script. It does not parse the XML and it is likely brittle but it works for my use case, which is to add 5000 to one provider's channels. The provider string (the one that starts and ends with exclamation points) can be found by looking for a "MergedChannel" element in the file that is known to be for a channel from the targeted provider.

Code: Select all

sed \
	-e '/<MergedChannel .*!USA-PA37904-X!/s/number="\([0-9]\)"/number="500\1"/' \
	-e '/<MergedChannel .*!USA-PA37904-X!/s/number="\([0-9]\)\([0-9]\)"/number="50\1\2"/' \
	-e '/<MergedChannel .*!USA-PA37904-X!/s/number="\([0-9]\)\([0-9]\)\([0-9]\)"/number="5\1\2\3"/' \
	-e '/<MergedChannel .*!USA-PA37904-X!/s/number="1\([0-9]\)\([0-9]\)\([0-9]\)"/number="6\1\2\3"/' \
	-e '/<MergedChannel .*!USA-PA37904-X!/s/number="2\([0-9]\)\([0-9]\)\([0-9]\)"/number="7\1\2\3"/' \
	-e '/<MergedChannel .*!USA-PA37904-X!/s/number="3\([0-9]\)\([0-9]\)\([0-9]\)"/number="8\1\2\3"/' \
	lineup.mxf > lineup_plus5000.mxf
I used gnu sed on linux.

After running this, epg123client will show the channels as edited with the changed numbers in red, the same as they are when edited manually. They then appear with the edited numbers in WMC's guide, all together starting at 5000.

Post Reply