Feature: support more file types

pull/23/head 0.4
JuanJakobo 2020-11-10 10:27:16 +01:00
parent f2b34d08b4
commit 63a2835fc8
2 changed files with 18 additions and 10 deletions

View File

@ -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

View File

@ -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);
}