Jump to content


Photo

Timeshift Timer Conflict


  • Please log in to reply
87 replies to this topic

Re: Timeshift Timer Conflict #41 Meega

  • Senior Member
  • 3,000 posts

+51
Good

Posted 2 April 2015 - 20:04

Isn't it possible to automatically delete the timeshift after 2 zaps?

First zap starts new timeshift file but leaves previous timeshift alone.

Most (if not all ) hdd's and usb locations are big enough, and if not timeshift starts over (which it already does).

 

After restart enigma all timeshifts will be deleted???

 

Only problem is then ,how to review the first timeshift?

 

Just an suggestion  :)


ET10000+ Openpli 6.1,1m schotel 4x duo-lnb op vaste opstelling.

Momolights teensy 2.0 met 50 leds op een string ,150 channels
DM8000 Openpli 6.1 Release


Re: Timeshift Timer Conflict #42 littlesat

  • PLi® Core member
  • 56,957 posts

+695
Excellent

Posted 2 April 2015 - 20:11

But most of us do not have an endless number of tuners......

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Timeshift Timer Conflict #43 Meega

  • Senior Member
  • 3,000 posts

+51
Good

Posted 2 April 2015 - 20:24

No ,it does not have to keep running when you zap.

just start a new one on the new channel.

But then you could watch what you missed.

 

If the timer record starts before the movie which you where watching is ended you are out of luck (because of the 1 tuner)

This is also the case if you are not timeshifting and just sitting on the couch.

 

But when the timer starts after the movie and you are still not back from the door because of some guy from a energy company has his foot between the door ,then you can watch it. 

Even with the recording running.

 

I think it's half the solution the ts meant??

 

Only thing is, as i said ,how to play it (if it's not in the /hdd/movie dir)?


ET10000+ Openpli 6.1,1m schotel 4x duo-lnb op vaste opstelling.

Momolights teensy 2.0 met 50 leds op een string ,150 channels
DM8000 Openpli 6.1 Release


Re: Timeshift Timer Conflict #44 Dimitrij

  • PLi® Core member
  • 10,190 posts

+346
Excellent

Posted 2 April 2015 - 22:19

(default)

- save current timeshift and  start timer action


GigaBlue UHD Quad 4K /Lunix3-4K/Duo 4K


Re: Timeshift Timer Conflict #45 littlesat

  • PLi® Core member
  • 56,957 posts

+695
Excellent

Posted 2 April 2015 - 22:32

Than still the current timeshift could be broken while you want to watch what you paused till the end.... This does not help at all....

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Timeshift Timer Conflict #46 Erik Slagter

  • PLi® Core member
  • 46,969 posts

+541
Excellent

Posted 3 April 2015 - 08:38

- virtually allocate a fixed amount of space on the "disk"

- record timeshift in chunks of fixed size, when chunk is full, start new one

- when virtual space is "full", re-use oldest chunk, then no deletion is necessary (takes time), extra advantage, this file has already been stretched, don't forget to truncate current chunk to last written position

 

A few things to consider:

 

- using small chunks may not give the best playback experience, anyway when the selected chunk ends, playing should continue with the next chunk automatically

- enigma2 should ask the user what chunk to playback, it should store information about each chunk so the user can make an informed decision, or just offer the user to go back x chunks...

- this wll also solve the current problem of the timeshifting files taking up more and more disk space after time

- consider using either chunk length by file size or by time span, both have advantages and disadvantages.

- if you make the allocated "disk" space big enough, you'll be able to completely replay your whole evening spending zapping over all channels


* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: Timeshift Timer Conflict #47 littlesat

  • PLi® Core member
  • 56,957 posts

+695
Excellent

Posted 3 April 2015 - 08:58

So in short.... completely revise the current timeshift system....  ;)


WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Timeshift Timer Conflict #48 Rob van der Does

  • Senior Member
  • 7,766 posts

+184
Excellent

Posted 3 April 2015 - 09:29

So in short.... completely revise the current timeshift system....   ;)

Well, that has been your suggestion for ages :)



Re: Timeshift Timer Conflict #49 dAF2000

  • PLi® Ex-Leden
  • 14,151 posts

+52
Good

Posted 3 April 2015 - 09:30

We're thinking of difficult solutions while the problem is not difficult.

 

There's a timer conflict, so only one of the recordings (the recording or the timeshift) can continue. The user once decided in the Enigma settings "give recordings priority over watching tv". Just save the timeshift without any popup, conformation, setting or whatsoever and start the recording as planned. Enigma cannot know whether the timeshift is more interesting than the recording but one can assume due to the priority setting the recording should be executed as planned. The timeshift is saved.


Many answers to your question can be found in our wiki: http://openpli.org/wiki

Re: Timeshift Timer Conflict #50 Erik Slagter

  • PLi® Core member
  • 46,969 posts

+541
Excellent

Posted 3 April 2015 - 10:27

The only drawback with that solution is that over time the directory gets full of timeshift files and the user cannot know which one is the one he's after.


* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: Timeshift Timer Conflict #51 dAF2000

  • PLi® Ex-Leden
  • 14,151 posts

+52
Good

Posted 3 April 2015 - 11:15

The only drawback with that solution is that over time the directory gets full of timeshift files and the user cannot know which one is the one he's after.

 

Well, a timeshift file will only be created if such a timer conflict occurs and that will be quite rare.


Many answers to your question can be found in our wiki: http://openpli.org/wiki

Re: Timeshift Timer Conflict #52 Pr2

  • PLi® Contributor
  • 6,155 posts

+261
Excellent

Posted 3 April 2015 - 11:42

Hi,

I agree with dAF2000 that's the solution I prone since the very beginning, this problem is not that hard, everything is already in OpenPLi.
The conflict is already detected we just need to add an action to save timeshift (which is already foreseen too when we press stop button), if you fear that the saved timeshift can be forgotten save it into the movie folder then. So each time an end-user will playback a recorded movie he will saw that there is an old timeshift stored.

Moreover it is up to the end-user to perform clean-up on its HDD when it runs out of space.

And i agree also that's it is not a feature that we will use daily but it is nice to have a smart solution in case of conflict.

I think that dimitrij understand it also properly so let's wait for his patch.

Pr2

NO SUPPORT by PM, it is a forum make your question public so everybody can benefit from the question/answer.
If you think that my answer helps you, you can press the up arrow in bottom right of the answer.

Wanna help with OpenPLi Translation? Please read our Wiki Information for translators

Sat: Hotbird 13.0E, Astra 19.2E, Eutelsat5A 5.0W
VU+ Solo 4K: 2*DVB-S2 + 2*DVB-C/T/T2 (used in DVB-C) & Duo 4K: 2*DVB-S2X + DVB-C (FBC)

AB-Com: PULSe 4K 1*DVB-S2X (+ DVB-C/T/T2)
Edision OS Mio 4K: 1*DVB-S2X + 1*DVB-C/T/T2
 


Re: Timeshift Timer Conflict #53 ColinB

  • Senior Member
  • 743 posts

+28
Good

Posted 3 April 2015 - 12:09

 

The only drawback with that solution is that over time the directory gets full of timeshift files and the user cannot know which one is the one he's after.

 

Well, a timeshift file will only be created if such a timer conflict occurs and that will be quite rare.

 

 

 "Quite rare" (exactly) and it just so happens its usualy when you most need it, but can't do anything about it.

 

As it stands, even with the current "pop-up" (...tuner....zap to...) there are no User Intervention Options. (that I can find) to either cancell the timer or save the current TS.

 

@Eric surely that is down to User Maintenence ? Assuming most files have time/date stamp. A quick browse would let you dump what you dont need/want to watch.

 

I'm not sugguesting that the option to "Automatically Save Timeshift" to file, is in any way a substitute for proper planned recordings.

 

More like having a "Vegitarian Option" at a Wedding :)


Xtrend et8000 7.1-Release

2 x 8/1 DiSEqC  30w 13e 19e 23e 28e   

Astrometa USB Tuner Working DVB-T2 now on Kernel 4.10+  ;)

WD10EARX 1TB

Sandisk 32GB USB for AFB, EPG, Picons & Timeshift

 

ZGemma Star S 7.0-Release

4/1 DiSEqC  30w 13e 19e 28e

Sandisk 8GB USB for AFB, EPG, Picons & Timeshift

 

LG 49UH610V UHD-HDR

UHF/Cable/Sat

 

E-Channelizer

 

 

 


Re: Timeshift Timer Conflict #54 Erik Slagter

  • PLi® Core member
  • 46,969 posts

+541
Excellent

Posted 3 April 2015 - 16:20

 

The only drawback with that solution is that over time the directory gets full of timeshift files and the user cannot know which one is the one he's after.

 

Well, a timeshift file will only be created if such a timer conflict occurs and that will be quite rare.

The problem I mentioned already exists for normal timeshifts.


* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: Timeshift Timer Conflict #55 Dimitrij

  • PLi® Core member
  • 10,190 posts

+346
Excellent

Posted 4 April 2015 - 13:35

maybe done :)

--- a/RecordTimer.py
+++ b/RecordTimer.py
@@ -171,6 +171,8 @@
 		self.rename_repeat = rename_repeat
 		self.needChangePriorityFrontend = config.usage.recording_frontend_priority.value != "-2" and config.usage.recording_frontend_priority.value != config.usage.frontend_priority.value
 		self.change_frontend = False
+		self.InfoBarInstance = Screens.InfoBar.InfoBar.instance
+		self.ts_dialog = None
 		self.log_entries = []
 		self.resetState()
 
@@ -305,10 +307,14 @@
 						RecordTimerEntry.setWasInStandby()
 					cur_zap_ref = NavigationInstance.instance.getCurrentlyPlayingServiceReference()
 					if cur_zap_ref and not cur_zap_ref.getPath():# we do not zap away if it is no live service
-						Notifications.AddNotification(MessageBox, _("In order to record a timer, the TV was switched to the recording service!\n"), type=MessageBox.TYPE_INFO, timeout=20)
-						self.setRecordingPreferredTuner()
-						self.failureCB(True)
-						self.log(5, "zap to recording service")
+						if self.checkingTimeshiftRunning():
+							if self.ts_dialog is None:
+								self.openChoiceActionBeforeZap()
+						else:
+							Notifications.AddNotification(MessageBox, _("In order to record a timer, the TV was switched to the recording service!\n"), type=MessageBox.TYPE_INFO, timeout=20)
+							self.setRecordingPreferredTuner()
+							self.failureCB(True)
+							self.log(5, "zap to recording service")
 
 		if next_state == self.StatePrepared:
 			if self.tryPrepare():
@@ -331,13 +337,18 @@
 				return True
 
 			self.log(7, "prepare failed")
-			if self.first_try_prepare:
+			if self.first_try_prepare or (self.ts_dialog is not None and not self.checkingTimeshiftRunning()):
 				self.first_try_prepare = False
 				cur_ref = NavigationInstance.instance.getCurrentlyPlayingServiceReference()
 				if cur_ref and not cur_ref.getPath():
+					if self.always_zap:
+						return False
 					if Screens.Standby.inStandby:
 						self.setRecordingPreferredTuner()
 						self.failureCB(True)
+					elif self.checkingTimeshiftRunning():
+						if self.ts_dialog is None:
+							self.openChoiceActionBeforeZap()
 					elif not config.recording.asktozap.value:
 						self.log(8, "asking user to zap away")
 						Notifications.AddNotificationWithCallback(self.failureCB, MessageBox, _("A timer failed to record!\nDisable TV and try again?\n"), timeout=20, default=True)
@@ -369,8 +380,12 @@
 				else:
 					if RecordTimerEntry.wasInDeepStandby:
 						RecordTimerEntry.setWasInStandby()
-					self.log(11, "zapping")
-					NavigationInstance.instance.playService(self.service_ref.ref)
+					if self.checkingTimeshiftRunning():
+						if self.ts_dialog is None:
+							self.openChoiceActionBeforeZap()
+					else:
+						self.log(11, "zapping")
+						NavigationInstance.instance.playService(self.service_ref.ref)
 				return True
 			else:
 				self.log(11, "start recording")
@@ -398,6 +413,7 @@
 
 		elif next_state == self.StateEnded:
 			old_end = self.end
+			self.ts_dialog = None
 			if self.setAutoincreaseEnd():
 				self.log(12, "autoincrase recording %d minute(s)" % int((self.end - old_end)/60))
 				self.state -= 1
@@ -453,6 +469,69 @@
 			if elem is not None:
 				setPreferredTuner(int(elem))
 
+	def checkingTimeshiftRunning(self):
+		return config.usage.check_timeshift.value and self.InfoBarInstance and self.InfoBarInstance.timeshiftEnabled() and self.InfoBarInstance.timeshift_was_activated
+
+	def openChoiceActionBeforeZap(self):
+		if self.ts_dialog is None:
+			type = _("record")
+			if self.justplay:
+				type = _("zap")
+			elif self.always_zap:
+				type = _("zap and record")
+			message = _("You must switch to the service %s (%s - '%s')!\n") % (type, self.service_ref.getServiceName(), self.name)
+			if self.repeated:
+				message += _("Attention, this is repeated timer!\n")
+			message += _("Timeshift is running. Select an action.\n")
+			if not self.InfoBarInstance.save_timeshift_file:
+				if self.InfoBarInstance.timeshiftActivated():
+					choice = [(_("Save timeshift and zap"), "save"), (_("Zap"), "zap"), (_("Save timeshift in movie dir and zap"), "save_movie"), (_("Don't zap and disable timer"), "disable"), (_("Don't zap  and remove timer"), "remove")]
+				else:
+					choice = [(_("Zap"), "zap"), (_("Save timeshift and zap"), "save"), (_("Save timeshift in movie dir and zap"), "save_movie"), (_("Don't zap and disable timer"), "disable"), (_("Don't zap and remove timer"), "remove")]
+			else:
+				message += _("Reminder, you have chosen to save timeshift file.")
+				choice = [(_("Zap"), "zap"), (_("Don't zap and disable timer"), "disable"), (_("Don't zap and remove timer"), "remove")]
+			#if self.justplay or self.always_zap:
+			#	choice.insert(2, (_("Don't zap"), "continue"))
+			choice.insert(2, (_("Don't zap"), "continue"))
+			def zapAction(choice):
+				start_zap = True
+				if choice:
+					if choice in ("zap", "save", "save_movie"):
+						self.log(8, "zap to recording service")
+						if choice in ("save", "save_movie"):
+							ts = self.InfoBarInstance.getTimeshift()
+							if ts and ts.isTimeshiftEnabled():
+								if choice =="save_movie":
+									self.InfoBarInstance.save_timeshift_in_movie_dir = True
+								self.InfoBarInstance.save_timeshift_file = True
+								ts.saveTimeshiftFile()
+								del ts
+								self.InfoBarInstance.saveTimeshiftFiles()
+					elif choice == "disable":
+						self.disable()
+						NavigationInstance.instance.RecordTimer.timeChanged(self)
+						start_zap = False
+						self.log(8, "zap canceled by the user, timer disabled")
+					elif choice == "remove":
+						start_zap = False
+						self.afterEvent = AFTEREVENT.NONE
+						NavigationInstance.instance.RecordTimer.removeEntry(self)
+						self.log(8, "zap canceled by the user, timer removed")
+					elif choice == "continue":
+						if self.justplay:
+							self.end = self.begin 
+						start_zap = False
+						self.log(8, "zap canceled by the user")
+				if start_zap:
+					if not self.justplay:
+						self.setRecordingPreferredTuner()
+						self.failureCB(True)
+					else:
+						self.log(8, "zapping")
+						NavigationInstance.instance.playService(self.service_ref.ref)
+			self.ts_dialog = self.InfoBarInstance.session.openWithCallback(zapAction, MessageBox, message, simple=True, list=choice, timeout=20)
+
 	def sendStandbyNotification(self, answer):
 		RecordTimerEntry.keypress()
 		if answer:
@@ -474,6 +553,7 @@
 				self.StateEnded: self.end }[next_state]
 
 	def failureCB(self, answer):
+		self.ts_dialog = None
 		if answer == True:
 			self.log(13, "ok, zapped away")
 			#NavigationInstance.instance.stopUserServices()
@@ -505,10 +585,7 @@
 			# TODO: this has to be done.
 		elif event == iRecordableService.evStart:
 			text = _("A record has been started:\n%s") % self.name
-			notify = config.usage.show_message_when_recording_starts.value and \
-				not Screens.Standby.inStandby and \
-				Screens.InfoBar.InfoBar.instance and \
-				Screens.InfoBar.InfoBar.instance.execing
+			notify = config.usage.show_message_when_recording_starts.value and not Screens.Standby.inStandby and self.InfoBarInstance and self.InfoBarInstance.execing
 			if self.dirnameHadToFallback:
 				text = '\n'.join((text, _("Please note that the previously selected media could not be accessed and therefore the default directory is being used instead.")))
 				notify = True


GigaBlue UHD Quad 4K /Lunix3-4K/Duo 4K


Re: Timeshift Timer Conflict #56 littlesat

  • PLi® Core member
  • 56,957 posts

+695
Excellent

Posted 4 April 2015 - 16:20

I do not see any advantage......As probably when you see the popup you probably not behind the box.... 

 

I suggest it is better to see what time you have when you start a timeshift..... 


WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Timeshift Timer Conflict #57 Dimitrij

  • PLi® Core member
  • 10,190 posts

+346
Excellent

Posted 4 April 2015 - 18:12

Who wants to check, add RecordTimer.py in /usr/lib/enigma2/python/ and restart enigma.


Edited by Dimitrij, 4 April 2015 - 18:13.

GigaBlue UHD Quad 4K /Lunix3-4K/Duo 4K


Re: Timeshift Timer Conflict #58 Pr2

  • PLi® Contributor
  • 6,155 posts

+261
Excellent

Posted 4 April 2015 - 19:54

I suggest it is better to see what time you have when you start a timeshift.....


No because when you start a timeshift you don't know how long it will take until you press the play button.
So back the scenario I describe, you can pop-up that a record is scheduled, you think it will be okay and in real life it will not but you don't know it when you start the timeshift! If you would know it then you start an instant record.

NO SUPPORT by PM, it is a forum make your question public so everybody can benefit from the question/answer.
If you think that my answer helps you, you can press the up arrow in bottom right of the answer.

Wanna help with OpenPLi Translation? Please read our Wiki Information for translators

Sat: Hotbird 13.0E, Astra 19.2E, Eutelsat5A 5.0W
VU+ Solo 4K: 2*DVB-S2 + 2*DVB-C/T/T2 (used in DVB-C) & Duo 4K: 2*DVB-S2X + DVB-C (FBC)

AB-Com: PULSe 4K 1*DVB-S2X (+ DVB-C/T/T2)
Edision OS Mio 4K: 1*DVB-S2X + 1*DVB-C/T/T2
 


Re: Timeshift Timer Conflict #59 littlesat

  • PLi® Core member
  • 56,957 posts

+695
Excellent

Posted 4 April 2015 - 21:50

That will help.... At least you now in forehand how long the timeshift can take....

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Timeshift Timer Conflict #60 Dimitrij

  • PLi® Core member
  • 10,190 posts

+346
Excellent

Posted 5 April 2015 - 14:05

I proposed a solution that solves the problem.
If I do not see a warning message, the timeshift file will be saved automatically.

What you do not like my patch?


GigaBlue UHD Quad 4K /Lunix3-4K/Duo 4K



23 user(s) are reading this topic

0 members, 23 guests, 0 anonymous users