Skip to content

Commit

Permalink
Merge pull request #135 from phunkyfish/no-startup-fix
Browse files Browse the repository at this point in the history
No startup fix
  • Loading branch information
phunkyfish committed Nov 23, 2018
2 parents f7f92af + be7ec2e commit 1207082
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 8 deletions.
4 changes: 4 additions & 0 deletions pvr.vuplus/addon.xml.in
Expand Up @@ -175,6 +175,10 @@
<disclaimer lang="zh_TW">這是測試版軟體!其原創作者並無法對於以下情況負責,包含:錄影失敗,不正確的定時設定,多餘時數,或任何產生的其它不良影響...</disclaimer>
<platform>@PLATFORM@</platform>
<news>
v3.15.1
- Fixed: since 3.15.0 pvr manager cant start #134
- Added: Log Distro Version

v3.15.0
- Added: Support for Radio Groups
- Added: Create unique list of channels instead of a copy of each channel per group, fixes #101
Expand Down
4 changes: 4 additions & 0 deletions pvr.vuplus/changelog.txt
@@ -1,3 +1,7 @@
v3.15.1
- Fixed: since 3.15.0 pvr manager cant start #134
- Added: Log Distro Version

v3.15.0
- Added: Support for Radio Groups
- Added: Create unique list of channels instead of a copy of each channel per group, fixes #101
Expand Down
12 changes: 11 additions & 1 deletion src/enigma2/Admin.cpp
Expand Up @@ -86,6 +86,7 @@ bool Admin::LoadDeviceInfo()

std::string enigmaVersion;
std::string imageVersion;
std::string distroVersion;
std::string webIfVersion;
std::string serverName = "Enigma2";
unsigned int webIfVersionAsNum;
Expand Down Expand Up @@ -124,6 +125,15 @@ bool Admin::LoadDeviceInfo()
imageVersion = strTmp.c_str();
Logger::Log(LEVEL_NOTICE, "%s - E2ImageVersion: %s", __FUNCTION__, imageVersion.c_str());

// Get DistroVersion
if (!XMLUtils::GetString(pElem, "e2distroversion", strTmp))
{
Logger::Log(LEVEL_ERROR, "%s Could not parse e2distroversion from result!", __FUNCTION__);
return false;
}
distroVersion = strTmp.c_str();
Logger::Log(LEVEL_NOTICE, "%s - E2DistroVersion: %s", __FUNCTION__, distroVersion.c_str());

// Get WebIfVersion
if (!XMLUtils::GetString(pElem, "e2webifversion", strTmp))
{
Expand All @@ -144,7 +154,7 @@ bool Admin::LoadDeviceInfo()
serverName = strTmp.c_str();
Logger::Log(LEVEL_NOTICE, "%s - E2DeviceName: %s", __FUNCTION__, serverName.c_str());

m_deviceInfo = DeviceInfo(serverName, enigmaVersion, imageVersion, webIfVersion, webIfVersionAsNum);
m_deviceInfo = DeviceInfo(serverName, enigmaVersion, imageVersion, distroVersion, webIfVersion, webIfVersionAsNum);

return true;
}
Expand Down
5 changes: 2 additions & 3 deletions src/enigma2/ChannelGroups.cpp
Expand Up @@ -7,6 +7,7 @@
#include "utilities/LocalizedString.h"
#include "utilities/Logger.h"
#include "utilities/WebUtils.h"
#include "utilities/FileUtils.h"

#include "util/XMLUtils.h"
#include "p8-platform/util/StringUtils.h"
Expand Down Expand Up @@ -159,9 +160,7 @@ bool ChannelGroups::LoadTVChannelGroups()

if (Settings::GetInstance().GetTVChannelGroupMode() != ChannelGroupMode::FAVOURITES_GROUP)
{
std::string strTmp;

strTmp = StringUtils::Format("%sweb/getservices", Settings::GetInstance().GetConnectionURL().c_str());
std::string strTmp = StringUtils::Format("%sweb/getservices", Settings::GetInstance().GetConnectionURL().c_str());

std::string strXML = WebUtils::GetHttpXML(strTmp);

Expand Down
3 changes: 2 additions & 1 deletion src/enigma2/data/ChannelGroup.cpp
Expand Up @@ -2,6 +2,7 @@

#include "inttypes.h"
#include "util/XMLUtils.h"
#include "p8-platform/util/StringUtils.h"

using namespace enigma2;
using namespace enigma2::data;
Expand All @@ -23,7 +24,7 @@ bool ChannelGroup::UpdateFrom(TiXmlElement* groupNode, bool radio)
return false;

// Check if the current element is hidden, a separator or last scanned
if (groupName == "<n/a>" || groupName.compare(groupName.length() - 12, 12, " - Separator") == 0 || groupName == "Last Scanned")
if (groupName == "<n/a>" || StringUtils::EndsWith(groupName.c_str(), " - Separator") || groupName == "Last Scanned")
return false;

if (!radio && Settings::GetInstance().GetTVChannelGroupMode() == ChannelGroupMode::ONLY_ONE_GROUP &&
Expand Down
6 changes: 4 additions & 2 deletions src/enigma2/utilities/DeviceInfo.h
Expand Up @@ -10,21 +10,23 @@ namespace enigma2
{
public:
DeviceInfo() = default;
DeviceInfo(const std::string &serverName, const std::string &enigmaVersion, const std::string &imageVersion,
DeviceInfo(const std::string &serverName, const std::string &enigmaVersion, const std::string &imageVersion, const std::string &distroVersion,
const std::string &webIfVersion, unsigned int webIfVersionAsNum)
: m_serverName(serverName), m_enigmaVersion(enigmaVersion), m_imageVersion(imageVersion),
: m_serverName(serverName), m_enigmaVersion(enigmaVersion), m_imageVersion(imageVersion), m_distroVersion(distroVersion),
m_webIfVersion(webIfVersion), m_webIfVersionAsNum(webIfVersionAsNum) {};

const std::string& GetServerName() const { return m_serverName; }
const std::string& GetEnigmaVersion() const { return m_enigmaVersion; }
const std::string& GetImageVersion() const { return m_imageVersion; }
const std::string& GetDistroVersion() const { return m_distroVersion; }
const std::string& GetWebIfVersion() const { return m_webIfVersion; }
unsigned int GetWebIfVersionAsNum() const { return m_webIfVersionAsNum; }

private:
std::string m_serverName = "Enigma2";
std::string m_enigmaVersion;
std::string m_imageVersion;
std::string m_distroVersion;
std::string m_webIfVersion;
unsigned int m_webIfVersionAsNum;
};
Expand Down
2 changes: 1 addition & 1 deletion src/enigma2/utilities/FileUtils.cpp
Expand Up @@ -38,7 +38,7 @@ bool FileUtils::CopyFile(const std::string &sourceFile, const std::string &targe
{
bool copySuccessful = true;

Logger::Log(LEVEL_DEBUG, "%s Copying file: %s, to $s", __FUNCTION__, sourceFile.c_str(), targetFile.c_str());
Logger::Log(LEVEL_DEBUG, "%s Copying file: %s, to %s", __FUNCTION__, sourceFile.c_str(), targetFile.c_str());

void* sourceFileHandle = XBMC->OpenFile(sourceFile.c_str(), 0x08); //READ_NO_CACHE

Expand Down

0 comments on commit 1207082

Please sign in to comment.