#include #include "settings.h" namespace Settings { QMap defaults = { // General info {"General/UI_scale", 100}, {"General/CurrentInitStage", "0"}, {"General/MicroUpdates", false}, {"General/PatchDownloadDir", "data"}, // Lotro Manager {"Lotro/game_path", "none"}, {"Lotro/original_locale", "English"}, {"Lotro/skip_raw_download", true}, {"Lotro/no_splash_screen", false}, // Backup {"Backup/installed", false}, {"Backup/path", "/backup/"}, {"Backup/creation_time", "none"}, // Databases download settings {"DatabaseDownload/text", false}, // TextsPatch {"DatabaseDownload/font", false}, // TextsPatch {"DatabaseDownload/image", false}, // GraphicsPatch {"DatabaseDownload/loadscreen", false}, // GraphicsPatch {"DatabaseDownload/texture", false}, // GraphicsPatch {"DatabaseDownload/sound", false}, // SoundsPatch {"DatabaseDownload/video", false}, // VideosPatch {"DatabaseDownload/micro", false}, // MicroPatch // Flags, meaning that database is fresh and needs to be installed {"DatabaseNeedInstall/text", false}, // TextsPatch {"DatabaseNeedInstall/font", false}, // TextsPatch {"DatabaseNeedInstall/image", false}, // GraphicsPatch {"DatabaseNeedInstall/loadscreen", false}, // GraphicsPatch {"DatabaseNeedInstall/texture", false}, // GraphicsPatch {"DatabaseNeedInstall/sound", false}, // SoundsPatch {"DatabaseNeedInstall/video", false}, // VideosPatch {"DatabaseNeedInstall/micro", false}, // MircoPatch // Localisation components, showed and edited by user in GUI {"Components/texts_main", false}, // TextsPatch {"Components/texts_items", false}, // TextsPatch {"Components/texts_emotes", false}, // TextsPatch {"Components/maps", false}, // ImagesPatch {"Components/loadscreens", false}, // ImagesPatch {"Components/textures", false}, // ImagesPatch {"Components/sounds", false}, // SoundsPatch {"Components/videos", false}, // VideosPatch {"Components/micropatch", false}, // PatchList // Network settings {"Network/site_url", "http://translate.lotros.ru/"}, {"Network/forum_url", "http://lotros.ru/"}, {"Network/discord_url", "https://discord.gg/j25MdKR"}, {"Network/add_report_url", "http://translate.lotros.ru/bugs/add"}, {"Network/donate_url", "http://translate.lotros.ru/donate"}, {"Network/game_servers_status", "http://translate.lotros.ru/servers.txt"}, {"Network/game_servers_message", "http://translate.lotros.ru/profmessage.txt"}, {"Network/weekly_code_url", "http://translate.lotros.ru/coupon.txt"}, {"Network/news_list_url", "http://translate.lotros.ru/groupware/launcher_news/30/1"}, {"Network/patch_updates_url", "http://translate.lotros.ru/groupware/check_updates"} }; void setDefaultSettings() { QSettings settings; foreach (QString key, defaults.keys()) { settings.setValue(key, defaults[key]); } } QVariant getValue(QString key) { QSettings settings; return settings.value(key, defaults.value(key, QVariant())); } void setValue(QString key, QVariant value) { QSettings settings; settings.setValue(key, value); } SettingsBackup createSettingsBackup() { QSettings settings; QMap keysValuesPairs; QStringList keys = settings.allKeys(); QStringListIterator it(keys); while (it.hasNext()) { QString currentKey = it.next(); keysValuesPairs.insert(currentKey, settings.value(currentKey)); } return keysValuesPairs; } void restoreFromSettingsBackup(const SettingsBackup& backup) { QSettings settings; settings.clear(); for (auto i = backup.begin(); i != backup.end(); ++i) { settings.setValue(i.key(), i.value()); } } void updatePatchComponentsDependencies() { QSettings settings; auto isComponentActive = [&settings](const QString& component) -> bool { return settings.value("Components/" + component).toBool(); }; if (isComponentActive("texts_main") || isComponentActive("texts_items") || isComponentActive("texts_emotes") || isComponentActive("videos")) { // Videos also need text database, because it contains videos path references settings.setValue("DatabaseDownload/text", true); } else { settings.setValue("DatabaseDownload/text", false); } if (isComponentActive("texts_main") || isComponentActive("texts_items") || isComponentActive("texts_emotes")) { settings.setValue("DatabaseDownload/font", true); } else { settings.setValue("DatabaseDownload/font", false); } settings.setValue("DatabaseDownload/image", isComponentActive("maps")); settings.setValue("DatabaseDownload/loadscreen", isComponentActive("loadscreens")); settings.setValue("DatabaseDownload/texture", isComponentActive("textures")); settings.setValue("DatabaseDownload/sound", isComponentActive("sounds")); settings.setValue("DatabaseDownload/video", isComponentActive("videos")); settings.setValue("DatabaseDownload/micro", isComponentActive("micropatch")); } } /* namespace Settings */ PANIC: session(release): write data/sessions/5/d/5dc6195b11b15e7c: no space left on device

PANIC

session(release): write data/sessions/5/d/5dc6195b11b15e7c: no space left on device
github.com/go-macaron/session@v0.0.0-20190805070824-1a3cdc6f5659/session.go:199 (0x8b2934)
gopkg.in/macaron.v1@v1.3.9/context.go:79 (0x83d0a0)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:157 (0x80ab07)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:135 (0x80a8a8)
gopkg.in/macaron.v1@v1.3.9/context.go:121 (0x83d1f8)
gopkg.in/macaron.v1@v1.3.9/context.go:112 (0x84fdb5)
gopkg.in/macaron.v1@v1.3.9/recovery.go:161 (0x84fda8)
gopkg.in/macaron.v1@v1.3.9/logger.go:40 (0x840c73)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:157 (0x80ab07)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:135 (0x80a8a8)
gopkg.in/macaron.v1@v1.3.9/context.go:121 (0x83d1f8)
gopkg.in/macaron.v1@v1.3.9/router.go:187 (0x850fc6)
gopkg.in/macaron.v1@v1.3.9/router.go:303 (0x8493e5)
gopkg.in/macaron.v1@v1.3.9/macaron.go:220 (0x841fca)
net/http/server.go:2836 (0x7a79b2)
net/http/server.go:1924 (0x7a341b)
runtime/asm_amd64.s:1373 (0x46f9f0)