[mythtv-users] Custom rule for rec. show with ":" in title...

Robert Longbottom rongblor at googlemail.com
Sun Apr 3 11:22:47 UTC 2011


On 03/04/2011 11:24, Mike Perkins wrote:
> On 03/04/11 00:47, Thomas Boehm wrote:
>> ----- Original Message -----
>>> Generally, I want to understand why rules with ":" char in string aren't
>>> working for me.
>>
>> Because there is no ":" in the program title. It is just the separator
>> between the title and the subtitle you see in mythweb. It's not really
>> there.
>>
> No? How about 'CSI: Miami' then? There are a number of examples of program
> /titles/ around which do have ":" in them.

However, if you go into mysql, create a dummy table in the test 
database, insert some data that contains a ":" and run a LIKE '%:' query 
then it returns the row.  Which implies that mysql doesn't treat ":" as 
a special character - at least on my mysql installation anyway... (see 
below)

Which implies that either there isn't really a ":" in the program title, 
or something is happening in myth that is treating the ":" in a special 
way...

@the op, you should try going into your database and running a query 
against the program table to see what comes back like this (obviously 
you take responsibility for not accidentally destroying your db while 
doing this):


robert at quad ~ $ mysql -u mythtv -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 263
Server version: 5.1.51 Gentoo Linux mysql-5.1.51

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input 
statement.

mysql> use mythconverg;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> select * from program where title like 'Goscie%';
Empty set (0.00 sec)

mysql> select * from program where title like 'Goscie:%';
Empty set (0.00 sec)

mysql> quit
Bye

Obviously neither return any results on my system, and you'd need to get 
that special character in the query to match the title (luddite English 
here and I have no idea how to type that s with an accent on my keyboard 
:-))

Robert.



robert at quad ~ $ mysql -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 247
Server version: 5.1.51 Gentoo Linux mysql-5.1.51

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input 
statement.

mysql> use test;
Database changed
mysql> create table testtable (data varchar(50));
Query OK, 0 rows affected (0.01 sec)

mysql> insert into testtable values ('Some Show');
Query OK, 1 row affected (0.00 sec)

mysql> insert into testtable value ('Some Show: s1e1');
Query OK, 1 row affected (0.00 sec)

mysql> select * from testtable;
+-----------------+
| data            |
+-----------------+
| Some Show       |
| Some Show: s1e1 |
+-----------------+
2 rows in set (0.00 sec)

mysql> select * from testtable where data like 'Some Show:%';
+-----------------+
| data            |
+-----------------+
| Some Show: s1e1 |
+-----------------+
1 row in set (0.00 sec)

mysql> drop table testtable;
Query OK, 0 rows affected (0.00 sec)




More information about the mythtv-users mailing list