Skip to content

Commit

Permalink
Update README and fixed empty config options
Browse files Browse the repository at this point in the history
  • Loading branch information
proconsule committed Oct 23, 2021
1 parent a7adcd1 commit 794be33
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 7 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,29 @@ NXMP support most popular video format , it support HTTP and FTP streaming and i

Installation
----
Edit config.ini
```
[Main]
[Network]
[Enigma2]
```

Netowrk have syntax

```
[Network]
source=TESTFtp|ftp://user:[email protected]:21/path/
source=TestHTTP|http://192.168.1.10/path/
```

Eningma2 have syntax
```
[Enigma2]
e2address=http://192.168.1.10/
```

Copy "nxmp" folder to switch sdcard (/switch/nxmp)

Usage
Expand Down
2 changes: 1 addition & 1 deletion include/gui.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ typedef struct {
MENU_STATES state = MENU_STATE_HOME;
MENU_STATES laststate = MENU_STATE_FILEBROWSER;
int selected = 0;
std::string localpath = "/";
std::string localpath = "/switch/nxmp";
std::string enigma2bouquet = "";
std::vector<FsDirectoryEntry> localfileentries;
std::vector<networkSource> networksources;
Expand Down
2 changes: 1 addition & 1 deletion source/UI/filebrowser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace Windows {
*focus = true;
}
if (ImGui::BeginMenuBar()) {
ImGui::TextUnformatted("current path: %s",item.localpath.c_str());
ImGui::Text("current path: %s",item.localpath.c_str());
ImGui::EndMenuBar();
}
if (ImGui::BeginListBox("File Browser Menu",ImVec2(1280.0f, 720.0f))){
Expand Down
12 changes: 8 additions & 4 deletions source/UI/mainMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,14 @@ namespace Windows {
}
if(n==2){
std::string e2uri = configini->getEnigma();
urlschema e2schema = Utility::parseUrl(e2uri);
enigma2->enigma2ip = e2schema.server;
enigma2->getServices();
item.state = MENU_STATE_ENIGMABROWSER;
if(e2uri == ""){
item.state = MENU_STATE_ENIGMABROWSER;
}else{
urlschema e2schema = Utility::parseUrl(e2uri);
enigma2->enigma2ip = e2schema.server;
enigma2->getServices();
item.state = MENU_STATE_ENIGMABROWSER;
}
}
}
if (is_selected)
Expand Down
1 change: 1 addition & 0 deletions source/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ std::vector<networkSource> Config::getNetworks(){
std::vector<networkSource> tmpret;
CSimpleIniA::TNamesDepend values;
ini->GetAllValues("Network", "source", values);
if(values.size() == 0)return tmpret;
CSimpleIniA::TNamesDepend::const_iterator it;

for (it = values.begin(); it != values.end(); ++it) {
Expand Down
2 changes: 1 addition & 1 deletion source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ int main() {

printf("Loading Config\n");

configini = new Config("config.ini");
configini = new Config("config-test.ini");

/*
if(rc<0){
Expand Down

0 comments on commit 794be33

Please sign in to comment.