Jump to content


Dimitrij

Member Since 24 Apr 2011
Offline Last Active Yesterday, 19:18
****-

#407809 Preferred tuner for recording

Posted by Dimitrij on 22 February 2014 - 16:25

In a plugin for rec infobar... Why not try to make the change in e2 itself?

Done.

--- a/RecordTimer.py
+++ b/RecordTimer.py
@@ -1,6 +1,6 @@
 import os
 from enigma import eEPGCache, getBestPlayableServiceReference, \
-	eServiceReference, iRecordableService, quitMainloop, eActionMap
+	eServiceReference, iRecordableService, quitMainloop, eActionMap, setPreferredTuner
 
 from Components.config import config
 from Components.UsageConfig import defaultMoviePath
@@ -167,7 +167,8 @@
 		self.tags = tags or []
 		self.descramble = descramble
 		self.record_ecm = record_ecm
-
+		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.log_entries = []
 		self.resetState()
 
@@ -227,11 +228,12 @@
 				if not rec_ref:
 					self.log(1, "'get best playable service for group... record' failed")
 					return False
-				
+			self.setRecordingPreferredTuner()
 			self.record_service = rec_ref and NavigationInstance.instance.recordService(rec_ref)
 
 			if not self.record_service:
 				self.log(1, "'record service' failed")
+				self.setRecordingPreferredTuner(setdefault=True)
 				return False
 
 			if self.repeated:
@@ -264,6 +266,7 @@
 
 				NavigationInstance.instance.stopRecordService(self.record_service)
 				self.record_service = None
+				self.setRecordingPreferredTuner(setdefault=True)
 				return False
 			return True
 
@@ -296,6 +299,7 @@
 					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")
 
@@ -325,6 +329,7 @@
 				cur_ref = NavigationInstance.instance.getCurrentlyPlayingServiceReference()
 				if cur_ref and not cur_ref.getPath():
 					if Screens.Standby.inStandby:
+						self.setRecordingPreferredTuner()
 						self.failureCB(True)
 					elif not config.recording.asktozap.value:
 						self.log(8, "asking user to zap away")
@@ -332,6 +337,7 @@
 					else: # zap without asking
 						self.log(9, "zap without asking")
 						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)
 				elif cur_ref:
 					self.log(8, "currently running service is not a live service.. so stop it makes no sense")
@@ -369,7 +375,7 @@
 					else:
 						Notifications.AddNotification(Screens.Standby.Standby, StandbyCounterIncrease=False)
 				record_res = self.record_service.start()
-				
+				self.setRecordingPreferredTuner(setdefault=True)
 				if record_res:
 					self.log(13, "start record returned %d" % record_res)
 					self.do_backoff()
@@ -427,6 +433,18 @@
 			return False
 		self.end = new_end
 		return True
+
+	def setRecordingPreferredTuner(self, setdefault=False):
+		if self.needChangePriorityFrontend:
+			elem = None
+			if not self.change_frontend and not setdefault:
+				elem = config.usage.recording_frontend_priority.value
+				self.change_frontend = True
+			elif self.change_frontend and setdefault:
+				elem = config.usage.frontend_priority.value
+				self.change_frontend = False
+			if elem is not None:
+				setPreferredTuner(int(elem))
 
 	def sendStandbyNotification(self, answer):
 		RecordTimerEntry.keypress()
--- a/lib/python/Components/UsageConfig.py
+++ b/lib/python/Components/UsageConfig.py
@@ -172,6 +172,8 @@
 	for x in nimmanager.nim_slots:
 		nims.append((str(x.slot), x.getSlotName()))
 	config.usage.frontend_priority = ConfigSelection(default = "-1", choices = nims)
+	nims.append(("-2", _("Disabled")))
+	config.usage.recording_frontend_priority = ConfigSelection(default = "-2", choices = nims)
 	config.misc.disable_background_scan = ConfigYesNo(default = False)
 
 	config.usage.show_event_progress_in_servicelist = ConfigSelection(default = 'barright', choices = [
--- a/data/setup.xml
+++ b/data/setup.xml
@@ -103,6 +103,7 @@
 		<item level="1" text="EPG language selection 2" description="Configure the secondary EPG language.">config.autolanguage.audio_epglanguage_alternative</item>
 	</setup>
 	<setup key="recording" title="Record">
+		<item level="2" text="Preferred tuner for recordings" description="Configure which tuner for recordings will be preferred, when more than one tuner is available.">config.usage.recording_frontend_priority</item>
 		<item level="1" text="Recordings always have priority" description="When enabled, a recording is allowed to interrupt live tv, when there are no free tuners.">config.recording.asktozap</item>
 		<item level="0" text="Margin before recording (minutes)" description="When nonzero, a recording will start earlier than the starting time indicated by the EPG.">config.recording.margin_before</item>
 		<item level="0" text="Margin after recording (minutes)" description="When nonzero, a recording will stop later than the ending time indicated by the EPG.">config.recording.margin_after</item>




#396886 A number of crash logs after upgrade

Posted by Dimitrij on 5 January 2014 - 17:53

No.

plugin SoftcamSetup(autocam mod),delete this plugin.




#396269 Advanced StartupToStandby

Posted by Dimitrij on 3 January 2014 - 18:55

Is there a plugin for having the receiver ALWAYS booting to standby?

 

Or what are the settings to obtain this with Advanced Startup ToStandby?

(a bit to complicated for me).

Example:
Standby mode always
on boot...




#393221 Xtrend ET-9200 crashes during a record if I start EPG and then try to exit th...

Posted by Dimitrij on 21 December 2013 - 07:16

Yep...

Old /usr/lib/enigma2/python/Components/EpgList.py

Delete /usr/lib/enigma2/python/Components/EpgList.py and update box




#392215 History Zap Selector

Posted by Dimitrij on 15 December 2013 - 18:44

version 1.8




#389174 ChannelSelection

Posted by Dimitrij on 26 November 2013 - 06:36

Again what are you doing to get the so called by you described mess.
Xqq... I do not get it anymore?

 

Just add it and the issue will be closed.

	def correctChannelNumber(self):
		current_ref = self.session.nav.getCurrentlyPlayingServiceOrGroup()
		if self.dopipzap:
			tmp_mode = config.servicelist.lastmode.value
			tmp_root = self.getRoot()
			tmp_ref = self.getCurrentSelection()
+			pip_ref = self.session.pip.getCurrentService()
+			if tmp_ref and pip_ref and tmp_ref != pip_ref: # sanity checks!!!
+				return



#388880 EPGRefresh

Posted by Dimitrij on 24 November 2013 - 14:47

Plugin for PLi image.




#387422 History Zap Selector

Posted by Dimitrij on 17 November 2013 - 20:26

done




#383781 Extentended Number Zap

Posted by Dimitrij on 30 October 2013 - 17:39

Version 1.0-rc9

-add correct Channel Number

-find iptv picons




#378387 TMBD Details

Posted by Dimitrij on 7 October 2013 - 05:16

version 5.0-rc11

-fix  themoviedb.org




#368604 FullBackup

Posted by Dimitrij on 25 August 2013 - 08:30

nere




#368279 Modification EpgList

Posted by Dimitrij on 23 August 2013 - 15:01

I did some more investigation... but the patch is not complete... we should have a complete .patch file with a complete commit. With what is delivered now we must add all stuff manually.

You are a professional in enigma2.
Please make the complete .patch
 I honestly do not know how to do it.

 

P.S.This is my personal request.




#366261 FullBackup

Posted by Dimitrij on 13 August 2013 - 12:26

ver. 2.6
thank betacentauri

P.S.Please replace the version on the feed.




#363030 Crash bij draaien of wisselen schotel(s?)

Posted by Dimitrij on 27 July 2013 - 15:46

fix here http://openpli.org/f...ndpost&p=362960




#359911 OFG

Posted by Dimitrij on 6 July 2013 - 08:27

Not works (in plugin)

ofgwrite_bin = "/usr/lib/enigma2/python/Plugins/Extensions/FullBackup/bin/ofgwrite"
os.system('cp %s /tmp' % ofgwrite_bin)

 

 

Ok (in telnet)

et9x00 login: root
root@et9x00:~# /tmp/ofgwrite /media/hdd/et9x00/

ofgwrite Utility v0.3
Author: Betacentauri
Based upon: mtd-utils-native-1.4.9
Use at your own risk! Make always a backup before use!
Don't use it if you use multiple ubi volumes in ubi layer!

Found kernel file: /media/hdd/et9x00/kernel.bin
Found rootfs file: /media/hdd/et9x00/rootfs.bin

Found /proc/mtd entries:
Device:   Size:     Erasesize:  Name:         Image:
/dev/mtd1 00600000  00020000    "kernel"  ->  /media/hdd/et9x00/kernel.bin
/dev/mtd2 07900000  00020000    "rootfs"  ->  /media/hdd/et9x00/rootfs.bin


Erasing kernel: flash_erase /dev/mtd1 0 0
Erasing 128 Kibyte @ 5e0000 -- 100 % complete
Flashing kernel: nandwrite -pm /dev/mtd1 /media/hdd/et9x00/kernel.bin
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000
Writing data to block 3 at offset 0x60000
Writing data to block 4 at offset 0x80000
Writing data to block 5 at offset 0xa0000
Writing data to block 6 at offset 0xc0000
Writing data to block 7 at offset 0xe0000
Writing data to block 8 at offset 0x100000
Writing data to block 9 at offset 0x120000
Writing data to block 10 at offset 0x140000
Writing data to block 11 at offset 0x160000
Writing data to block 12 at offset 0x180000
Writing data to block 13 at offset 0x1a0000
Writing data to block 14 at offset 0x1c0000
Writing data to block 15 at offset 0x1e0000
Writing data to block 16 at offset 0x200000
Writing data to block 17 at offset 0x220000
Writing data to block 18 at offset 0x240000
Writing data to block 19 at offset 0x260000
Writing data to block 20 at offset 0x280000
Writing data to block 21 at offset 0x2a0000
Writing data to block 22 at offset 0x2c0000
Writing data to block 23 at offset 0x2e0000
Writing data to block 24 at offset 0x300000
Writing data to block 25 at offset 0x320000
Writing data to block 26 at offset 0x340000
Writing data to block 27 at offset 0x360000
Writing data to block 28 at offset 0x380000
Writing data to block 29 at offset 0x3a0000
Writing data to block 30 at offset 0x3c0000
Writing data to block 31 at offset 0x3e0000
Writing data to block 32 at offset 0x400000
Writing data to block 33 at offset 0x420000
Writing data to block 34 at offset 0x440000
Writing data to block 35 at offset 0x460000
Writing data to block 36 at offset 0x480000
Writing data to block 37 at offset 0x4a0000
Writing data to block 38 at offset 0x4c0000
Writing data to block 39 at offset 0x4e0000
Writing data to block 40 at offset 0x500000
Writing data to block 41 at offset 0x520000
Writing data to block 42 at offset 0x540000
Writing data to block 43 at offset 0x560000
Writing data to block 44 at offset 0x580000
Writing data to block 45 at offset 0x5a0000
Writing data to block 46 at offset 0x5c0000
Writing data to block 47 at offset 0x5e0000
Switching to user mode 2
killall: nmbd: no process killed
killall: smbd: no process killed
Syncing filesystem
Remounting root read-only
Erasing rootfs: flash_erase /dev/mtd2 0 0
Erasing 128 Kibyte @ 78e0000 -- 100 % complete
Flashing rootfs: ubiformat /dev/mtd2 -f /media/hdd/et9x00/rootfs.bin
ubiformat: mtd2 (nand), size 126877696 bytes (121.0 MiB), 968 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 967 -- 100 % complete
ubiformat: 968 eraseblocks are supposedly empty
ubiformat: flashing eraseblock 629 -- 100 % complete
ubiformat: formatting eraseblock 967 -- 100 % complete
Successfully flashed rootfs! Rebooting in 5 seconds...