[mythtv-users] Record only shows which don't exist in the video database

Michael T. Dean mtdean at thirdcontact.com
Wed Apr 13 17:50:07 UTC 2011

On 04/13/2011 08:20 AM, Thomas Boehm wrote:
> I try to setup a custom rule which should record movies from certain actors, but only if they don't exist in my video database. The first part is quite easy and works, but I'm struggling with the test whether a movie already exists or not.
> I tried the following
> (... bla bla ...) AND program.title NOT LIKE videometadata.title
> This gives me the following SQL error
> "
> Error:
> There is an error in your custom SQL query:
> Unknown column 'videometadata.title' in 'where clause' [#1054]
> ..."
> Is there a way to do this? Obviously I'm not am SQL expert ;-)

We have a way of adding tables to the join performed during scheduling, 
but since videometadata is completely unrelated to the scheduler stuff, 
you don't need a join.

It might work if you do something like:

...  AND program.title NOT IN (SELECT DISTINCT title FROM videometadata)

However, I don't know what effect the subquery will have on 
performance--and if you have a lot of show titles in MythVideo, it may 
be very slow.


More information about the mythtv-users mailing list