Hi, I somehow solved the problem. It is not a great solution but it will do.
I used the htsp library provided with tvheadend at lib/py/tvh
Use the attached tvh.tar.gz
you need python to run the script
/path/to/create_dvr.py channelName/ID Title StartTime StopTime weekDays
channelName/ID : channel Name or its Id
Title : Title of the recording
StartTime : Start Time in 24:00
StopTime : Start Time in 24:00
Weekdays :
U Sunday
M Monday
T Tuesday
W Wednesday
R Thursday
F Friday
S Saturday
example:
./create_dvr.py "Al Majd Scientific Channel" Otrooja 14:00 14:30 UMTWRS
or
./create_dvr.py 387 Otrooja 14:00 14:30 UMTWRS
ToDo:
Modify create_dvr.py:
change user to any tvheadend user
keep passwd empty otherwise it will create an error when adding a dvr
Change/add channel names in getChannelId and their id.
To make weekly schedule modify weekly_schedule to include all the dvr for the week
To make it automatically added to tvheadend you can use cronjob with weekly_schedule
There is a bug in the htsp python library when trying to use a password with add dvr,
so you need to create any empty user
for the script to run normally but for security,
make the prefix for the user 127.0.0.1/32 and/or your pc Ip address/32.