From 7560beb3e371704d798259ca1ea927bf4575306c Mon Sep 17 00:00:00 2001 From: Felix Domke Date: Thu, 29 Oct 2009 01:54:31 +0100 Subject: By Anders Holst: At regular intervalls there are questions in the forum (in at least three or four different threads on only this subject) on how to configure the recording paths so you don't have to set them to the same thing over and over again in e.g EPG timers. People apparently forget to set it, and miss their recordings because the harddisk is full or not built in. They want an easy way to change the default from /hdd/movies/ to a NAS or a USB device. I have rebased the patch in this thread from March 23, added two minor bugfixes, and hopefully made it less controversial by making sure that it only affects the expert setup level. I don't think there should be anything controversial about this patch now, and no known bugs. It only provides functionality that several people are screaming to get. Synopsis: The patch changes the "Timeshift path..." setup dialogue into a "Recording paths..." dialogue where you can easily configure both the timeshift and the other recording paths. --- lib/python/Screens/TimerEntry.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'lib/python/Screens/TimerEntry.py') diff --git a/lib/python/Screens/TimerEntry.py b/lib/python/Screens/TimerEntry.py index edd19685..5813bac5 100644 --- a/lib/python/Screens/TimerEntry.py +++ b/lib/python/Screens/TimerEntry.py @@ -8,11 +8,11 @@ from Components.MenuList import MenuList from Components.Button import Button from Components.Label import Label from Components.Pixmap import Pixmap +from Components.UsageConfig import defaultMoviePath from Screens.MovieSelection import getPreferredTagEditor from Screens.LocationBox import MovieLocationBox from Screens.ChoiceBox import ChoiceBox from RecordTimer import AFTEREVENT -from Tools.Directories import resolveFilename, SCOPE_HDD from enigma import eEPGCache from time import localtime, mktime, time, strftime from datetime import datetime @@ -106,7 +106,7 @@ class TimerEntry(Screen, ConfigListScreen): self.timerentry_starttime = ConfigClock(default = self.timer.begin) self.timerentry_endtime = ConfigClock(default = self.timer.end) - default = self.timer.dirname or resolveFilename(SCOPE_HDD) + default = self.timer.dirname or defaultMoviePath() tmp = config.movielist.videodirs.value if default not in tmp: tmp.append(default) @@ -273,9 +273,10 @@ class TimerEntry(Screen, ConfigListScreen): self.timer.service_ref = self.timerentry_service_ref self.timer.tags = self.timerentry_tags - self.timer.dirname = self.timerentry_dirname.value - config.movielist.last_timer_videodir.value = self.timer.dirname - config.movielist.last_timer_videodir.save() + if self.timer.dirname or self.timerentry_dirname.value != defaultMoviePath(): + self.timer.dirname = self.timerentry_dirname.value + config.movielist.last_timer_videodir.value = self.timer.dirname + config.movielist.last_timer_videodir.save() if self.timerentry_type.value == "once": self.timer.begin, self.timer.end = self.getBeginEnd() -- cgit v1.2.3