Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manual Recordings: restore date time subtitle #643

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ulmus-scott
Copy link
Contributor

Apparently removed in 5f6697e

Checklist

@linuxdude42 linuxdude42 requested a review from jpoet January 21, 2023 17:55
@ulmus-scott
Copy link
Contributor Author

I rebased onto master and did some additional cleanup.

I think an additional RecordingType that allows recording on either weekends or weekdays may be useful and make daily actually be all days:

diff --git a/mythtv/programs/mythbackend/scheduler.cpp b/mythtv/programs/mythbackend/scheduler.cpp
index 69cf223c52..bb3b2c19c9 100644
--- a/mythtv/programs/mythbackend/scheduler.cpp
+++ b/mythtv/programs/mythbackend/scheduler.cpp
@@ -3767,7 +3767,14 @@ void Scheduler::UpdateManuals(uint recordid)
     case kDailyRecord:
         for (int i = 0; i < daysInWeek * weeksToSchedule; i++)
         {
-            if (startDate.dayOfWeek() < 6 && startDate.addDays(offset + i).dayOfWeek() >= 6)
+            startList.push_back(QDateTime(startDate.addDays(offset + i), startTime, Qt::LocalTime).toUTC());
+        }
+        break;
+    case kWeekdayWeekendRecord:
+        for (int i = 0; i < daysInWeek * weeksToSchedule; i++)
+        {
+            if ((startDate.dayOfWeek() <  6 && startDate.addDays(offset + i).dayOfWeek() >= 6) ||
+                (startDate.dayOfWeek() >= 6 && startDate.addDays(offset + i).dayOfWeek() <  6))
             {
                 continue;
             }

but I'm not sure what changes would be required elsewhere.

Previously, the description listed the first date for each daily or weekly
recording.
…given start date

and rewrite the confusing code that calculated the start times.

I thought about adding something to prevent scheduling recordings in the past,
but this function doesn’t have enough information to determine that.

`
if (MythDate::current().toLocalTime().time() > starttime)
{
    offset++;
}
`
The above code would prevent scheduling recordings that should have already
started.  However, the end time may still be in the future, so it should be
scheduled in that case.  Unfortunately, the startdate, starttime, enddate,
and endtime values do not account for starting/ending the recording early/late
(8 hours in either direction from the start and end), so this cannot be
determined from the information the function has.

Therefore, this function will continue to schedule recordings that may be
entirely in the past.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant