How to create a Manual Time/Channel based recording job

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!

I fixed the typo for future reference. Sorry about the colon.

I'm still trying to set up a manual recording but I'me having an issue I can't seem to figure out. I get an {"error":"invalid job"} message when I run the CURL command. The Channels log shows the following error:

2021/11/24 05:33:40.935819 invalid character 'â' looking for beginning of value

My json file looks like this:

{
"Name": “recording name”,
"Time": 2016300140,
"Duration": 3600,
"Channels": [“6000”],
"Airing": {
"Source": "manual",
"Channel": “6000”,
"Time": 2016300140,
"Duration": 3600,
"Title": “recording name”,
"Summary": "recording description (optional)”,
"Image": "https://tmsimg.fancybits.co/assets/p9467679_st_h6_aa.jpg",
"Raw": ""
}
}

Any ideas?

--Chris

I see some curly or “smart” quotes in there (“” vs ""). You may want to consider using a text editor that doesn't insert them automatically (or disable this feature).

Thank you @nriley that was it. I cut and pasted JSON from another place and did not see the curly quotes. I was wondering why my syntax coloring on my text editor was not working. That explains it. Much appreciated.

1 Like

I know this is an old thread but I would love to see your Automator action for the manual recordings.

The automator workflow has just one action in it - to run an AppleScript. The AppleScript has a few lines at the top that you will need to edit:

  • property DVRAddress : the IP address of your Channels server
  • property DateFormat : the date format you want to use to input dates / times
  • property MinsBefore : the number of minutes to add before the start of the recording
  • property MinsAfter : the number of minutes to add after the end of the recording
  • property RecImage : the URL of the image to be used for the recording in the library

The date format is currently set to a UK 24-hour format (%d/%m/%Y %H:%M %Z). There are a couple of examples in there that you can use instead for a US 12 or 24-hour clock.

When run, the script will ask you for:

  • a title for the recording
  • the channel number
  • the start date / time (inc. time zone), according to the chosen date / time format
  • the recording duration in hours / minutes (the script will add on the minutes before / after)
  • a final confirmation of the scheduled recording

I've zipped the workflow file, but should work fine once extracted. The download link is: Dropbox - Channels Manual Record (Workflow).zip - Simplify your life

Let me know if you have any questions!

2 Likes

This worked perfectly! Thanks so much.

1 Like