[dvbapp] remove patches in bsp layer and cleanup unused patch files. (patches were...
[vuplus_openvuplus_3.0] / meta-bsp / recipes-vuplus / enigma2 / enigma2 / enigma2_vuplus_check_recording.patch
diff --git a/meta-bsp/recipes-vuplus/enigma2/enigma2/enigma2_vuplus_check_recording.patch b/meta-bsp/recipes-vuplus/enigma2/enigma2/enigma2_vuplus_check_recording.patch
deleted file mode 100644 (file)
index cc6b2bc..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-diff --git a/RecordTimer.py b/RecordTimer.py
-index 58ef5b3..6e0862e 100755
---- a/RecordTimer.py
-+++ b/RecordTimer.py
-@@ -410,6 +410,15 @@ class RecordTimerEntry(timer.TimerEntry, object):
-       record_service = property(lambda self: self.__record_service, setRecordService)
-+      def checkRecordingPath(self):
-+              old_Filename = self.Filename
-+              self.calculateFilename()
-+              filename = self.Filename
-+              self.Filename = old_Filename
-+
-+              from Components import Harddisk
-+              return not Harddisk.isUsbStorage(filename)
-+
- def createTimer(xml):
-       begin = int(xml.get("begin"))
-       end = int(xml.get("end"))
-@@ -466,6 +475,16 @@ class RecordTimer(timer.Timer):
-                       print "unable to load timers from file!"
-       def doActivate(self, w):
-+              if w.state == RecordTimerEntry.StateWaiting and w.checkRecordingPath() is False:
-+                      service_name = w.service_ref.getServiceName()
-+                      self.timer_list.remove(w)
-+                      if w.dontSave is False:
-+                              w.resetState()
-+                              w.disable()
-+                              self.addTimerEntry(w)
-+                      Notifications.AddNotification(MessageBox, _("Can not recording on a USB storage.\nService name : %s"% service_name), MessageBox.TYPE_ERROR)
-+                      return
-+
-               # when activating a timer which has already passed,
-               # simply abort the timer. don't run trough all the stages.
-               if w.shouldSkip():
-diff --git a/lib/python/Components/Harddisk.py b/lib/python/Components/Harddisk.py
-index fe99426..e40f1b5 100755
---- a/lib/python/Components/Harddisk.py
-+++ b/lib/python/Components/Harddisk.py
-@@ -58,6 +58,30 @@ def enableUdevEvent(enable = True):
-       print "CMD : ", cmd
-       system(cmd)
-+def getDeviceFile(dev_path):
-+      for parts in getProcMounts():
-+              if os.path.realpath(parts[1]).startswith(dev_path):
-+                      return parts[0]
-+
-+def isUsbStorage(filename):
-+      _dirname = os.path.dirname(filename)
-+      _dirname = os.path.realpath(_dirname)
-+      while not os.path.ismount(_dirname):
-+              _dirname = os.path.dirname(_dirname)
-+
-+      if _dirname == '/':
-+              return False
-+
-+      dev = getDeviceFile(_dirname)
-+      if dev:
-+              dev = os.path.basename(dev)
-+              phyPath = os.path.realpath('/sys/block/' + dev[:3])
-+              for x in glob.glob("/sys/bus/usb/devices/usb*"):
-+                      if phyPath.find(os.path.realpath(x)) != -1:
-+                              return True
-+
-+      return False
-+
- DEVTYPE_UDEV = 0
- DEVTYPE_DEVFS = 1
-diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py
-index baeaacb..cb28ffc 100755
---- a/lib/python/Screens/InfoBarGenerics.py
-+++ b/lib/python/Screens/InfoBarGenerics.py
-@@ -1239,6 +1239,11 @@ class InfoBarTimeshift:
-               if self.timeshift_enabled:
-                       print "hu, timeshift already enabled?"
-               else:
-+                      from Components import Harddisk
-+                      if Harddisk.isUsbStorage(config.usage.timeshift_path.value):
-+                              self.session.open(MessageBox, _("Timeshift not possible on a USB storage."), MessageBox.TYPE_ERROR)
-+                              return 0
-+
-                       if not ts.startTimeshift():
-                               self.timeshift_enabled = 1
-diff --git a/timer.py b/timer.py
-index aaae0b2..d58a83e 100644
---- a/timer.py
-+++ b/timer.py
-@@ -232,6 +232,10 @@ class Timer:
-               self.setNextActivation(min)
-       
-       def timeChanged(self, timer):
-+              if timer not in (self.processed_timers + self.timer_list):
-+                      print "timer not found"
-+                      return
-+
-               print "time changed"
-               timer.timeChanged()
-               if timer.state == TimerEntry.StateEnded: