Beispiel #1
0
        public void init(SettingsData defaultsettings)
        {
            /* default non-gui settings */
            RegistryKey rkApp   = Registry.LocalMachine.OpenSubKey("SOFTWARE\\For The Record\\Install", false);
            string      ftrpath = ((rkApp != null) ? (string)rkApp.GetValue("", "") : "");

            defaultsettings.ftriconspath = (ftrpath != "" ? ftrpath + "Services\\Channel Logos\\" : "");                                      //"C:\\xmltv\\icons\\4tr\\"
            defaultsettings.ftrguidepath = (ftrpath != "" ? ftrpath + "Services\\XMLTV\\guide.xml" : "");
            defaultsettings.mpiconspath  = Environment.GetEnvironmentVariable("ALLUSERSPROFILE") + "\\Team MediaPortal\\Thumbs\\TV\\Logos\\"; /*"C:\\xmltv\\icons\\mp\\";*/
            defaultsettings.xmltvpath    = "C:\\xmltv\\";

            if (!File.Exists(Application.StartupPath + "\\deft-xmltv.cfg"))
            {
                FileInputDialog d = new FileInputDialog("Path to xmltv", "C:\\xmltv");

                d.ShowDialog();
                defaultsettings.xmltvpath  = d.path;
                defaultsettings.outputfile = d.path + (d.path.EndsWith("\\") ? "" : "\\") + "tvguide.xml";
            }

            _sd = defaultsettings;


            if (!readcfg())
            {
                log.warning("Error reading config file!");
            }
        }
Beispiel #2
0
        public void init(SettingsData defaultsettings)
        {
            /* default non-gui settings */
            RegistryKey rkApp = Registry.LocalMachine.OpenSubKey("SOFTWARE\\For The Record\\Install", false);
            string ftrpath = ((rkApp != null) ? (string)rkApp.GetValue("", "") : "");

            defaultsettings.ftriconspath = (ftrpath != "" ? ftrpath + "Services\\Channel Logos\\" : ""); //"C:\\xmltv\\icons\\4tr\\"
            defaultsettings.ftrguidepath = (ftrpath != "" ? ftrpath + "Services\\XMLTV\\guide.xml" : "");
            defaultsettings.mpiconspath = Environment.GetEnvironmentVariable("ALLUSERSPROFILE") + "\\Team MediaPortal\\Thumbs\\TV\\Logos\\"; /*"C:\\xmltv\\icons\\mp\\";*/
            defaultsettings.xmltvpath = "C:\\xmltv\\";

            if (!File.Exists(Application.StartupPath + "\\deft-xmltv.cfg"))
            {
                FileInputDialog d = new FileInputDialog("Path to xmltv", "C:\\xmltv");

                d.ShowDialog();
                defaultsettings.xmltvpath = d.path;
                defaultsettings.outputfile = d.path + (d.path.EndsWith("\\") ? "" : "\\") + "tvguide.xml";
            }

            _sd = defaultsettings;

            if (!readcfg())
            {
                log.warning("Error reading config file!");
            }
        }