Comments (4)
this patch should fix it
diff --git a/pvr.filmon/resources/language/resource.language.en_gb/strings.po b/pvr.filmon/resources/language/resource.language.en_gb/strings.po
index d282de7..a570dbb 100644
--- a/pvr.filmon/resources/language/resource.language.en_gb/strings.po
+++ b/pvr.filmon/resources/language/resource.language.en_gb/strings.po
@@ -23,3 +23,9 @@ msgstr ""
msgctxt "#30001"
msgid "Password"
msgstr ""
+
+msgctxt "#30002"
+msgid "Prefer HD"
+msgstr ""
+
+
diff --git a/pvr.filmon/resources/settings.xml b/pvr.filmon/resources/settings.xml
index d104352..4fede35 100644
--- a/pvr.filmon/resources/settings.xml
+++ b/pvr.filmon/resources/settings.xml
@@ -2,4 +2,5 @@
-
\ No newline at end of file
+
diff --git a/src/FilmonAPI.cpp b/src/FilmonAPI.cpp
index 76c87bc..dac1fda 100644
--- a/src/FilmonAPI.cpp
+++ b/src/FilmonAPI.cpp
@@ -44,11 +44,14 @@
#define TIMER_STATUS "Accepted"
#define OFF_AIR "Off Air"
/* open without caching. regardless to file type. */
#define READ_NO_CACHE 0x08
using namespace ADDON;
// Attempt at genres
typedef struct {
int genreType;
@@ -343,14 +346,32 @@ bool filmonAPIgetChannel(unsigned int channelId, FILMON_CHANNEL *channel) {
std::string streamURL;
unsigned int streamCount = streams.size();
unsigned int stream = 0;
-
bool Pref_HD =true;
-
for (stream = 0; stream < streamCount; stream++) { std::string quality = streams[stream]["quality"].asString();
-
if (quality.compare(std::string("high")) == 0 || quality.compare(std::string("480p")) == 0 || quality.compare(std::string("HD")) == 0) {
-
XBMC->Log(LOG_DEBUG, "high quality stream found: %s", quality.c_str());
-
break;
-
} else {
-
XBMC->Log(LOG_DEBUG, "low quality stream found: %s", quality.c_str());
-
if (XBMC->GetSetting("preferhd",&Pref_HD)){
-
XBMC->Log(LOG_DEBUG, "Prefer high quality stream");
-
if (quality.compare(std::string("high")) == 0 || quality.compare(std::string("480p")) == 0 || quality.compare(std::string("HD")) == 0) {
-
XBMC->Log(LOG_DEBUG, "high quality stream found: %s", quality.c_str());
-
break;
-
} else {
-
XBMC->Log(LOG_DEBUG, "low quality stream found: %s", quality.c_str());
-
}
-
}
-
else{
-
XBMC->Log(LOG_DEBUG, "Prefer low quality stream");
-
if (quality.compare(std::string("high")) == 0 || quality.compare(std::string("480p")) == 0 || quality.compare(std::string("HD")) == 0) {
-
XBMC->Log(LOG_DEBUG, "high quality stream found: %s", quality.c_str());
-
} else {
-
XBMC->Log(LOG_DEBUG, "low quality stream found: %s", quality.c_str());
-
break;
-
} }
- }
std::string chTitle = title.asString();
std::string iconPath = icon.asString();
diff --git a/src/client.cpp b/src/client.cpp
index 427c0cb..a124560 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -48,6 +48,7 @@ std::string g_strUserPath = "";
std::string g_strClientPath = "";
std::string g_strUsername = "";
std::string g_strPassword = "";
+bool g_boolPreferHd = true;
CHelper_libXBMC_addon *XBMC = NULL;
CHelper_libXBMC_pvr *PVR = NULL;
@@ -56,6 +57,7 @@ extern "C" {void ADDON_ReadSettings(void) {
char buffer[1024] = ""; - }
-
bool Pref_HD =true;
/* read setting "username" from settings.xml */
if (XBMC->GetSetting("username", buffer))
@@ -70,6 +72,13 @@ void ADDON_ReadSettings(void) {
else
g_strPassword = "";
- /* read setting "preferhd" from settings.xml */
- if (XBMC->GetSetting("preferhd", &Pref_HD))
-
g_boolPreferHd = true;
- else
-
g_boolPreferHd = false;
}
@@ -132,29 +141,49 @@ unsigned int ADDON_GetSettings(ADDON_StructSetting ***sSet) {
return 0;
}
-ADDON_STATUS ADDON_SetSetting(const char *settingName,
-
const void *settingValue) {
- string str = settingName;
- if (str == "username") {
-
string tmp_sUsername = g_strUsername;
-
g_strUsername = (const char*) settingValue;
-
if (tmp_sUsername != g_strUsername) {
-
XBMC->Log(LOG_INFO, "%s - Changed Setting 'username'",
-
**FUNCTION**);
-
return ADDON_STATUS_NEED_RESTART;
-
}
- } else if (str == "password") {
-
string tmp_sPassword = g_strPassword;
-
g_strPassword = (const char*) settingValue;
-
if (tmp_sPassword != g_strPassword) {
-
XBMC->Log(LOG_INFO, "%s - Changed Setting 'password'",
-
**FUNCTION**);
-
return ADDON_STATUS_NEED_RESTART;
-
}
- }
- return ADDON_STATUS_OK;
+ADDON_STATUS ADDON_SetSetting
- (const char *settingName, const void *settingValue)
+{
+#define UPDATE_STR(key, var)\ - if (!strcmp(settingName, key))\
- {\
- if (strcmp(var.c_str(), (const char*)settingValue) != 0)\
- {\
-
XBMC->Log(LOG_INFO, "%s - Changed Setting",\
-
**FUNCTION**);\
-
return ADDON_STATUS_NEED_RESTART;\
- }\
- return ADDON_STATUS_OK;\
- }
+#define UPDATE_INT(key, type, var)\
- if (!strcmp(settingName, key))\
- {\
- if (var != (type)settingValue)\
- {\
-
XBMC->Log(LOG_INFO, "%s - Changed Setting",\
-
**FUNCTION**);\
-
return ADDON_STATUS_NEED_RESTART;\
- }\
- return ADDON_STATUS_OK;\
- }
- /* Connection */
- UPDATE_STR("username", g_strUsername);
- UPDATE_STR("password", g_strPassword);
- /* HD */
- UPDATE_INT("preferhd", bool, g_boolPreferHd);
- return ADDON_STATUS_OK;
+#undef UPDATE_INT
+#undef UPDATE_STR
}
void ADDON_Stop() {
}
from pvr.filmon.
Assume this was/is fixed as option within add-on settings for enabling HD which is disabled on initial installation of add-on and addition of user film-on login details. To be closed?
from pvr.filmon.
Looks like this can be closed indeed.
from pvr.filmon.
yep
from pvr.filmon.
Related Issues (17)
- CCurlFile::FillBuffer - Failed: SSL connect error(35) - python-software-properties unavailable for ubuntu 20.04 HOT 17
- Question: Can this work on... HOT 3
- Login Fails HOT 3
- Missing CPack include
- Abilty to sort Filmon favourite channels via Kodi HOT 2
- Access and Playback of Filmon recordings from TV - Recordings option.
- Kodi 17.0 crashes when Live TV pvr.filmon is enabled with TVheadened (backends & frontends) HOT 1
- How to re-install FilmOn PVR after un-installing HOT 3
- Issues with other PVR Backends HOT 1
- Filmon API changes possibly causing user login issues with pvr.filmon? HOT 9
- No streaming, Krypton beta 7, Windows 10 & macOS Sierra HOT 5
- Create release
- Requires inputstream.adaptive and inputstream.rtmp
- Streaming not working - EPG working fine
- Stuck importing guide HOT 6
- Add support for PVR_RECORDING.iChannelUid
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pvr.filmon.