Fuzzy (19-01-19)
Sorted! I changed "Stop timeshift while recording" to 'no' and the problem has gone! I even have timeshift enabled and it is still working fine. I wrongly assumed that because timeshift was turned off that it couldn't affect anything.
Thanks Birdman and everyone else who has helped because I can honestly say that I would never have found it because I wouldn't have even considered it a possibility.
I couldn't (quickly) understand what the code was doing so stopped trying to fathom it.
However, it has now hit a few people and the workaround isn't obvious, as it seems to relate to something that isn't used.
Looking at the code again I see that the only other use of stopwhilerecording also checks self.pts_record_running, so perhaps the one causing this problem should too.
I'll poke around....
MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD
Fuzzy (21-01-19)
Seems to work.
If I check both values as a combination then I can set off a recording, stop it and get no "are you sure" prompt when accessing tuner configs and rebooting.
I do still get the prompts if I leave the recording running.
I'll submit a PR.
EDIT:
Well, I will, but not that one, and not quite yet,
The actual issue is the setting of timeshift.isRecording at the end, which shouldn't be set if timeshift isn't actually on....
Last edited by birdman; 20-01-19 at 21:03.
MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD
Hmmm...why did I decide to look at this :-(.
There are 13 places in the code where config.timeshift.isRecording.value is set. I've enabled it, run an instant recordings and run a timer. This only results in two of those assignments being used. That's the initialization (to False) and the setting to True at the end of a recording if config.timeshift.stopwhilerecording is True (the one causing the problem). Not sure how the other code places ever get reached. So once it is set that's seems to be it - it won't become unset.
Might help if I could find out what does unset it, as it's not exactly clear what this variable represents. It is used by RecordTimer, which returns the next timer as being in 300s from now if it is set (which is what causes the prompts at shutdown and tuner config). Now, running a standard timeshift doesn't count as "recording" - possibly this is juts meant to be set if a timeshift buffer is being converted into a recording?
Any ideas welcome...
Perhaps I need to concentrate on the TODO section of the comment related to the offending lines?
Last edited by birdman; 21-01-19 at 04:01.
MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD
An update.
(I think) I've worked out what config.timeshift.isRecording represents. It's whether the current timeshift buffer should be converted into a recording when the programme ends (an option you can set using the record button when timeshift is active). This is needed so that activities which would affect a recording (shutdown, changing tuner configs, etc.*) can warn if you try to use them when this is active - since it does not show as an actual recording timer.
So, I set off a "timeshift recording" whilst having a recording timer set to start and stop before the current programme ended and looked at what was happening (leaving the remote control alone...). This was done with stopwhilerecording set to True.
- The timeshift recording buffer started to fill. config.timeshift.isRecording was set to True (by setting of the "timeshift recording": code in Screens/InfoBarGenerics.py at line 3190).
- Then the recording started - at this point the timeshift buffer went away (and was not converted to any actual recording - I'm going to ignore that here too).
- The recording stopped (and was OK). Timeshift started up again. config.timeshift.isRecording was set to True (by a recording ending: code in Components/Timeshift.py at line 1272, which is the setting causing this issue).
- At the end of the programme timeshift stops! config.timeshift.isRecording is set to True again (because we're about to merge recordings - read on...: code in Components/Timeshift.py at line 632
- The timeshift buffer is copied(moved) to a recording file.
- A 5-min timer recording (a real one - it shows up in the timer list) of the channel that I was "timeshift recording" now appears!
- After 5-mins, this stops abd timeshift starts running again.
- There are now a few occurrences of config.timeshift.isRecording being set to True in quick succession.
- At the end the 5-min recording has been merged with (appended to) the "timeshift recording".
- config.timeshift.isRecording is then set to False (cleanup after merging: code in Components/Timeshift.py at line 1043
[* but not, interestingly, changing the channel, which does restart the timeshift buffer and hence remove the recording you think you are making. But I'm going to ignore that here...]
From what I can see config.timeshift.isRecording is never unset when timeshift is paused for a recording.
Consequently it doesn't need to be set when a recording ends.
So I reckon the solution to this problem is to remove line 1272 in Components/Timeshift.py.
MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD
@birdman - I think you have identified an issue that I have experienced occasionally. Sometimes, I go to bed with a timeshift recording in progress and I put the box in standby, assuming that my auto deep standby timer (30 mins) will put the box to deep sleep after the timeshift recording is finished. Quite often I find the box still running in the morning and the shutdown timer being blocked by "recording in progress" when there is actually none! I think it happens when I have an actual timer recording which may have finished shortly before I put the box in standby which is simultaneous with the timeshift.
GB Quad Plus, Mut@nt HD51, AX HD61, 80cm dish and Supreme Dark motor. Sony STR-DN 1060, Sony UHP-H1 Bluray, Odroid N2+ (CoreElec), Monitor Audio Bronze 5.1 speakers
MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD
Joe_90 (24-01-19)
Can't check the setting right at the moment, but will respond later.
EDIT - I have the option to "stop timeshift when recording" set to NO
Last edited by Joe_90; 24-01-19 at 13:45.
GB Quad Plus, Mut@nt HD51, AX HD61, 80cm dish and Supreme Dark motor. Sony STR-DN 1060, Sony UHP-H1 Bluray, Odroid N2+ (CoreElec), Monitor Audio Bronze 5.1 speakers