| 8 | using namespace c2d; |
| 9 | |
| 10 | PPLAYConfig::PPLAYConfig(Main *main, int version) |
| 11 | : Config("PPLAY", main->getIo()->getDataPath() + "pplay.cfg", version) { |
| 12 | |
| 13 | addOption({OPT_NETWORK, "http://samples.ffmpeg.org/"}); |
| 14 | #ifdef __SWITCH__ |
| 15 | addOption({OPT_UMS_DEVICE, "ums0:/"}); |
| 16 | #endif |
| 17 | addOption({OPT_HOME_PATH, main->getIo()->getDataPath()}); |
| 18 | addOption({OPT_LAST_PATH, main->getIo()->getDataPath()}); |
| 19 | addOption({OPT_CACHE_MEDIA_INFO, (int) 1}); |
| 20 | //addOption({OPT_BUFFER, "Low"}); // Low, Medium, High, VeryHigh |
| 21 | #ifdef __SWITCH__ |
| 22 | addOption({OPT_CPU_BOOST, "Disabled"}); // Disabled, Enabled |
| 23 | #endif |
| 24 | addOption({OPT_TMDB_LANGUAGE, "en-US"}); |
| 25 | |
| 26 | // load the configuration from file, overwriting default values |
| 27 | load(); |
| 28 | |
| 29 | if (!main->getIo()->exist(getOption(OPT_HOME_PATH)->getString())) { |
| 30 | getOption(OPT_HOME_PATH)->setString(main->getIo()->getDataPath()); |
| 31 | } |
| 32 | |
| 33 | if (!main->getIo()->exist(getOption(OPT_LAST_PATH)->getString())) { |
| 34 | getOption(OPT_LAST_PATH)->setString(main->getIo()->getDataPath()); |
| 35 | } |
| 36 | |
| 37 | if (getOption(OPT_TMDB_LANGUAGE)->getString().empty()) { |
| 38 | getOption(OPT_TMDB_LANGUAGE)->setString("en-US"); |
| 39 | } |
| 40 | |
| 41 | // save configuration, in case new options needs to be added |
| 42 | save(); |
| 43 | } |
nothing calls this directly
no test coverage detected