[mythtv-users] how do I list previously recorded shows?
Michael T. Dean
mtdean at thirdcontact.com
Fri Sep 4 05:16:22 UTC 2009
Please fix your mail client. I have no idea what's going on, but it's
making it /extremely/ difficult to reply to your messages. I've had to
reformat every single message to which I replied. Also, your selecting
your own messages and clicking reply, and not to the messages which
contain the questions/information to which you're replying, makes it
very difficult to follow the flow of the thread--especially since you're
not trimming the old garbage (which I understand that GMail hides from
you)--and cuts out my name, so your mails aren't highlighted in my
client, so I have to watch for them manually.
On 09/04/2009 12:16 AM, Paul - subscriptions wrote:
> I see two shows (different subtitles) which have the same
> "Programid" is that normal
Nope.
>
> ====
>
> mysql> SELECT starttime, title, subtitle, programid FROM program WHERE
> title =
> -> 'City Homicide';
>
...
> | 2009-09-07 20:30:00 | City Homicide | The Confession | EP341898163 |
...
> mysql> SELECT starttime, title, subtitle, programid FROM oldrecorded WHERE
> -> title = 'City Homicide';
...
> | 2008-10-27 20:30:00 | City Homicide | Serious
> Men | EP003418981111 |
>
...
> | 2009-03-15 20:30:00 | City Homicide | The Cutting
> Edge | EP341898163 |
>
...
> ===
> Programid=EP341898163
> where does this value come from ?
> see above...
The programid is provided by your listings provider. It is /the/
authoritative identifier of episodes. Therefore, if 2 episodes have the
same programid, they are definitely the same episode.
However, the problem you have is likely hinted at in the above values.
Notice that all of the programid's shown from your program table are EP
followed by 9 digits--making a total length of 11 characters. One of
the values in oldrecorded is also 11 characters--this being the
programid for "The Cutting Edge" that's telling Myth that you've already
recorded the upcoming episode "The Confession". However, other
programid's in oldrecorded, such as the one for "Serious Men", is EP
followed by 12 digits. (Though your e-mail would make me think you
would use some other listings provider, these look like Schedules Direct
programid's. I'm guessing that you are using Schedules Direct--if not,
you may need to fix the "fixup" at the bottom.)
My guess is that your program table definition is corrupt--your
programid column is defined as VARCHAR(11) rather than VARCHAR(40).
That means that all of the 14-character programid's get truncated, so
you end up with dups due to invalid data. You can see if this is the
case with:
mysql -umythtv -p mythconverg -e "DESC program;"
How can your programid table definition get corrupted--it's almost
always due to character encoding. I.e. someone or something converted
your program.programid column to UTF-8 and didn't do it correctly.
(I.e. when switching from a distro with a properly-configured MySQL
server to one without or vice versa or when using some tool to
"optimize" your database or ...)
At this point--knowing that at least part of the schema is broken--I
wouldn't trust /any/ of the rest of the schema or even the data in the
database, so I recommend starting over. You can probably save your
recording rules and recording history with the approach described below,
but saving anything else is likely to
Do a full backup of your broken database (
http://www.mythtv.org/wiki/Database_Backup_and_Restore ), then drop the
database and then run mc.sql (
http://www.mythtv.org/wiki/Database_Backup_and_Restore#Database_Restore
), then start mythtv-setup and exit and do a partial restore of the
database (
http://www.mythtv.org/wiki/Database_Backup_and_Restore#Partial_restore_of_a_backup
). Then, erase all your broken oldrecorded.programid values:
mysql -umythtv -p mythconverg -e "UPDATE oldrecorded "\
"SET programid = '' WHERE REGEXP('..[[:digit:]]{1,13}');"
Then start mythtv-setup and configure your system, again.
If you have questions, you can usually find me here or on IRC (sphery).
Mike
More information about the mythtv-users
mailing list