Skip to content

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.

…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.
Previously, the description listed the first date for each daily or weekly
recording.
@bennettpeter bennettpeter requested a review from gigem June 1, 2025 19:10
@bennettpeter
Copy link
Member

David Engel should review anything that affects scheduler

@gigem
Copy link
Contributor

gigem commented Jun 1, 2025

I'm deferring to John on this one as he made the change to remove it. As I understand it, the API allows the user to set a desired subtitle and description. Mythfrontend does not. A work around might be to add the date to program.subtitle only when neither record.subtitle nor record.description are set.

@ulmus-scott
Copy link
Contributor Author

@jpoet's change sets an empty description to the date; however, the ProgramInfo constructor mythfrontend uses sets the description equal to the title, so that is never seen if using only the frontend.

m_description = m_title =
QString("%1 (%2)").arg(m_title, QObject::tr("Manual Record"));

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.

3 participants