diff options
author | methodus <methodus@web.de> | 2012-10-12 11:45:32 +0200 |
---|---|---|
committer | methodus <methodus@web.de> | 2012-10-12 11:45:32 +0200 |
commit | b0e2b9d4f39d5adf322280269e096c8464a8fda2 (patch) | |
tree | 5b51495008d95d18e90973b898f6a01b55273fb2 /plugins/provider | |
parent | 350f2dc11ffb88ff3310987ed4a103229a3c82d3 (diff) | |
download | vdr-plugin-upnp-b0e2b9d4f39d5adf322280269e096c8464a8fda2.tar.gz vdr-plugin-upnp-b0e2b9d4f39d5adf322280269e096c8464a8fda2.tar.bz2 |
Third step to scan directories provided by plugable providers.
Diffstat (limited to 'plugins/provider')
-rw-r--r-- | plugins/provider/vdrProvider/vdrProvider.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/plugins/provider/vdrProvider/vdrProvider.cpp b/plugins/provider/vdrProvider/vdrProvider.cpp index fa7a32b..b98568f 100644 --- a/plugins/provider/vdrProvider/vdrProvider.cpp +++ b/plugins/provider/vdrProvider/vdrProvider.cpp @@ -15,6 +15,8 @@ #include <tools.h> #include <vdr/thread.h> #include <iostream> +#include <pwd.h> +#include <unistd.h> using namespace std; @@ -93,6 +95,16 @@ public: metadata.SetProperty(cMetadata::Property(property::object::KEY_TITLE, string("VDR Live-TV"))); metadata.SetProperty(cMetadata::Property("dlna:containerType", string("Tuner_1_0"))); + struct passwd *pw; + if((pw = getpwuid(getuid())) == NULL){ + metadata.SetProperty(cMetadata::Property(property::object::KEY_CREATOR, string("Klaus Schmidinger"))); + } else { + string name(pw->pw_gecos); name = name.substr(0,name.find(",,,",0)); + metadata.SetProperty(cMetadata::Property(property::object::KEY_CREATOR, name)); + } + + metadata.SetProperty(cMetadata::Property(property::object::KEY_DESCRIPTION, string("Watch Live-TV"))); + return true; } @@ -116,8 +128,6 @@ public: virtual void Action(){ - dsyslog("VdrProvider\tStarting vdrProvider thread"); - const cSchedules* Schedules; long now = 0; bool modified = false; @@ -151,7 +161,6 @@ public: sleep(2); } - dsyslog("VdrProvider\tStopping vdrProvider thread"); } }; |