Radio Channels
#1
Not sure if this is a Myth specific question, but I would like to move my "Music Choice" channels to the Radio Channels section, is this possible?
Reply
#2
The is_audio_service field in the channelscan_channel table on the backend specifies if it's listed as radio channel or not.

This is the SQL query, the addon runs for it:
Code:
SELECT is_audio_service FROM channelscan_channel INNER JOIN channel ON channelscan_channel.service_id=channel.serviceid WHERE channel.chanid = ? ORDER BY channelscan_channel.scanid DESC

You can modify the channel's value in the database for example with the mysql client (or phpmyadmin):
Code:
$ mysql -u root -p mythconverg
mysql> UPDATE channelscan_channel INNER JOIN channel ON channelscan_channel.service_id=channel.serviceid SET is_audio_service=1 WHERE channel.chanid = 5911;

Let me know if that helps!
Reply
#3
The first SQL query links the channel id with the channel scan id? And the second one makes the change? Correct?

I'm having a problem with the first one.

Code:
SELECT `is_audio_service` FROM `channelscan_channel` INNER JOIN `channel` ON `channelscan_channel.service_id=channel.serviceid` WHERE `channel.chanid=?` ORDER BY `channelscan_channel.scanid` DESC

#1054 - Unknown column 'channel.chanid=?' in 'where clause'
Reply
#4
You have to change the the ? with the actual chanid from the `channel` table that you want to change to a radio station.
Reply
#5
EDIT: I think there might be something wrong with my DB. All my serviceid's in the channel table are 0

Using phpMyAdmin, if I search for chanid's >=2799 I get 29 rows returned, which are all my Music Choice channels.

Using that in the SQL query's I get 0 rows returned.
Code:
SELECT is_audio_service FROM channelscan_channel INNER JOIN channel ON channelscan_channel.service_id=channel.serviceid WHERE channel.chanid >= 2799 ORDER BY channelscan_channel.scanid DESC
MySQL returned an empty result set (i.e. zero rows). ( Query took 0.0003 sec )

Code:
SELECT is_audio_service FROM channelscan_channel INNER JOIN channel ON channelscan_channel.service_id=channel.serviceid WHERE channel.chanid = 2799 ORDER BY channelscan_channel.scanid DESC
MySQL returned an empty result set (i.e. zero rows). ( Query took 0.0002 sec )

Code:
UPDATE channelscan_channel INNER JOIN channel ON channelscan_channel.service_id=channel.serviceid SET is_audio_service=1 WHERE channel.chanid >= 2799;
0 rows affected. ( Query took 0.0248 sec )

Code:
UPDATE channelscan_channel INNER JOIN channel ON channelscan_channel.service_id=channel.serviceid SET is_audio_service=1 WHERE channel.chanid = 2799;
0 rows affected. ( Query took 0.0013 sec )
Reply
#6
OK, then the info got lost somewhere. You could either rescan the channels or add the rows manually to channelscan_channel.
Or maybe anyone could export them for you. (myself I don't have them unfortunately)
Reply
#7
Morning

This doesnt seem to be working for me either. I always got zero found. I then started looking at the channelscan_channel:

mysql> select * from channelscan_channel;
Empty set (0.00 sec)

mysql> select * from channelscan;
Empty set (0.00 sec)

So its empty. Not 4 days ago i redownloaded my channel list from schedules direct and redid them. I have bellTV and maybe they are not marked "Radio" these Galaxie channels. Would be nice to somehow have them separated out like this is trying to do Smile
Reply
#8
(2013-02-09, 18:23)wyild1 Wrote: Morning

This doesnt seem to be working for me either. I always got zero found. I then started looking at the channelscan_channel:

mysql> select * from channelscan_channel;
Empty set (0.00 sec)

mysql> select * from channelscan;
Empty set (0.00 sec)

So its empty. Not 4 days ago i redownloaded my channel list from schedules direct and redid them. I have bellTV and maybe they are not marked "Radio" these Galaxie channels. Would be nice to somehow have them separated out like this is trying to do Smile

I'm not done with mine yet, but what I've done far.

Backed up my DB.

Went through and cleaned up my DB. (removed old front ends, movie and music tables that I no longer use)

I removed, all the capture cards, video sources, and input connections.

Then re-added my tuners, video sources and redid the input connections.

Re-ran the SQL query and noticed something odd, everything from my HDHR-CC was is_audio_service=1 and everything from my HDHR-US was is_audio_service=0
I changed everything to is_audio_service=0 and then ran this query.
Code:
SELECT is_audio_service FROM channelscan_channel INNER JOIN channel ON channelscan_channel.service_id=channel.serviceid WHERE channel.chanid >= 3799 ORDER BY channelscan_channel.scanid DESC

Interesting thing happened, everything on my HDHR-CC was is_audio_service=1 again. So, I reset it and tried manually just changing one channel, no go. I get an error that...
Code:
Error
SQL query:

UPDATE  `` SET  `is_audio_service` =  '1' WHERE `channelscan_channel`.`is_audio_service` =0 LIMIT 1

MySQL said:

#1103 - Incorrect table name ''
Reply
#9
You're query lacks the table name.
This should update one entry with a given chanid:

UPDATE channelscan_channel INNER JOIN channel ON channelscan_channel.service_id=channel.serviceid SET is_audio_service=1 WHERE channel.chanid = 5911;

Did you run it in phpmyadmin?
Reply
#10
(2013-02-09, 20:04)cfetzer Wrote: You're query lacks the table name.
This should update one entry with a given chanid:

UPDATE channelscan_channel INNER JOIN channel ON channelscan_channel.service_id=channel.serviceid SET is_audio_service=1 WHERE channel.chanid = 5911;

Did you run it in phpmyadmin?

Yes, I'm using phpMyAdmin. I ran the first query
Code:
SELECT is_audio_service FROM channelscan_channel INNER JOIN channel ON channelscan_channel.service_id=channel.serviceid WHERE channel.chanid = 3799 ORDER BY channelscan_channel.scanid DESC

It returns 1 row, I used both inline edit and regular edit to the is_audio_service column. Both return the same result that I posted.

If I run the query
Code:
UPDATE channelscan_channel INNER JOIN channel ON channelscan_channel.service_id=channel.serviceid SET is_audio_service=1 WHERE channel.chanid = 3799;
It will change is_audio_service to 1 on all channels for my HDHR-CC
Reply
#11
Does this work?

SELECT serviceid FROM channel WHERE channel.chanid = 3799

and remember the service id

SELECT * FROM channelscan_channel WHERE service_id = <service id from above>

how many rows do you see?

To update:
UPDATE channelscan_channel SET is_audio_service=1 WHERE service_id = <service id from above>
Reply
#12
It returns 1 row. I ran this in mysql incase there was a bug in phpMyAdmin.

Code:
mysql> SELECT serviceid FROM channel WHERE channel.chanid = 3799;
+-----------+
| serviceid |
+-----------+
|         0 |
+-----------+
1 row in set (0.00 sec)

Code:
mysql> SELECT * FROM channelscan_channel WHERE service_id = 0;
+-------------+--------+----------+-----------+------------+----------+--------------+----------+------------+--------------------+--------------------+------------------+--------+-----------------+--------+------+----------+---------+----------+----------+---------------+----------+------------+-------+-------------+------------------+--------+--------+--------+--------+--------+--------------+-----------------+------------------+--------------+--------------------+-------------------+-------------------+
| transportid | scanid | mplex_id | source_id | channel_id | callsign | service_name | chan_num | service_id | atsc_major_channel | atsc_minor_channel | use_on_air_guide | hidden | hidden_in_guide | freqid | icon | tvformat | xmltvid | pat_tsid | vct_tsid | vct_chan_tsid | sdt_tsid | orig_netid | netid | si_standard | in_channels_conf | in_pat | in_pmt | in_vct | in_nit | in_sdt | is_encrypted | is_data_service | is_audio_service | is_opencable | could_be_opencable | decryption_status | default_authority |
+-------------+--------+----------+-----------+------------+----------+--------------+----------+------------+--------------------+--------------------+------------------+--------+-----------------+--------+------+----------+---------+----------+----------+---------------+----------+------------+-------+-------------+------------------+--------+--------+--------+--------+--------+--------------+-----------------+------------------+--------------+--------------------+-------------------+-------------------+
|         335 |      4 |        0 |         1 |          0 |          |              |          |          0 |                  0 |                  0 |                1 |      0 |               0 | 74     |      |          |         |        0 |    11212 |             0 |        0 |          0 |     0 | atsc        |                0 |      0 |      0 |      1 |      0 |      0 |            0 |               0 |                0 |            0 |                  0 |                 0 |                   |
+-------------+--------+----------+-----------+------------+----------+--------------+----------+------------+--------------------+--------------------+------------------+--------+-----------------+--------+------+----------+---------+----------+----------+---------------+----------+------------+-------+-------------+------------------+--------+--------+--------+--------+--------+--------------+-----------------+------------------+--------------+--------------------+-------------------+-------------------+
1 row in set (0.00 sec)


Code:
mysql> UPDATE channelscan_channel SET is_audio_service=1 WHERE service_id = 0;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

Should the service_id should be unique per channel?

EDIT: I forgot to add, that it changed is_audio_service=1 on everything again.

Code:
mysql> SELECT * FROM channelscan_channel WHERE is_audio_service = 1;
+-------------+--------+----------+-----------+------------+------------+--------------+----------+------------+--------------------+--------------------+------------------+--------+-----------------+--------+------+----------+---------+----------+----------+---------------+----------+------------+-------+-------------+------------------+--------+--------+--------+--------+--------+--------------+-----------------+------------------+--------------+--------------------+-------------------+-------------------+
| transportid | scanid | mplex_id | source_id | channel_id | callsign   | service_name | chan_num | service_id | atsc_major_channel | atsc_minor_channel | use_on_air_guide | hidden | hidden_in_guide | freqid | icon | tvformat | xmltvid | pat_tsid | vct_tsid | vct_chan_tsid | sdt_tsid | orig_netid | netid | si_standard | in_channels_conf | in_pat | in_pmt | in_vct | in_nit | in_sdt | is_encrypted | is_data_service | is_audio_service | is_opencable | could_be_opencable | decryption_status | default_authority |
+-------------+--------+----------+-----------+------------+------------+--------------+----------+------------+--------------------+--------------------+------------------+--------+-----------------+--------+------+----------+---------+----------+----------+---------------+----------+------------+-------+-------------+------------------+--------+--------+--------+--------+--------+--------------+-----------------+------------------+--------------+--------------------+-------------------+-------------------+
|         238 |      3 |        0 |         1 |          0 | ADVTC1_457 | ADVTC1_457   |          |      63264 |                  0 |                  0 |                1 |      0 |               0 | 2      |      |          |         |        1 |        0 |             0 |        1 |          1 |     0 | dvb         |                0 |      1 |      1 |      0 |      0 |      1 |            0 |               0 |                1 |            0 |                  0 |                 0 |                   |
|         238 |      3 |        0 |         1 |          0 | ADVTC3_457 | ADVTC3_457   |          |      63266 |                  0 |                  0 |                1 |      0 |               0 | 2      |      |          |         |        1 |        0 |             0 |        1 |          1 |     0 | dvb         |                0 |      1 |      1 |      0 |      0 |      1 |            0 |               0 |                1 |            0 |                  0 |                 0 |                   |
|         238 |      3 |        0 |         1 |          0 | ADVTC4_457 | ADVTC4_457   |          |      63267 |                  0 |                  0 |                1 |      0 |               0 | 2      |      |          |         |        1 |        0 |             0 |        1 |          1 |     0 | dvb         |                0 |      1 |      1 |      0 |      0 |      1 |            0 |               0 |                1 |            0 |                  0 |                 0 |                   |
|         238 |      3 |        0 |         1 |          0 | ADVTC5_457 | ADVTC5_457   |          |      63268 |                  0 |                  0 |                1 |      0 |               0 | 2      |      |          |         |        1 |        0 |             0 |        1 |          1 |     0 | dvb         |                0 |      1 |      1 |      0 |      0 |      1 |            0 |               0 |                1 |            0 |                  0 |                 0 |                   |
|         335 |      4 |        0 |         1 |          0 |            |              |          |          0 |                  0 |                  0 |                1 |      0 |               0 | 74     |      |          |         |        0 |    11212 |             0 |        0 |          0 |     0 | atsc        |                0 |      0 |      0 |      1 |      0 |      0 |            0 |               0 |                1 |            0 |                  0 |                 0 |                   |
+-------------+--------+----------+-----------+------------+------------+--------------+----------+------------+--------------------+--------------------+------------------+--------+-----------------+--------+------+----------+---------+----------+----------+---------------+----------+------------+-------+-------------+------------------+--------+--------+--------+--------+--------+--------------+-----------------+------------------+--------------+--------------------+-------------------+-------------------+
5 rows in set (0.00 sec)
Reply
#13
Hm I see, your service id is 0. So maybe the current approach in the addon isn't really working for atsc. (or your specific tv provider)
Here in DVB area, we usually have different service ids for each channel.
It could work if you duplicate the one and only row, set the service id to an unique value and is_audio_service.
Then you would need to update the serviceid field in the channel table for your music channels.
But this might easily break those channels, so cause troubles in mythbackend.

So, sorry, but I fear what you want to achieve it's not really possible for now.
Reply
#14
Well, thank you for all your effort, it has taught me a lot about how the DB for Myth works.
Reply

Logout Mark Read Team Forum Stats Members Help
Radio Channels0