Manual Recording Feature

Just a simple shell script that I scheduled to run at 2pm every Sunday which scheduled manual recordings for the week on Monday-Friday at 2pm.

I modified that for others I used that ran every hour for 2 days, every week on certain days and times, etc.

#!/bin/sh
# Create 60 minute manual recording on channel 3777 with the Title 'Shepherds Chapel' starting in 24 hours and repeating at the same time every day for 5 days
# No longer using - found EPG source
_CH=3777
_START=$(($(date +%s) + 86400))
_DUR=3600
_TITLE="Shepherds Chapel"
_DESC="Shepherds Chapel 2PM weekday recording"

for _DAYNUMBER in 1 2 3 4 5
do
scheduled_job() {
cat << EOF
{
   "Name": "${_TITLE}",
   "Time": ${_START},
   "Duration": ${_DUR},
   "Channels": ["${_CH}"],
   "Airing": {
      "Source": "manual",
      "Channel": "${_CH}",
      "Time": ${_START},
      "Duration": ${_DUR},
      "Title": "${_TITLE}",
      "Summary": "${_DESC} ${_DAYNUMBER}",
      "Image": "http://192.168.1.4:8189/dvr/uploads/3/content",
      "SeriesID": "manual/3777"
   }
}
EOF
}
curl -XPOST http://192.168.1.4:8189/dvr/jobs/new --data-binary "$(scheduled_job)"
# increment _START value by a day
_START=$(($_START + 86400))
done

To give credit, I borrowed this script from racameron and modified it.

Thank you for the explanation and the example.
This is a very special use case.

Very interesting. :thinking: :slightly_smiling_face:

I'm an living edge case!
Here's one where I was trying to schedule recording the "Curious Moment" on the Curiosity channel.

#!/bin/sh
# Create 10.5 minute manual recordings every hour for one week, beginning at _START
_TITLE="Curiosity Moment"
# Start at Sunday, November 26, 2023 12:49:30 AM GMT-08:00
_START=1700988570
# Duration 10 minutes and 30 seconds
_DUR=630
# Frndly 9031 Curiosity channel
_CH=9031
_DESCR="Curiosity Moment"
_SERIESID="manual/9031"
# Every day of the week
for _DAYNAME in SUN MON TUE WED THU FRI SAT
do
# Every hour from 12:49:30 AM
for _HOURNUM in 0049 0149 0249 0349 0449 0549 0649 0749 0849 0949 1049 1149 1249 1349 1449 1549 1649 1749 1849 1949 2049 2149 2249 2349
do
# wait 0.7 seconds between POSTS
sleep 0.7
scheduled_job() {
cat << EOF
{
   "Name": "${_TITLE} ${_DAYNAME} at ${_HOURNUM}",
   "Time": ${_START},
   "Duration": ${_DUR},
   "Channels": ["${_CH}"],
   "Airing": {
      "Source": "manual",
      "Channel": "${_CH}",
      "Time": ${_START},
      "Duration": ${_DUR},
      "Title": "${_TITLE}",
      "Summary": "${_DESCR} ${_DAYNAME} at ${_HOURNUM}",
      "SeriesID": "${_SERIESID}"
   }
}
EOF
}
curl -XPOST http://192.168.1.4:8389/dvr/jobs/new --data-binary "$(scheduled_job)"
# increment _START value by 60 minutes
_START=$(($_START + 3600))
done
done

That gave me enough to edit and create an Imported Video Channel.

Another one off example trying to get a 4K recording from FS1

#!/bin/sh
# Create 30 second manual recordings every minute, beginning at _START
_TITLE="FS1-6197 30 second 4K Test recording Thu 10/19"
_START=1697758200
_DUR=30
_CH=6197
_SERIESID="manual/6197"
for _HOURNUM in 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710
do
# wait 1 seconds between POSTS
sleep 1
scheduled_job() {
cat << EOF
{
   "Name": "${_TITLE}",
   "Time": ${_START},
   "Duration": ${_DUR},
   "Channels": ["${_CH}"],
   "Airing": {
      "Source": "manual",
      "Channel": "${_CH}",
      "Time": ${_START},
      "Duration": ${_DUR},
      "Title": "${_TITLE} at ${_HOURNUM}",
      "Summary": "${_TITLE} at ${_HOURNUM}",
      "SeriesID": "${_SERIESID}"
   }
}
EOF
}
curl -XPOST http://192.168.1.4:8289/dvr/jobs/new --data-binary "$(scheduled_job)"
# increment _START value by a minute
_START=$(($_START + 60))
done

Here is my problem: I could not find any documentation of what goes in the time parameter of the advanced pass. Based on what I entered, I either has no recordings or dozens which were not the right time.

What is the correct format for Today at 10:00pm? Because entering that in the advanced pass did NOT work.

BTW.....Where is the documentation of what should be entered in the fields of the advanced pass?

Use Case Example:

Multiple times the published schedule does not match the actual broadcast for later that day. (Yesterday for example.) If you hear the schedule has changed and you want to record something, you should not have to be forced to learn JSON to create a simple one-time recording.

Based on the user created GUI's it should be super simple to add a page to the web administration to create a manual recording.

Time CONTAINS Monday 10pm

See this section of the Forum

Official Documentation is here Channels Support — Support Articles and here Knowledge Base - Channels Community

1 Like

Sorry, not finding anything about the format of the time field.

When creating passes:

When using the API to create a manual recording, it is in Epoch time.

I am not using the API. I am using the Advanced Pass feature.

But there is NO documentation on what needs to be entered the in TIME field.

I posted 2 answers. The first was specific to the time formats used in Channels' webUI fields, which is exactly what you asked for. (It does require reading some technical documentation.) The second was about time formatting for manual recordings. (Conveniently, that is also the topic of this thread.)

In your screenshot it shows "Friday 8:00pm" as a placeholder. That is the expected format.

So you could use any day of the week and time combination in the same format:

Monday 10:00pm
Wednesday 3:30pm

See also:

Full list of supported matchers:

I did a short manual recording earlier.

I can see it in DVR > Manage:

It is present on the disk:

All good but...

I don't see it in Library > TV Shows > Recently Added:

This is on the server and I also confirmed the same with a client (visible on the "Recordings" screen only).

Is it normal? Maybe it is. I don't remember if that was mentioned before.

What did you use to create the manual recording?
I normally don't use OliveTin (I use my own scripts), but just tried with OliveTin and it works.




Screenshot 2024-08-10 at 17-21-36 Channels TV Shows
Screenshot 2024-08-10 at 17-21-01 Channels Browse TV Shows

Also works when selecting to record as a Movie


Screenshot 2024-08-10 at 17-28-23 Channels Movies
Screenshot 2024-08-10 at 17-28-55 Channels Browse Movies

Thank you for your reply.

I implemented the functionality in javascript so that it can be used with a Chrome extension right in the browser.
I never got OliveTin to work properly on my Windows machine so I'm trying to create an alternative option.

It is strange that the recording worked but it didn't show up in recently added.

I'm wondering why that is.

Would you mind showing the file details that shows the json attributes (airing data, program ID, etc.)?

Maybe I'm missing something.

I'll have to dig up my old Python script to see if I get the same outcome.

for TV Show this is what OliveTin reports, but I'm assuming that's what it received in response, not what it sent
Standard Output

{
  "ID": "1723335360-ch9003",
  "Name": "Manual Recording",
  "Time": 1723335360,
  "Duration": 360,
  "Channels": ["9003"],
  "Channel": "",
  "DeviceID": "",
  "RuleID": "",
  "Serial": 0,
  "FileID": "",
  "Skipped": false,
  "Failed": false,
  "Dead": false,
  "Error": "",
  "Airing": {
      "Source": "manual",
      "Channel": "9003",
      "Time": 1723335360,
      "Duration": 360,
      "Title": "Manual Recording",
      "Summary": "Manual recording created with OliveTin for Channels",
      "Image": "https://tmsimg.fancybits.co/assets/p9467679_st_h6_aa.jpg",
      "SeriesID": "manual/9003"
  },
  "UpdatedAt": 1723335337765
}

It should have sent this

{
  "Name": "Manual Recording",
  "Time": 1723335360,
  "Duration": 360,
  "Channels": ["9003"],
  "Airing": {
      "Source": "manual",
      "Channel": "9003",
      "Time": 1723335360,
      "Duration": 360,
      "Title": "Manual Recording",
      "Summary": "Manual recording created with OliveTin for Channels",
      "Image": "https://tmsimg.fancybits.co/assets/p9467679_st_h6_aa.jpg",
      "SeriesID": "manual/9003"
  }
}

for Movie this is what OliveTin reports, but I'm assuming that's what it received in response, not what it sent
Standard Output

{
  "ID": "1723336020-ch9003",
  "Name": "Manual Recording",
  "Time": 1723336020,
  "Duration": 360,
  "Channels": ["9003"],
  "Channel": "",
  "DeviceID": "",
  "RuleID": "",
  "Serial": 0,
  "FileID": "",
  "Skipped": false,
  "Failed": false,
  "Dead": false,
  "Error": "",
  "Airing": {
      "Source": "manual",
      "Channel": "9003",
      "Time": 1723336020,
      "Duration": 360,
      "Title": "Manual Recording",
      "Summary": "Movie manually recorded with OliveTin for Channels",
      "Image": "https://tmsimg.fancybits.co/assets/p9467679_st_h6_aa.jpg",
      "Categories": ["Movie"],
      "MovieID": "manual/9003"
  },
  "UpdatedAt": 1723335995678
}

It should have sent this

{
  "Name": "Manual Recording",
  "Time": 1723336020,
  "Duration": 360,
  "Channels": ["9003"],
  "Airing": {
      "Source": "manual",
      "Channel": "9003",
      "Time": 1723336020,
      "Duration": 360,
      "Title": "Manual Recording",
      "Summary": "Movie manually recorded with OliveTin for Channels",
      "Image": "https://tmsimg.fancybits.co/assets/p9467679_st_h6_aa.jpg",
      "Categories": ["Movie"],
      "MovieID": "manual/9003"
  }
}

Thanks. I will compare this with my data and hopefully see where it went wrong for me.

I got it to work. I noticed thanks to the data that you posted, @chDVRuser, that I was missing SeriesID for TV shows, MovieID for movies, as well as Categories.
It makes sense, Channels didn't know what type of program the recording was so it was only showing up in Recordings and nowhere else.

All good now. :slight_smile:

I will continue with the development of my Chrome extension and I will make an announcement whenever it's ready. It will have this manual recording feature among other features. That will be useful for people who don't have OliveTin (like me).

2 Likes

Thank you very much, looking forward to this extension. I looked through all the OliveTin stuff and the only feature I really want is manual recordings so this will be awesome.

Still scratching my head that this basic DVR feature is not part of the channels UI. It's in almost every other DVR that I've seen, and you shouldn't have to muck around with advanced passes to do something as simple as this.

TiVo has a great interface where you can set single manual recording, repeating on certain days, only on weekends etc. That's exactly what we need because as everybody has said you can't always rely on the guide data, or you only want a certain show to record at a certain time etc.

1 Like

Agree (and voted). I previously used TiVo and asked for it to be included in Channels DVR.
After getting tired of waiting, I found a workaround.
I do a lot of workarounds to make Channels DVR work the way I want.
Have to say the devs don't mind you doing the workarounds for things they don't/won't implement.
But that's not going to work for every user that doesn't want to 'tinker' with it.

1 Like