diff --git a/README.md b/README.md index 6d73ae4..9614aa4 100644 --- a/README.md +++ b/README.md @@ -13,13 +13,8 @@ Download and unzip the file from releases and place the nextcloud.app into the " After login you are at the root file folder of your nextcloud instance. To download a file, click on it. A synced file can be either opened, synced or removed. -## To-Do's -* [ ] compare local files to server files (currently local files are not shown) -* [ ] add options --> start on which folder, foldersize, show only local data in nextcloud structure -* [ ] open audiobooks, pictures - ### Known issues -* The main menu of the PB shows new books only if it turns into sleep modus. Otherwise the new books can only be opened from the nextcloud applicaton +* The main menu of the PB shows new books only if it turns into sleep modus. Otherwise the new books can only be opened from the nextcloud applicaton. ## Disclamer diff --git a/src/util/item.cpp b/src/util/item.cpp index 4c6aac5..9a40677 100644 --- a/src/util/item.cpp +++ b/src/util/item.cpp @@ -68,16 +68,29 @@ Item::Item(const string &localPath, FileState state) : _localPath(localPath), _s void Item::open() const { if (_fileType.find("application/epub+zip") != string::npos || - _fileType.find("application/pdf") != string::npos) + _fileType.find("application/pdf") != string::npos || + _fileType.find("application/octet-stream") != string::npos || + _fileType.find("text/plain") != string::npos || + _fileType.find("text/html") != string::npos || + _fileType.find("text/rtf") != string::npos || + _fileType.find("application/msword") != string::npos || + _fileType.find("application/x-mobipocket-ebook") != string::npos || + _fileType.find("application/vnd.openxmlformats-officedocument.wordprocessingml.document") != string::npos || + _fileType.find("application/x-fictionbook+xml") != string::npos) { + OpenBook(_localPath.c_str(), "", 0); } /* - else if (_fileType.find("image/jpeg") != string::npos) + else if (_fileType.find("audio/mpeg") != string::npos || + _fileType.find("audio/ogg") != string::npos || + _fileType.find("audio/mp4") != string::npos || + _fileType.find("audio/m4b") != string::npos) { - Message(3, "Info", "Opening image", 600); + PlayFile(_localPath.c_str()); + OpenPlayer(); } - else if (_fileType.find("text") != string::npos) + else if (_fileType.find("image/jpeg") != string::npos) { Message(3, "Info", "Opening image", 600); }