[mythtv] [PATCH] MythVideo - Set directory for posters
Neil Whelchel
koyama at firstlight.net
Wed Mar 10 06:40:13 EST 2004
Hello,
If anyone is interested I created a patch against 0.14 to set the location
(directory) to store the posters.
-Neil Whelchel-
First Light Internet Services
760 366-0145
- We don't do Window$, that's what the janitor is for -
-------------- next part --------------
diff -ur ../mythvideo-0.14.dist/mythvideo/globalsettings.cpp ./mythvideo/globalsettings.cpp
--- ../mythvideo-0.14.dist/mythvideo/globalsettings.cpp Mon Jan 12 23:40:08 2004
+++ ./mythvideo/globalsettings.cpp Sat Feb 7 21:17:01 2004
@@ -21,6 +21,20 @@
};
};
+
+class VideoCoverDirectory: public LineEditSetting, public GlobalSetting {
+public:
+ VideoCoverDirectory():
+ GlobalSetting("VideoCoverDir") {
+ setLabel(QObject::tr("Directory that holds banners"));
+ setValue("/share/mythtv/MythVideo");
+ setHelpText(QObject::tr("This directory must exist, and the user "
+ "running MythVideo only needs to have read permission "
+ "to the directory."));
+ };
+};
+
+
class VideoDefaultParentalLevel: public ComboBoxSetting, public GlobalSetting {
public:
VideoDefaultParentalLevel() :
@@ -120,6 +134,7 @@
VerticalConfigurationGroup* general = new VerticalConfigurationGroup(false);
general->setLabel(QObject::tr("General Settings"));
general->addChild(new VideoStartupDirectory());
+ general->addChild(new VideoCoverDirectory());
general->addChild(new VideoDefaultParentalLevel());
general->addChild(new VideoAdminPassword());
general->addChild(new VideoAggressivePC());
diff -ur ../mythvideo-0.14.dist/mythvideo/videomanager.cpp ./mythvideo/videomanager.cpp
--- ../mythvideo-0.14.dist/mythvideo/videomanager.cpp Sun Jan 18 09:34:04 2004
+++ ./mythvideo/videomanager.cpp Sat Feb 7 21:27:55 2004
@@ -449,16 +449,9 @@
return filename;
}
- char *home = getenv("HOME");
- QString fileprefix = QString(home) + "/.mythtv";
+ QString fileprefix = gContext->GetSetting("VideoCoverDir");
QDir dir(fileprefix);
- if (!dir.exists())
- dir.mkdir(fileprefix);
-
- fileprefix += "/MythVideo";
-
- dir = QDir(fileprefix);
if (!dir.exists())
dir.mkdir(fileprefix);
More information about the mythtv-dev
mailing list