[mythtv-users] Join DB table recordedprogram to recorded

Nicolas Krzywinski myth at site7even.de
Tue Dec 30 00:16:07 UTC 2014


Am 28.12.2014, 23:34 Uhr, schrieb <mythtv-users-request at mythtv.org>:

> Message: 3
> Date: Sun, 28 Dec 2014 11:09:41 -0800
> From: Karl Newman <newmank1 at asme.org>
> To: Discussion about MythTV <mythtv-users at mythtv.org>
> Subject: Re: [mythtv-users] Join DB table recordedprogram to recorded
> Message-ID:
> 	<CAOOwNtLie-JmjX4ujfS2CA9zcyQ13TPR2YNZpoHcgai56J7T3g at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
> On Sun, Dec 28, 2014 at 10:16 AM, Nicolas Krzywinski <myth at site7even.de>
> wrote:
>
>> Hello,
>>
>> I just found out that the database table's fields
>> recordedprogram.starttime and recorded.starttime does not qualify for
>> joining, as it is documented in the wiki: http://www.mythtv.org/wiki/
>> Recordedprogram_table.
>> Whereas recorded.starttime seems to represent the real start of  
>> recording,
>> recordedprogram.starttime seems to tell the original start of the  
>> broadcast.
>>
>> Instead, recordedprogram.title = recorded.title and
>> recordedprogram.subtitle = recorded.subtitle seem to be suitable for
>> joining the tables (additionally to chanid, of course).
>>
>> Am I right with using these?
>>
>> I think programid might be a better one to join on. This assumes your
> listing source generates unique programid's but I think that's true for
> all? grabbers. I suppose if you have more than one recording of the same
> program (or multiple generic programs) then that may not be a unique  
> join,
> though... Ah, maybe you want recorded.progstart joined to
> recordedprogram.starttime. I think the wiki needs a nudge there.
> Karl

Am 28.12.2014, 23:34 Uhr, schrieb <mythtv-users-request at mythtv.org>:

> Message: 5
> Date: Sun, 28 Dec 2014 20:37:58 +0100
> From: Hika van den Hoven <hikavdh at gmail.com>
> To: Discussion about MythTV <mythtv-users at mythtv.org>
> Subject: Re: [mythtv-users] Join DB table recordedprogram to recorded
> Message-ID: <1775390049.20141228203758 at gmail.com>
> Content-Type: text/plain; charset=us-ascii
> Hoi Nicolas,
> Sunday, December 28, 2014, 7:16:11 PM, you wrote:
>
> starttime in recordedprogram matches with progstart in recorded, which
> is the start of the program, not the recording.
> chanid and starttime are the unique index keys in recorded, so any
> search on them will be faster. but chanid and progstart will also
> produce an unique key.
> Tot mails,
>   Hika

Thanks guys, will try progstart!


Am 29.12.2014, 13:00 Uhr, schrieb <mythtv-users-request at mythtv.org>:

> Message: 9
> Date: Sun, 28 Dec 2014 21:00:42 -0500
> From: George Nassas <gnassas at mac.com>
> To: Discussion about MythTV <mythtv-users at mythtv.org>
> Subject: Re: [mythtv-users] Join DB table recordedprogram to recorded
> Message-ID: <21EB5177-E27C-49D4-9FE6-39A8B354A3DC at mac.com>
> Content-Type: text/plain; charset=utf-8
> On Dec 28, 2014, at 1:16 PM, Nicolas Krzywinski <myth at site7even.de>  
> wrote:
>
> Not all recordings have a subtitle so in that case you?d get an outer  
> join of every record with a matching title and chanid. Even if you have  
> subtitles you might have several recordings of an episode so you?re back  
> to outer joining. The only reliable way to join is over their primary  
> keys which are chanid and starttime.
> That said, it?s curious why recordedprogram has entries which aren?t in  
> recorded. I just checked my db and that?s true for me too. Given that  
> recordedprogram is defined as an adjunct to recorded there should never  
> be rows there without matching recorded rows.
> Maybe there?s a good explanation or maybe you?ve uncovered a bug.
> - George
> P.S. This will change in the next release as recorded.recordedid is  
> replacing chanid/starttime as the way to reference recordings. Not a  
> moment too soon!
This is good to know, thank you. The hints above to the progstart field  
will solve the joining issues, I assume. Will try this tomorrow.


-- 
Erstellt mit Operas E-Mail-Modul: http://www.opera.com/mail/


More information about the mythtv-users mailing list