Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Making MythTV Mind Midnights [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9824
Location: almost Mile High in the USA

PostPosted: Sat Nov 16, 2019 1:09 am    Post subject: Making MythTV Mind Midnights [SOLVED] Reply with quote

Any MythTV experts here?

I wonder if it's possible to make a recording schedule if there are two showings of the same program every day. Say there's also no metadata that can be matched to see if it's the same program.

The problem is that there are two showings per day, say, one is at 6PM. However there's a second showing at 1AM.

Ideally I could record just one per day, what I'm worried about is that the first one per day is technically at 1AM if the day starts at 12AM midnight. However this showing is actually the second per day and ... well it would miss the 6PM showing, which is truly the first showing. What I would like to see is that if it can record, record the 6PM showing first so when I inspect the machine at 9PM, if it could record, it got that one, NOT the one from 1AM.

If however it couldn't or failed to record at 6PM due to conflict of higher priority, then go ahead and record the one at 1AM -- but also (try to) record the next 6PM showing that day.

Capisce?

The simple workaround is just record both of course, but that would be a waste of disk space and increases disk churn...

Not sure how this could be overlooked, or maybe I'm missing something?

---

Was able to finally get it work properly, thanks Hu. Yes it requires Custom Record and does some SQL trickery, especially due to also dealing with the local translators... Barring the translators issue, the custom record rule:
Code:
program.title='my program' and not exists (select subtitle from recorded where title='my program' and timediff(utc_timestamp(),starttime) < '12:00:00')

finally worked (needed program.title instead of title...) Now the other problem with the translator was another problem to be dealt with later...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?


Last edited by eccerr0r on Sat May 15, 2021 1:59 am; edited 2 times in total
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22639

PostPosted: Sat Nov 16, 2019 6:45 pm    Post subject: Reply with quote

For recording one copy of a program titled 'my program' if there are two instances of the same episode per day less than 12 hours apart but there is no normal way for Myth to detect the duplicate episodes:

1. create a power recording rule
2. select 'any time on any channel'
3. in the 'Search Phrase' box, enter:
Code:
        title='my program' and
        not exists (select subtitle from recorded where title='my program'
        and timediff(utc_timestamp(),starttime) < '12:00:00')

If the first instance records, the subselect will return a value and the not exists will be false when trying to schedule the second instance. If the first instance does not record, the not exists will be true and the second should record.

Notes:

1. Both instances will likely show in upcoming recordings until the first instance has completed.
2. This is based on the documentation but has not been tested.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9824
Location: almost Mile High in the USA

PostPosted: Sat Nov 16, 2019 7:08 pm    Post subject: Reply with quote

Ah cool, thanks, need to try that, though my sql (not MySQL) is weak.

Lately been trying to muck with my channel MySQL table which has gotten really corrupt over the years, so learning some sql from there, but this is interesting. I still can't figure out exactly when the sql gets executed - during scheduling (which doesn't seem to happen consistently as far as I can tell) or at every event?
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum