How to create a Manual Time/Channel based recording job

Can someone share an example json entry for a recording that was made manually? I want to make sure it is handled correctly with the upcoming changes in DVR: Performance improvements (v2021.05.13.0008)

I have some I can share, but I want to experiment a little with my script to include optional SeriesIDs to allow for display/grouping in the Library views.

Let me work on that tomorrow and Sat am, and I ought to have a couple to share, along with some additional notes/observations.

You looking for the curl payload or the recording /dvr/files json?
If both, I can create a short manual recording and post them.

The /dvr/files json payload from something that has recorded already.

I had to bail on the manual recording for the TVE channel and redo it using my HDHR Prime channel since my Xfinity TVE failed auth again.

This is using v2021.05.05.0011 if it matters.

curl payload

{
  "Name": "Pool Kings",
  "Time": 1620948540,
  "Duration": 2040,
  "Channels": [
    "204"
  ],
  "Airing": {
    "Source": "manual",
    "Channel": "204",
    "OriginalDate": "2019-07-29",
    "Time": 1620948540,
    "Duration": 2040,
    "Title": "Pool Kings",
    "EpisodeTitle": "Game Time",
    "Summary": "The Pool Kings create a sports pool that will provide entertainment for a client and his children.",
    "Image": "https://tmsimg.fancybits.co/assets/p12848663_b_h9_ai.jpg?w=720&h=540",
    "Categories": [
      "Episode",
      "Series"
    ],
    "Genres": [
      "Reality",
      "House/garden",
      "Home improvement"
    ],
    "Tags": [
      "CC",
      "HD 1080i",
      "HDTV"
    ],
    "SeriesID": "12848663",
    "SeasonNumber": 5,
    "EpisodeNumber": 8,
    "Cast": [
      "Justin Peek",
      "Kyle Peek"
    ],
    "Raw": ""
  }
}

scheduled job /dvr/jobs json

{
  "ID": "1620948540-ch204",
  "Name": "Pool Kings",
  "Time": 1620948540,
  "Duration": 2040,
  "Channels": [
    "204"
  ],
  "Channel": "204",
  "DeviceID": "1323AADB",
  "RuleID": "",
  "Serial": 0,
  "FileID": "3444",
  "Skipped": false,
  "Failed": false,
  "Error": "",
  "Airing": {
    "Source": "manual",
    "Channel": "204",
    "OriginalDate": "2019-07-29",
    "Time": 1620948540,
    "Duration": 2040,
    "Title": "Pool Kings",
    "EpisodeTitle": "Game Time",
    "Summary": "The Pool Kings create a sports pool that will provide entertainment for a client and his children.",
    "Image": "https://tmsimg.fancybits.co/assets/p12848663_b_h9_ai.jpg?w=720&h=540",
    "Categories": [
      "Episode",
      "Series"
    ],
    "Genres": [
      "Reality",
      "House/garden",
      "Home improvement"
    ],
    "Tags": [
      "CC",
      "HD 1080i",
      "HDTV"
    ],
    "SeriesID": "12848663",
    "ProgramID": "",
    "TeamIDs": null,
    "SeasonNumber": 5,
    "EpisodeNumber": 8,
    "Directors": null,
    "Cast": [
      "Justin Peek",
      "Kyle Peek"
    ],
    "Raw": null
  },
  "UpdatedAt": 1620949476959
}

recording /dvr/files json

{
  "ID": "3444",
  "JobID": "1620948540-ch204",
  "RuleID": "",
  "GroupID": "12848663",
  "Path": "TV/Pool Kings/Pool Kings S05E08 2019-07-29 Game Time 2021-05-13-1644.mpg",
  "Checksum": "",
  "CreatedAt": 1620949476,
  "Watched": false,
  "Deleted": false,
  "PlaybackTime": 0,
  "Duration": 1103.476511,
  "Commercials": null,
  "Delayed": true,
  "Corrupted": false,
  "Cancelled": false,
  "Completed": true,
  "Processed": true,
  "Favorited": false,
  "Locked": false,
  "Airing": {
    "Source": "manual",
    "Channel": "204",
    "OriginalDate": "2019-07-29",
    "Time": 1620948540,
    "Duration": 2040,
    "Title": "Pool Kings",
    "EpisodeTitle": "Game Time",
    "Summary": "The Pool Kings create a sports pool that will provide entertainment for a client and his children.",
    "Image": "https://tmsimg.fancybits.co/assets/p12848663_b_h9_ai.jpg?w=720&h=540",
    "Categories": [
      "Episode",
      "Series"
    ],
    "Genres": [
      "Reality",
      "House/garden",
      "Home improvement"
    ],
    "Tags": [
      "CC",
      "HD 1080i",
      "HDTV"
    ],
    "SeriesID": "12848663",
    "ProgramID": "",
    "TeamIDs": null,
    "SeasonNumber": 5,
    "EpisodeNumber": 8,
    "Directors": null,
    "Cast": [
      "Justin Peek",
      "Kyle Peek"
    ],
    "Raw": null
  },
  "ChannelNumber": "204",
  "DeviceID": "1323AADB",
  "PlayedAt": 0,
  "UpdatedAt": 1620950580240,
  "DeletedAt": 0,
  "FavoritedAt": 0,
  "DeletedReason": "",
  "DeleteNow": false,
  "JobTime": 1620948540,
  "JobDuration": 2040,
  "HighestPTS": 0,
  "SignalStats": {
    "SS": {
      "Initial": 94,
      "Last": 94,
      "Min": 94,
      "Max": 95,
      "Sum": 51865,
      "GoodCount": 551,
      "BadCount": 0
    },
    "SNQ": {
      "Initial": 100,
      "Last": 100,
      "Min": 100,
      "Max": 100,
      "Sum": 55100,
      "GoodCount": 551,
      "BadCount": 0
    },
    "SEQ": {
      "Initial": 100,
      "Last": 100,
      "Min": 100,
      "Max": 100,
      "Sum": 55100,
      "GoodCount": 551,
      "BadCount": 0
    },
    "BPS": {
      "Initial": 42112,
      "Last": 2246976,
      "Min": 42112,
      "Max": 2847072,
      "Sum": 1151439840,
      "GoodCount": 551,
      "BadCount": 0
    },
    "PPS": {
      "Initial": 0,
      "Last": 228,
      "Min": 0,
      "Max": 286,
      "Sum": 117647,
      "GoodCount": 550,
      "BadCount": 1
    },
    "TSERR": {
      "Initial": 0,
      "Last": 0,
      "Min": 0,
      "Max": 0,
      "Sum": 0,
      "GoodCount": 551,
      "BadCount": 0
    },
    "NETERR": {
      "Initial": 0,
      "Last": 0,
      "Min": 0,
      "Max": 0,
      "Sum": 0,
      "GoodCount": 551,
      "BadCount": 0
    },
    "Grade": {
      "GoodCount": 551,
      "BadCount": 0
    },
    "NetworkGrade": {
      "GoodCount": 551,
      "BadCount": 0
    },
    "SignalGrade": {
      "GoodCount": 551,
      "BadCount": 0
    }
  },
  "CommercialsAligned": false,
  "CommercialsEdited": false,
  "CommercialsVerified": false,
  "CommercialDetectSource": "",
  "CloudComskip": {
    "Successful": false
  },
  "ImportPath": "",
  "ImportQuery": "",
  "ImportGroup": "",
  "ImportedAt": 0,
  "StreamLinks": null,
  "DeleteScheduledFor": 864000000
}
1 Like

Thank you.

With v2021.05.14.0010, I believe the payload for curl doesn't need to contain Raw anymore.

1 Like

I can verify that.

With v2021.05.05.0011
the curl post returns {"error":"invalid job"}
and the DVR log shows
Key: 'Job.Airing.Source' Error:Field validation for 'Source' failed on the 'required' tag
Key: 'Job.Airing.Channel' Error:Field validation for 'Channel' failed on the 'required' tag
Key: 'Job.Airing.Time' Error:Field validation for 'Time' failed on the 'required' tag
Key: 'Job.Airing.Duration' Error:Field validation for 'Duration' failed on the 'required' tag
Key: 'Job.Airing.Title' Error:Field validation for 'Title' failed on the 'required' tag

After updating to v2021.05.14.0010
the curl post succeeds, returning the scheduled job json

I also verified that including "Raw": "" doesn't cause an error.

1 Like

Here is one of mine.

{
 "Name":"Fox Weekend Dinner",
"Time": 1621116060,
"Duration": 3300,
"Channels": ["6073"],
"Airing": {
"Source": "TV_Data",
"Channel": "6073",
"Time": 1621116060,
"Duration": 3300,
"Title": "Fox Weekend Dinner",
"EpisodeTitle": "Saturday 05/15/21",
"Summary": "",
"Image": "https://tmsimg.fancybits.co/assets/p8529464_b_h9_ag.jpg?w=720\u0026h=540",
"Categories":["Episode","Series"],
"SeriesID":"",
"ProgramID":"",
"SeasonNumber": 2021,
"EpisodeNumber": 135,
"Raw": ""
}}

Here's one from today.

{"ID":"1811","JobID":"1620996975-ch6074","RuleID":"","GroupID":"Episode","Path":"TV\Varney\Varney S2021E134 Friday 051421 2021-05-14-0856.mpg","Checksum":"","CreatedAt":1620996975,"Watched":false,"Deleted":false,"PlaybackTime":7947,"Duration":11063.424,"Commercials":null,"Delayed":false,"Corrupted":false,"Cancelled":false,"Completed":true,"Processed":true,"Favorited":false,"Locked":false,"Airing":{"Source":"TV_Data","Channel":"6074","OriginalDate":"","Time":1620996975,"Duration":11040,"Title":"Varney","EpisodeTitle":"Friday 05/14/21","Summary":"","Image":"https://tmsimg.fancybits.co/assets/p7999086_b_h6_ac.jpg","Categories":["Episode","Series"],"Genres":null,"Tags":null,"SeriesID":"","ProgramID":"","TeamIDs":null,"SeasonNumber":2021,"EpisodeNumber":134,"Directors":null,"Cast":null,"Raw":null},"ChannelNumber":"6074","DeviceID":"TVE-Fubo","PlayedAt":1621007560639,"UpdatedAt":1621008015573,"DeletedAt":0,"FavoritedAt":0,"DeletedReason":"","DeleteNow":false,"JobTime":1620996975,"JobDuration":11040,"HighestPTS":995708891,"SignalStats":null,"CommercialsAligned":false,"CommercialsEdited":false,"CommercialsVerified":false,"CommercialDetectSource":"","CloudComskip":{"Successful":false},"ImportPath":"","ImportQuery":"","ImportGroup":"","ImportedAt":0,"StreamLinks":null},

1 Like

Here is a brief test from earlier:

Payload:

{
  "Name": "Manual Recording",
  "Time": 1621106100,
  "Duration": 300,
  "Channels": ["2.2"],
  "Airing": {
    "Source": "manual",
    "Channel": "2.2",
    "Time": 1621106100,
    "Duration": 300,
    "Title": "Manual Recording",
    "Summary": "Manual recording",
    "SeriesID": "MANUAL",
    "ProgramID": "MAN1621106006",
    "Image": "https://tmsimg.fancybits.co/assets/p9467679_st_h6_aa.jpg"
  }
}

Response:

{
  "ID": "1621106100-ch2.2",
  "Name": "Manual Recording",
  "Time": 1621106100,
  "Duration": 300,
  "Channels": [
    "2.2"
  ],
  "Channel": "",
  "DeviceID": "",
  "RuleID": "",
  "Serial": 0,
  "FileID": "",
  "Skipped": false,
  "Failed": false,
  "Error": "",
  "Airing": {
    "Source": "manual",
    "Channel": "2.2",
    "OriginalDate": "",
    "Time": 1621106100,
    "Duration": 300,
    "Title": "Manual Recording",
    "Summary": "Manual recording",
    "Image": "https://tmsimg.fancybits.co/assets/p9467679_st_h6_aa.jpg",
    "Categories": null,
    "Genres": null,
    "Tags": null,
    "SeriesID": "MANUAL",
    "ProgramID": "MAN1621106006",
    "TeamIDs": null,
    "SeasonNumber": 0,
    "EpisodeNumber": 0,
    "Directors": null,
    "Cast": null,
    "Raw": null
  },
  "UpdatedAt": 1621106006464
}

/dvr/jobs

{
  "ID": "1621106100-ch2.2",
  "Name": "Manual Recording",
  "Time": 1621106100,
  "Duration": 300,
  "Channels": [
    "2.2"
  ],
  "Channel": "2.2",
  "DeviceID": "LOCAST-803",
  "RuleID": "",
  "Serial": 0,
  "FileID": "7971",
  "Skipped": false,
  "Failed": false,
  "Error": "",
  "Airing": {
    "Source": "manual",
    "Channel": "2.2",
    "OriginalDate": "",
    "Time": 1621106100,
    "Duration": 300,
    "Title": "Manual Recording",
    "Summary": "Manual recording",
    "Image": "https://tmsimg.fancybits.co/assets/p9467679_st_h6_aa.jpg",
    "Categories": null,
    "Genres": null,
    "Tags": null,
    "SeriesID": "MANUAL",
    "ProgramID": "MAN1621106006",
    "TeamIDs": null,
    "SeasonNumber": 0,
    "EpisodeNumber": 0,
    "Directors": null,
    "Cast": null,
    "Raw": null
  },
  "UpdatedAt": 1621106100979
}

/dvr/files

{
  "ID": "7971",
  "JobID": "1621106100-ch2.2",
  "RuleID": "",
  "GroupID": "MANUAL",
  "Path": "TV/Manual Recording/Manual Recording 2021-05-15-1215.mpg",
  "Checksum": "",
  "CreatedAt": 1621106100,
  "Watched": false,
  "Deleted": false,
  "PlaybackTime": 0,
  "Duration": 330.058667,
  "Commercials": null,
  "Delayed": false,
  "Corrupted": false,
  "Cancelled": false,
  "Completed": true,
  "Processed": true,
  "Favorited": false,
  "Locked": false,
  "Airing": {
    "Source": "manual",
    "Channel": "2.2",
    "OriginalDate": "",
    "Time": 1621106100,
    "Duration": 300,
    "Title": "Manual Recording",
    "Summary": "Manual recording",
    "Image": "https://tmsimg.fancybits.co/assets/p9467679_st_h6_aa.jpg",
    "Categories": null,
    "Genres": null,
    "Tags": null,
    "SeriesID": "MANUAL",
    "ProgramID": "MAN1621106006",
    "TeamIDs": null,
    "SeasonNumber": 0,
    "EpisodeNumber": 0,
    "Directors": null,
    "Cast": null,
    "Raw": null
  },
  "ChannelNumber": "2.2",
  "DeviceID": "LOCAST-803",
  "PlayedAt": 0,
  "UpdatedAt": 1621106400386,
  "DeletedAt": 0,
  "FavoritedAt": 0,
  "DeletedReason": "",
  "DeleteNow": false,
  "JobTime": 1621106100,
  "JobDuration": 300,
  "HighestPTS": 29769000,
  "SignalStats": null,
  "CommercialsAligned": false,
  "CommercialsEdited": false,
  "CommercialsVerified": false,
  "CommercialDetectSource": "",
  "CloudComskip": {
    "Successful": false
  },
  "ImportPath": "",
  "ImportQuery": "",
  "ImportGroup": "",
  "ImportedAt": 0,
  "StreamLinks": null
}

To test this, I removed the Raw string from the payload, and it indeed schedules and records fine without it.

1 Like

A post was split to a new topic: Need an EPG for custom channel to record

As someone who is completely lost on how to create a manual recording on my windows computer running channels dvr it would be great if someone who does know could put the actual step by step process down like step 1 download this program or open this up on windows, step 2 open and do this, and so on because what is here I'm sure means something to the non technically challenged but for the every day people like me, I'm completely lost on how to do this and I have m3u channels that have no guide data I want to manually setup recordings on. Like I see people saying use curl, what the heck is a curl? Is it a program or ??? Please someone do a set by step for technically challenged like me. Thanks in advance.

1 Like

I'm not going to create a step by step tutorial, but if you know the IP address of your Channels server, can run the command line curl command in a windows command shell and create/edit json files you have everything you need.

Here's a windows cmd file I created. Series Pass by Channel & Time - #7 by chDVRuser so you can use windows explorer to drag and drop the json file you created on the cmd file icon and it schedules the recording. All the necessary info for what goes in the json file is in this thread.

Ok so I guess I was supposed to copy the text? Starting with what? And save it as what because I tried to copy the text from @echo off down to the bottom and change it to my IP and then saved it as a.json file as it was just a guess because I have no idea of what I am supposed to do. I tried to drag it onto an open command prompt and nothing happened. It sucks that Channels won't just put this feature in so people can do manual recordings already because us normal ever day users are lost having to figure out what we are supposed to do.

I have been through exactly what you are going through. I will provide the steps.

Step 1.

You need a program on your machine called CURL. There is an old version that is included with Windows, but I think I got an updated version somewhere on the Internet.

The version I'm using is 7.55.1. I don't know if the old version will work or not.

More to follow.

Step 2.

You have to build a text file with the information on the program you want to record. The file should have a file extension of ".json".

The following is an example of one of my files. It includes a bunch of information that is not required. To know what is not required, you can use trial and error, or look at old posts in this forum.


{
"Name":"My Program Name",
"Time": 1633816860,
"Duration": 3300,
"Channels": ["6073"],
"Airing": {
"Source": "None",
"Channel": "6073",
"Time": 1633816860,
"Duration": 3300,
"Title": "My Program Name",
"EpisodeTitle": "Saturday 10/09/21",
"Summary": "",
"Image": "https://tmsimg.fancybits.co/assets/p8529464_b_h9_ag.jpg?w=720\u0026h=540",
"Categories":["Episode","Series"],
"SeriesID":"",
"ProgramID":"",
"SeasonNumber": 2021,
"EpisodeNumber": 282,
"Raw": ""
}}

Notes:
Time is "Unix Epoch Time" which is the UTC number of seconds from 1/1/1970. Look this up on the internet for any further explanation.

Duration is number of seconds.

Step 3:

You now pass the information to the server using CURL and the file you created with something like this:

Curl -XPOST --data-binary @My_File.json "http://192.168.0.232:8089/dvr/jobs/new"

Replace file name and the IP address of your channels server.

Final question: Do you still want to do this?

No program that you did not write yourself has all the features you would like. The developers decide what features they want to include and (more importantly) what features they want to support.

Channels does not support manual recordings. With most products that would be the end of it, but because the developers and users are willing to provide internal information, it can be done. It all depends on how much you want it and how much time you are willing to put into learning things you never thought you needed to learn.

Channels is not perfect, but it is way better than anything else.

curl is included with Windows 10, just make sure you type curl.exe not just curl

Ok I created a text file putting all the info from the time to the channel and saved it but you didn't say where I was supposed to save the .json file to. I tried c but windows said that I don't have permission to save to c which is the drive windows is on. I tried putting it on the drive that the dvr saves to and I'm not sure how I point to it. I tried downloading curl for windows and it has an excusable called curl.exe but clicking on it does nothing at least nothing I can see. Do you have a place that you know of where I can download it to get it to show? I really want to be able to do manual recordings but after 2 hours of working on it I fear I still no closer to being able to do it. God what I would give for a YouTube video showing in real time how to do manual recording. Oh and I did type curl - - help into windows command prompt and got a return of a bunch of information so I think I do have curl already. You didn't say how I was supposed to get to curl to type in the information so I guessed command prompt. Also I tried typing the string in as you had it in the command prompt Curl:X-POST - - data-binary @My_File.json http:10.0.0.84:8089/dvr/jobs/new
I only had to change the ip as that's where my dvr is running. I named the file the same as what you had so I didn't have to worry about changing it and got curl is not recognized as an internal or external command in the command prompt response

I got it to work! I figured out what was wrong. You had curl: - XPOST the line of what I was supposed to type in and after I removed the : after curl it worked and scheduled the recording. Thank you for your help on this!