home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Development
Improvement Suggestions
Sort or restrict channels by group in mapping dialog
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="RobW" data-source="post: 1276524" data-attributes="member: 166387"><p>In lieu of a likely modification to TV Setup module, I have devised my own workaround, using SQL. Here is a quick resume. Should be safe but make sure you have a backup before you try this!</p><p></p><p>Simple scenario to demonstrate. 2 cards both on A/B diseqc switches. In each case A connects to LNB pointed at Satelite 1, and B to Sat 2. Ticking "Create groups for each satellite", scan card 1 to Satellite 1 only. Similarly scan card 2 to satellite 2 only. After the scan, need to map Sat 2 to card 1 and Sat 1 to card 2. Of course, normally you could just copy the missing channels in such a simple arrangement. But this 'hiding channels' illustration is intended to be extrapolated to a more complex case.</p><p></p><p>With MP TV Server setup closed, search for MySQL and open link to command line client – default installed with MP. (If you use MS SQL instead you may have to adapt this according to your knowledge of that DB).</p><p></p><p>Login on with "MediaPortal" (case sensitive)</p><p></p><p>Connect to database with </p><p>[CODE=sql]use mptvdb;[/CODE]</p><p></p><p>List the groups to get the group IDs </p><p>[CODE=sql]select * from channelgroup;[/CODE]</p><p></p><p>Let's say the groups IDs MP has constructed from your scan are 5 for satellite 1 and 6 for satellite 2.</p><p></p><p>We now hide all the channels from satellite 1 (Group 5):</p><p>[CODE=sql]update channel ch</p><p>inner join groupmap gm</p><p>on ch.idchannel = gm.idChannel</p><p>set ch.isTv = 0x0</p><p>where gm.idgroup = 5</p><p>;[/CODE]</p><p></p><p>Leaving the MySQL window open, we now open MP TV Server Setup. It will only show TV channels from satellite 2 because we have temporarily marked the channels from satellite 1 as not TV channels. Map all these channels to Card 1 and close setup.</p><p></p><p>We can now reset the TV channels:</p><p>[CODE=sql]update channel</p><p>set isTv = 0x1</p><p>where isRadio = 0x0</p><p>;[/CODE]</p><p></p><p>This simply goes through the whole dataset and, wherever a channel is not marked as Radio, marks it as TV. Thus all the previously unmarked TV channels are restored.</p><p></p><p>Repeat the temporary channel hiding for group 6 (i.e. change the above line WHERE gm.idgroup = 6) which will only show TV channels from Satellite 1 to map to card 2. Remember to reset all channels again before leaving the MySQL command line.</p><p></p><p> Of course, this is just a simple illustration done the manual way. Clearly it can be scripted. I leave it to anyone needing this to make their own arrangements. In a situation with multiple satellites, you would sequentially hide the TV channels for each satellite group until only the ones you want to map remain. A single reset SQL will then restore status quo for the lot.</p></blockquote><p></p>
[QUOTE="RobW, post: 1276524, member: 166387"] In lieu of a likely modification to TV Setup module, I have devised my own workaround, using SQL. Here is a quick resume. Should be safe but make sure you have a backup before you try this! Simple scenario to demonstrate. 2 cards both on A/B diseqc switches. In each case A connects to LNB pointed at Satelite 1, and B to Sat 2. Ticking "Create groups for each satellite", scan card 1 to Satellite 1 only. Similarly scan card 2 to satellite 2 only. After the scan, need to map Sat 2 to card 1 and Sat 1 to card 2. Of course, normally you could just copy the missing channels in such a simple arrangement. But this 'hiding channels' illustration is intended to be extrapolated to a more complex case. With MP TV Server setup closed, search for MySQL and open link to command line client – default installed with MP. (If you use MS SQL instead you may have to adapt this according to your knowledge of that DB). Login on with "MediaPortal" (case sensitive) Connect to database with [CODE=sql]use mptvdb;[/CODE] List the groups to get the group IDs [CODE=sql]select * from channelgroup;[/CODE] Let's say the groups IDs MP has constructed from your scan are 5 for satellite 1 and 6 for satellite 2. We now hide all the channels from satellite 1 (Group 5): [CODE=sql]update channel ch inner join groupmap gm on ch.idchannel = gm.idChannel set ch.isTv = 0x0 where gm.idgroup = 5 ;[/CODE] Leaving the MySQL window open, we now open MP TV Server Setup. It will only show TV channels from satellite 2 because we have temporarily marked the channels from satellite 1 as not TV channels. Map all these channels to Card 1 and close setup. We can now reset the TV channels: [CODE=sql]update channel set isTv = 0x1 where isRadio = 0x0 ;[/CODE] This simply goes through the whole dataset and, wherever a channel is not marked as Radio, marks it as TV. Thus all the previously unmarked TV channels are restored. Repeat the temporary channel hiding for group 6 (i.e. change the above line WHERE gm.idgroup = 6) which will only show TV channels from Satellite 1 to map to card 2. Remember to reset all channels again before leaving the MySQL command line. Of course, this is just a simple illustration done the manual way. Clearly it can be scripted. I leave it to anyone needing this to make their own arrangements. In a situation with multiple satellites, you would sequentially hide the TV channels for each satellite group until only the ones you want to map remain. A single reset SQL will then restore status quo for the lot. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
Improvement Suggestions
Sort or restrict channels by group in mapping dialog
Contact us
RSS
Top
Bottom