diff --git a/README.md b/README.md
index 8b5a40dd..01489fc1 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,8 @@
# DemonEditor
-Enigma2 channel and satellites list editor for GNU/Linux.
+
+Experimental branch! For support Neutrino-MP.
+
+Enigma2 channel and satellites list editor for GNU/Linux.
Focused on the convenience of working in lists from the keyboard.
The mouse is also fully supported (Drag and Drop etc)
@@ -15,7 +18,7 @@ Ctrl + H - hide/skip.
Ability to import IPTV into bouquet from m3u files!
-Tests only on OpenPLi based image with GM 990 Spark Reloaded receiver
+Tests only on OpenPLi based image with GM 990 Spark Reloaded receiver
in my preferred linux distro (Last Linux Mint 18.* - MATE 64-bit)!
Minimum requirements: Python >= 3.5.2 and GTK+ 3 with PyGObject bindings.
diff --git a/app/properties.py b/app/properties.py
index 09aae814..53edb578 100644
--- a/app/properties.py
+++ b/app/properties.py
@@ -1,25 +1,35 @@
import json
import os
+from enum import Enum
from pathlib import Path
-
CONFIG_PATH = str(Path.home()) + "/.config/demon-editor/"
CONFIG_FILE = CONFIG_PATH + "config.json"
DATA_PATH = "data/"
+class Profile(Enum):
+ """ Profiles for settings """
+ ENIGMA_2 = "0"
+ NEUTRINO_MP = "1"
+
+
def get_config():
os.makedirs(os.path.dirname(CONFIG_PATH), exist_ok=True) # create dir if not exist
os.makedirs(os.path.dirname(DATA_PATH), exist_ok=True)
if not os.path.isfile(CONFIG_FILE) or os.stat(CONFIG_FILE).st_size == 0:
- with open(CONFIG_FILE, "w") as default_config_file:
- json.dump(get_default_settings(), default_config_file)
+ reset_config()
with open(CONFIG_FILE, "r") as config_file:
return json.load(config_file)
+def reset_config():
+ with open(CONFIG_FILE, "w") as default_config_file:
+ json.dump(get_default_settings(), default_config_file)
+
+
def write_config(config):
assert isinstance(config, dict)
with open(CONFIG_FILE, "w") as config_file:
@@ -27,12 +37,22 @@ def write_config(config):
def get_default_settings():
- return {"host": "127.0.0.1", "port": "21",
+ return {
+ Profile.ENIGMA_2.value: {
+ "host": "127.0.0.1", "port": "21",
"user": "root", "password": "root",
"services_path": "/etc/enigma2/",
"user_bouquet_path": "/etc/enigma2/",
"satellites_xml_path": "/etc/tuxbox/",
- "data_dir_path": DATA_PATH}
+ "data_dir_path": DATA_PATH},
+ Profile.NEUTRINO_MP.value: {
+ "host": "127.0.0.1", "port": "21",
+ "user": "root", "password": "root",
+ "services_path": "/var/tuxbox/config/zapit/",
+ "user_bouquet_path": "/var/tuxbox/config/zapit/",
+ "satellites_xml_path": "/var/tuxbox/config/",
+ "data_dir_path": DATA_PATH},
+ "profile": Profile.ENIGMA_2.value}
if __name__ == "__main__":
diff --git a/app/ui/dialogs.glade b/app/ui/dialogs.glade
index 2e0ada2d..5c356754 100644
--- a/app/ui/dialogs.glade
+++ b/app/ui/dialogs.glade
@@ -9,7 +9,7 @@
system-help
normal
DemonEditor
- 0.1.2 Pre-alpha
+ 0.2.0 Pre-alpha
2017 Dmitriy Yefremov
dmitry.v.yefremov@gmail.com
@@ -613,7 +613,10 @@ dmitry.v.yefremov@gmail.com
True
True
- 2
+ 0
@@ -642,6 +646,7 @@ dmitry.v.yefremov@gmail.com
True
True
True
+ True
True
@@ -733,7 +738,7 @@ dmitry.v.yefremov@gmail.com
True
True
root
- emblem-personal
+ avatar-default-symbolic
False
@@ -748,7 +753,7 @@ dmitry.v.yefremov@gmail.com
False
●
root
- emblem-nowrite
+ emblem-readonly
False
password
@@ -778,74 +783,177 @@ dmitry.v.yefremov@gmail.com
-