Closed richardambridge closed 11 years ago
Yep, I saw this problem in earlier releases too.
I am looking for it.
Addon didn't find the show in program table. So the start time is null. I must review the query and also when no show found then default start time with rec start timestamp. Eh no, record was deleted from the database but rule exists yet. We must use Myth protocol to stop record with "STOP RECORDING" and then delete the rule with "RESCHEDULE RECORDING". If rule exists yet then next record of the same show will not start because the rule exists and is deactivated.
Need a full rework of "DeleteTimer" and "UpdateTimer".
It is not possible to resolve it with the actual code. Because "Timer" instance does not exist yet. To resolve it we must create a proginfo from timer before calling "STOP RECORDING". This functionnality does not exist. My new branch (fixes-6) including "Recording Schedule" structure can support this functionnality by casting "MythTimer" (alias cmyth_recschedule) instance to "MythPrograminfo" (alias cmyth_proginfo). Then we can call the function "cmyth_proginfo_stop_recording()", delete rule from DB, and finally call "cmyth_conn_reschedule_recording()".
I requested to pull changes from my branch "cmyth_refactoring" (fixes-6 was renamed). Now i can start to resolve this issue. So probably soon.
PR #50 could by help to resolve it. No more issue for me.
@richardambridge: I pushed janbar's fixes. Can you please rebuild the addon and try if it works for you?
I have tried the last code.
Its an improvement, but still not working.
Goto EPG Select program, select switch Watch TV Move mouse, menu appears, click on the record button. Popup window indicates: PVR Recording starting.. XYZ 1970-01-01 Stop playback.
EPG now shows all programs on that channel are set to record
Mythbackend shows nothing happening on any encoders. Nothing in recordings or upcoming recordings.
If you exit and then go back in, the 'Currently recording' in LiveTV is now showing Start time 03/12/2012 8:42 AM Lorraine -- 1970-01-01 02:00:00
But nothing is recording
@richardambridge Cannot reproduce. Your end time record is 1970-01-01 02:00:00. Addon receive it from XBMC. Can you post your log with extralog option (setup in addon setting and restart xbmc) please. JLB
-----Original Message----- From: richardambridge notifications@github.com Date: Mon, 03 Dec 2012 00:49:06 To: fetzerch/xbmc-pvr-addonsxbmc-pvr-addons@noreply.github.com Reply-To: fetzerch/xbmc-pvr-addons reply@reply.github.com Cc: Jean-Luc Barrièrejlbarriere68@gmail.com Subject: Re: [xbmc-pvr-addons] Recording a live stream doesn't work (#45)
I have tried the last code.
Its an improvement, but still not working.
Goto EPG Select program, select switch Watch TV Move mouse, menu appears, click on the record button. Popup window indicates: PVR Recording starting.. XYZ 1970-01-01 Stop playback.
EPG now shows all programs on that channel are set to record
Mythbackend shows nothing happening on any encoders. Nothing in recordings or upcoming recordings.
If you exit and then go back in, the 'Currently recording' in LiveTV is now showing Start time 03/12/2012 8:42 AM Lorraine -- 1970-01-01 02:00:00
But nothing is recording
Reply to this email directly or view it on GitHub: https://github.com/fetzerch/xbmc-pvr-addons/issues/45#issuecomment-10945199
Wasn't it so that mythtv got confused if you have tried to delete a recording without the patch? @janbar what was required? cleaning database? / restarting mythbackend?
To cleanup bad things before the patch:
2012/12/3 fetzerch notifications@github.com
Wasn't it so that mythtv got confused if you have tried to delete a recording without the patch? @janbar https://github.com/janbar what was required? cleaning database? / restarting mythbackend?
— Reply to this email directly or view it on GitHubhttps://github.com/fetzerch/xbmc-pvr-addons/issues/45#issuecomment-10966534.
The above sql was slightly wrong, it should be startdate not starttime, otherwise it would have deleted all my recordings.
I deleted the rows that had startdate of 1970
Did same again. EPG, select item from channel, switch, while viewing move mouse, hit rec button.
Log here: http://pastebin.com/7RpdCBFa
Afterwards, mythtv has a new entry in record:
mysql> select * from record where unix_timestamp(startdate)<100000; +----------+------+--------+-----------+------------+----------+------------+-----------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------+--------+---------+----------+---------+-------------+------------+-------------+-----------+-------------+-----------+----------+-----------+-------+---------+----------+-----------+---------+--------+---------------+--------------+--------------+--------------+--------------+--------------+--------------+---------+----------+--------+----------+----------+------------+-----------+-----------+---------------------+---------------------+---------------------+--------------+-----------+--------+ | recordid | type | chanid | starttime | startdate | endtime | enddate | title | subtitle | description | season | episode | category | profile | recpriority | autoexpire | maxepisodes | maxnewest | startoffset | endoffset | recgroup | dupmethod | dupin | station | seriesid | programid | inetref | search | autotranscode | autocommflag | autouserjob1 | autouserjob2 | autouserjob3 | autouserjob4 | autometadata | findday | findtime | findid | inactive | parentid | transcoder | playgroup | prefinput | next_record | last_record | last_delete | storagegroup | avg_delay | filter | +----------+------+--------+-----------+------------+----------+------------+-----------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------+--------+---------+----------+---------+-------------+------------+-------------+-----------+-------------+-----------+----------+-----------+-------+---------+----------+-----------+---------+--------+---------------+--------------+--------------+--------------+--------------+--------------+--------------+---------+----------+--------+----------+----------+------------+-----------+-----------+---------------------+---------------------+---------------------+--------------+-----------+--------+ | 1313 | 1 | 2001 | 01:00:00 | 1970-01-01 | 11:24:28 | 2012-12-04 | Breakfast | | The latest news, sport, business and weather from the BBC's Breakfast team. Also in HD. Including regional news at 25 and 55 minutes past each hour. | 0 | 0 | News | Default | 50 | 0 | 0 | 0 | 0 | 10 | Default | 6 | 15 | BBC ONE | | | | 5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 01:00:00 | 719528 | 0 | 0 | 0 | Default | 0 | 0000-00-00 00:00:00 | 0000-00-00 00:00:00 | 0000-00-00 00:00:00 | Default | 100 | 0 | +----------+------+--------+-----------+------------+----------+------------+-----------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------+--------+---------+----------+---------+-------------+------------+-------------+-----------+-------------+-----------+----------+-----------+-------+---------+----------+-----------+---------+--------+---------------+--------------+--------------+--------------+--------------+--------------+--------------+---------+----------+--------+----------+----------+------------+-----------+-----------+---------------------+---------------------+---------------------+--------------+-----------+--------+ 1 row in set (0.00 sec)
I had to delete where startdate, not starttime < 100000
Here is the log: http://pastebin.com/JPidhE36
Afterwards mythtv has an entry in record: mysql> select * from record where unix_timestamp(startdate)<100000; +----------+------+--------+-----------+------------+----------+------------+-----------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------+--------+---------+----------+---------+-------------+------------+-------------+-----------+-------------+-----------+----------+-----------+-------+---------+----------+-----------+---------+--------+---------------+--------------+--------------+--------------+--------------+--------------+--------------+---------+----------+--------+----------+----------+------------+-----------+-----------+---------------------+---------------------+---------------------+--------------+-----------+--------+ | recordid | type | chanid | starttime | startdate | endtime | enddate | title | subtitle | description | season | episode | category | profile | recpriority | autoexpire | maxepisodes | maxnewest | startoffset | endoffset | recgroup | dupmethod | dupin | station | seriesid | programid | inetref | search | autotranscode | autocommflag | autouserjob1 | autouserjob2 | autouserjob3 | autouserjob4 | autometadata | findday | findtime | findid | inactive | parentid | transcoder | playgroup | prefinput | next_record | last_record | last_delete | storagegroup | avg_delay | filter | +----------+------+--------+-----------+------------+----------+------------+-----------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------+--------+---------+----------+---------+-------------+------------+-------------+-----------+-------------+-----------+----------+-----------+-------+---------+----------+-----------+---------+--------+---------------+--------------+--------------+--------------+--------------+--------------+--------------+---------+----------+--------+----------+----------+------------+-----------+-----------+---------------------+---------------------+---------------------+--------------+-----------+--------+ | 1313 | 1 | 2001 | 01:00:00 | 1970-01-01 | 11:24:28 | 2012-12-04 | Breakfast | | The latest news, sport, business and weather from the BBC's Breakfast team. Also in HD. Including regional news at 25 and 55 minutes past each hour. | 0 | 0 | News | Default | 50 | 0 | 0 | 0 | 0 | 10 | Default | 6 | 15 | BBC ONE | | | | 5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 01:00:00 | 719528 | 0 | 0 | 0 | Default | 0 | 0000-00-00 00:00:00 | 0000-00-00 00:00:00 | 0000-00-00 00:00:00 | Default | 100 | 0 | +----------+------+--------+-----------+------------+----------+------------+-----------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------+--------+---------+----------+---------+-------------+------------+-------------+-----------+-------------+-----------+----------+-----------+-------+---------+----------+-----------+---------+--------+---------------+--------------+--------------+--------------+--------------+--------------+--------------+---------+----------+--------+----------+----------+------------+-----------+-----------+---------------------+---------------------+---------------------+--------------+-----------+--------+ 1 row in set (0.00 sec)
For some reason github is not showing my comments, hope i am not repeating myself:
logfile: http://pastebin.com/JPidhE36
Log file: http://pastebin.com/JPidhE36
Mythtv after this has:
mysql> select * from record where unix_timestamp(startdate)<100000; +----------+------+--------+-----------+------------+----------+------------+-----------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------+--------+---------+----------+---------+-------------+------------+-------------+-----------+-------------+-----------+----------+-----------+-------+---------+----------+-----------+---------+--------+---------------+--------------+--------------+--------------+--------------+--------------+--------------+---------+----------+--------+----------+----------+------------+-----------+-----------+---------------------+---------------------+---------------------+--------------+-----------+--------+ | recordid | type | chanid | starttime | startdate | endtime | enddate | title | subtitle | description | season | episode | category | profile | recpriority | autoexpire | maxepisodes | maxnewest | startoffset | endoffset | recgroup | dupmethod | dupin | station | seriesid | programid | inetref | search | autotranscode | autocommflag | autouserjob1 | autouserjob2 | autouserjob3 | autouserjob4 | autometadata | findday | findtime | findid | inactive | parentid | transcoder | playgroup | prefinput | next_record | last_record | last_delete | storagegroup | avg_delay | filter | +----------+------+--------+-----------+------------+----------+------------+-----------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------+--------+---------+----------+---------+-------------+------------+-------------+-----------+-------------+-----------+----------+-----------+-------+---------+----------+-----------+---------+--------+---------------+--------------+--------------+--------------+--------------+--------------+--------------+---------+----------+--------+----------+----------+------------+-----------+-----------+---------------------+---------------------+---------------------+--------------+-----------+--------+ | 1313 | 1 | 2001 | 01:00:00 | 1970-01-01 | 11:24:28 | 2012-12-04 | Breakfast | | The latest news, sport, business and weather from the BBC's Breakfast team. Also in HD. Including regional news at 25 and 55 minutes past each hour. | 0 | 0 | News | Default | 50 | 0 | 0 | 0 | 0 | 10 | Default | 6 | 15 | BBC ONE | | | | 5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 01:00:00 | 719528 | 0 | 0 | 0 | Default | 0 | 0000-00-00 00:00:00 | 0000-00-00 00:00:00 | 0000-00-00 00:00:00 | Default | 100 | 0 | +----------+------+--------+-----------+------------+----------+------------+-----------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------+--------+---------+----------+---------+-------------+------------+-------------+-----------+-------------+-----------+----------+-----------+-------+---------+----------+-----------+---------+--------+---------------+--------------+--------------+--------------+--------------+--------------+--------------+---------+----------+--------+----------+----------+------------+-----------+-----------+---------------------+---------------------+---------------------+--------------+-----------+--------+
On 3 Dec 2012, at 20:16, Jean-Luc Barrière wrote:
To cleanup bad things before the patch:
- stop mythbackend (sometimes need force using kill -9).
- connect to mysql mythconverg and "delete from record where unix_timestamp(starttime) < 100000"
- commit
- restart mythbackend
2012/12/3 fetzerch notifications@github.com
Wasn't it so that mythtv got confused if you have tried to delete a recording without the patch? @janbar https://github.com/janbar what was required? cleaning database? / restarting mythbackend?
— Reply to this email directly or view it on GitHubhttps://github.com/fetzerch/xbmc-pvr-addons/issues/45#issuecomment-10966534.
— Reply to this email directly or view it on GitHub.
I have also done this process but using full xbmc debug mode (big log file)
This log can be found here: http://dl.dropbox.com/u/43093089/xbmc.full.log
On 4 Dec 2012, at 08:39, Richard Ambridge wrote:
Log file: http://pastebin.com/JPidhE36
Mythtv after this has:
mysql> select * from record where unix_timestamp(startdate)<100000; +----------+------+--------+-----------+------------+----------+------------+-----------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------+--------+---------+----------+---------+-------------+------------+-------------+-----------+-------------+-----------+----------+-----------+-------+---------+----------+-----------+---------+--------+---------------+--------------+--------------+--------------+--------------+--------------+--------------+---------+----------+--------+----------+----------+------------+-----------+-----------+---------------------+---------------------+---------------------+--------------+-----------+--------+ | recordid | type | chanid | starttime | startdate | endtime | enddate | title | subtitle | description | season | episode | category | profile | recpriority | autoexpire | maxepisodes | maxnewest | startoffset | endoffset | recgroup | dupmethod | dupin | station | seriesid | programid | inetref | search | autotranscode | autocommflag | autouserjob1 | autouserjob2 | autouserjob3 | autouserjob4 | autometadata | findday | findtime | findid | inactive | parentid | transcoder | playgroup | prefinput | next_record | last_record | last_delete | storagegroup | avg_delay | filter | +----------+------+--------+-----------+------------+----------+------------+-----------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------+--------+---------+----------+---------+-------------+------------+-------------+-----------+-------------+-----------+----------+-----------+-------+---------+----------+-----------+---------+--------+---------------+--------------+--------------+--------------+--------------+--------------+--------------+---------+----------+--------+----------+----------+------------+-----------+-----------+---------------------+---------------------+---------------------+--------------+-----------+--------+ | 1313 | 1 | 2001 | 01:00:00 | 1970-01-01 | 11:24:28 | 2012-12-04 | Breakfast | | The latest news, sport, business and weather from the BBC's Breakfast team. Also in HD. Including regional news at 25 and 55 minutes past each hour. | 0 | 0 | News | Default | 50 | 0 | 0 | 0 | 0 | 10 | Default | 6 | 15 | BBC ONE | | | | 5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 01:00:00 | 719528 | 0 | 0 | 0 | Default | 0 | 0000-00-00 00:00:00 | 0000-00-00 00:00:00 | 0000-00-00 00:00:00 | Default | 100 | 0 | +----------+------+--------+-----------+------------+----------+------------+-----------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------+--------+---------+----------+---------+-------------+------------+-------------+-----------+-------------+-----------+----------+-----------+-------+---------+----------+-----------+---------+--------+---------------+--------------+--------------+--------------+--------------+--------------+--------------+---------+----------+--------+----------+----------+------------+-----------+-----------+---------------------+---------------------+---------------------+--------------+-----------+--------+
On 3 Dec 2012, at 20:16, Jean-Luc Barrière wrote:
To cleanup bad things before the patch:
- stop mythbackend (sometimes need force using kill -9).
- connect to mysql mythconverg and "delete from record where unix_timestamp(starttime) < 100000"
- commit
- restart mythbackend
2012/12/3 fetzerch notifications@github.com
Wasn't it so that mythtv got confused if you have tried to delete a recording without the patch? @janbar https://github.com/janbar what was required? cleaning database? / restarting mythbackend?
— Reply to this email directly or view it on GitHubhttps://github.com/fetzerch/xbmc-pvr-addons/issues/45#issuecomment-10966534.
— Reply to this email directly or view it on GitHub.
No idea why, but @richardambridge 's messages are not shown any more. I copy them here from my mails:
@janbar: can you check?
The above sql was slightly wrong, it should be startdate not starttime, otherwise it would have deleted all my recordings. I deleted the rows that had startdate of 1970 Did same again. EPG, select item from channel, switch, while viewing move mouse, hit rec button. Log here: http://pastebin.com/7RpdCBFa
I had to delete where startdate, not starttime < 100000 Here is the log: http://pastebin.com/JPidhE36
I have also done this process but using full xbmc debug mode (big log file)
This log can be found here: http://dl.dropbox.com/u/43093089/xbmc.full.log
I pushed the PR #58 to resolve starttime < "2000-01-01" by defaulting at now. But it is not related to the original issue. Richard should use the last master. And also cleanup again the mysql table "record".
@richardambridge Hi, your Addon is not updated to the last merged master. You have yet the old release without the patch about recording rules. To resolve the issue you should update your local copy with the last master.
br.
@richardambridge
To refresh your copy of addons: (Linux, mac ... all unix)
Goto your clone of the git repo (xbmc-pvr-addons). Type "make clean" (important, or type it after configure). Then "git pull", "./bootstrap", "./configure --enable-addons-with-dependencies", finally "make zip".
I think I compiled, but failed to reload the addon :( sorry about that.
Just tried again. Log: http://pastebin.com/PxhbQ8Z6
This time recording works. I watched Breakfast, clicked Record, and mythtv started to record it, and when I stopped xbmc the recording continued.
I assume this is classed as an instant record, as it has defaulted to 180 minutes of record time, rather than use the EPG and record to the scheduled end of the show.
The EPG in mythtv is a bit confused now though:
06:00 AM - 09:15 AM Breakfast 3 hrs 15 mins 08:34 AM - 11:34 AM Breakfast 2012-12-07 08:34:53 3 hrs 9 mins 09:15 AM - 10:00 AM Heir Hunters 45 mins 10:00 AM - 11:00 AM Homes Under the Hammer 1 hr 11:00 AM - 11:45 AM Watchdog Daily 45 mins
the 8:34 to 11:34 is the instant record.
So, I say that #52 is closed, recording now works :) Just the listings are a bit upset.
Thanks Ric
(my comments still don't show up in github :( )
I think I compiled, but failed to reload the addon :( sorry about that.
Just tried again. Log: http://pastebin.com/PxhbQ8Z6
This time recording works. I watched Breakfast, clicked Record, and mythtv started to record it, and when I stopped xbmc the recording continued.
I assume this is classed as an instant record, as it has defaulted to 180 minutes of record time, rather than use the EPG and record to the scheduled end of the show.
The EPG in mythtv is a bit confused now though:
06:00 AM - 09:15 AM Breakfast 3 hrs 15 mins 08:34 AM - 11:34 AM Breakfast 2012-12-07 08:34:53 3 hrs 9 mins 09:15 AM - 10:00 AM Heir Hunters 45 mins 10:00 AM - 11:00 AM Homes Under the Hammer 1 hr 11:00 AM - 11:45 AM Watchdog Daily 45 mins
the 8:34 to 11:34 is the instant record.
So, I say that #52 is closed, recording now works :) Just the listings are a bit upset.
Thanks Ric On 7 Dec 2012, at 01:05, Jean-Luc Barrière wrote:
@richardambridge
To refresh your copy of addons: (Linux, mac ... all unix)
Goto your clone of the git repo (xbmc-pvr-addons). Type "make clean" (important, or type it after configure). Then "git pull", "./bootstrap", "./configure --enable-addons-with-dependencies", finally "make zip".
— Reply to this email directly or view it on GitHub.
@richardambridge Thanks Richard. Yes for a direct recording the default duration is setup at 2 hours and you can update it in PVR setup. Great thanks yet for your help to improve the addon. JLB
One more message from @richardambridge that isn't shown ... So I guess we can close this one.
I think I compiled, but failed to reload the addon :( sorry about that.
Just tried again. Log: http://pastebin.com/PxhbQ8Z6
This time recording works. I watched Breakfast, clicked Record, and mythtv started to record it, and when I stopped xbmc the recording continued.
I assume this is classed as an instant record, as it has defaulted to 180 minutes of record time, rather than use the EPG and record to the scheduled end of the show.
The EPG in mythtv is a bit confused now though:
06:00 AM - 09:15 AM Breakfast 3 hrs 15 mins 08:34 AM - 11:34 AM Breakfast 2012-12-07 08:34:53 3 hrs 9 mins 09:15 AM - 10:00 AM Heir Hunters 45 mins 10:00 AM - 11:00 AM Homes Under the Hammer 1 hr 11:00 AM - 11:45 AM Watchdog Daily 45 mins
the 8:34 to 11:34 is the instant record.
So, I say that #52 is closed, recording now works :) Just the listings are a bit upset.
Thanks Ric
Goto Live TV, Channels, select a channel, play live tv.
While watching, bring up the menu, move the Rec button on the far right, XBMC will indicate it is recording. Stop the live TV Goto MythTV and the recording isn't happening.
Mythtv backend shows the recording in 'Upcoming' but it isn't recording it:
Status Title Channel Record Date Record Length Thu Jan 1, 1970 Freeview The One Show: 1970-01-01 02:00:00 1 - BBC ONE Thu Nov 15, 2012 (07:18 PM) 3 hrs 9 mins
Currently Recording: Edit Thu Nov 15, 2012
Myth backend reports:
Nov 15 19:17:54 MediaCenter mythlogserver: mythbackend[6768]: I Scheduler scheduler.cpp:2646 (HandleRecordingStatusChange) Tuning recording: "The One Show":"1970-01-01 02:00:00": channel 1001 on cardid 2, sourceid 1 Nov 15 19:17:54 MediaCenter mythlogserver: mythbackend[6768]: I CoreContext scheduler.cpp:655 (UpdateRecStatus) Updating status for "The One Show":"1970-01-01 02:00:00" on cardid 2 (Tuning => Recording) Nov 15 19:17:55 MediaCenter mythlogserver: mythbackend[6768]: I TVRecEvent tv_rec.cpp:4056 (TuningNewRecorder) TVRec(2): rec->GetPathname(): '/storage/Recordings/1001_20121115191800.mpg' Nov 15 19:17:55 MediaCenter mythlogserver: mythbackend[6768]: I ProcessRequest mainserver.cpp:1510 (HandleAnnounce) MainServer::HandleAnnounce FileTransfer Nov 15 19:17:55 MediaCenter mythlogserver: mythbackend[6768]: I ProcessRequest mainserver.cpp:1512 (HandleAnnounce) adding: openelec as a remote file transfer Nov 15 19:17:55 MediaCenter mythlogserver: mythbackend[6768]: I TVRecEvent tv_rec.cpp:1557 (HandlePendingRecordings) TVRec(1): ASK_RECORDING 1 0 0 0 Nov 15 19:17:55 MediaCenter mythlogserver: mythbackend[6768]: E ProcessRequest fileringbuffer.cpp:285 (OpenFile) FileRingBuf(/storage/Recordings/1001_20121115191800.mpg.png): OpenFile(): Could not open.
The xbmc.log file is here: http://www.pastebin.ca/2251869
I had to delete a lot of the log file as it was huge with debug on. Let me know if you need some of the stuff I removed.