Working on how to re-schedule recordings (jobs/rules) that failed (Delayed/Interrupted).
I'm sure the devs will beat me to it as I'm not a dev and it doesn't look easy.
But manually fixing those are a P.I.T.A. so I have some motivation until I run out of steam...
I'm so happy someone finally figured this, I always struggled to make web request listening to discover what has to be in POST request payload.
@chDVRuser send me a message if you still are motivated maybe I can help with development
Also, I have to convert @racameron script to bash or better zsh. There is no need for POSIX in 2020s unless you have big IBM Mainframe in your room.
if there is no bash/zsh on server you simply install it. I would be surprised if one haden't, good shell with modern features is a must-have on Linux and MacOS systems.
Anyway thanks for something to keep my brain busy during pandemic
Here's what I've been using to create manual recordings.
I do this from a Windows PC on the same network as my Channels DVR Server which runs on a NAS.
Another use for it - I used this today to 'Mark as Recorded' some Series Episodes I already have that my pass wanted to record because it was recorded by Channels DVR before I wiped it and reinstalled, so Channels DVR had no memory of recording it. I just created a manual recording for the episode using its metadata and had it record for 30 seconds on a random channel. I then deleted that recording and now Channels DVR thinks it recorded my episodes (which it actually did a couple years ago, but forgot).
Thanks for reporting this. I've put in a fix for the next build to detect when there's a filename conflict and pick a different file name.
On the back of an issue with UK guide data (UK Guide data about to run out?) and repeated questions from my wife as to how she could schedule recordings without the guide data, I decided to wrap the script from @racameron in a Mac Automator workflow so that she could use it.
It's not particularly elegant from a UI perspective as Automator only lets you get one data entry element at a time, and it doesn't do any error checking, but at least it lets her enter the data in a standard format, does the duration calculation, and adds on the before / after padding automatically.
Happy to share it or post it somewhere if anyone else wants to try it out on their Mac.
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
}
Thank you.
With v2021.05.14.0010, I believe the payload for curl doesn't need to contain Raw anymore.
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.
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},
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.
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.
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.