Skip to content
This repository has been archived by the owner on Apr 15, 2023. It is now read-only.

Commit

Permalink
Merge pull request #395 from janbar/release-v1.10.1
Browse files Browse the repository at this point in the history
[pvr.mythtv] Release v1.10.1
  • Loading branch information
Lars Op den Kamp committed Dec 30, 2014
2 parents 76e73d8 + b367e44 commit 78397af
Show file tree
Hide file tree
Showing 113 changed files with 1,749 additions and 848 deletions.
2 changes: 1 addition & 1 deletion addons/pvr.mythtv/addon/addon.xml.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon
id="pvr.mythtv"
version="1.9.29"
version="1.10.1"
name="MythTV PVR Client"
provider-name="Christian Fetzer, Jean-Luc Barrière">
<requires>
Expand Down
12 changes: 11 additions & 1 deletion addons/pvr.mythtv/addon/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
v1.9.29
v1.10.1
- Options to disable channel icons and recordings or fanart images

v1.10.0
- jansson 2.7: fix compilation on ios8/arm64
- Cleaned cache by max age
- Improves loading of channels and recordings
- Adding WS API Security Pin parameter
- Adding episode info (subtitle) to EPG title

v1.29.0
- fixed resource leak on file cache failure

v1.9.28
Expand Down
Binary file added addons/pvr.mythtv/addon/resources/channel.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 14 additions & 2 deletions addons/pvr.mythtv/addon/resources/language/English/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ msgctxt "#30013"
msgid "MythTV Backend Port for API services"
msgstr ""

#empty strings from id 30014 to 30018
msgctxt "#30014"
msgid "MythTV Security Pin for API services"
msgstr ""

#empty strings from id 30015 to 30018

msgctxt "#30019"
msgid "General"
Expand Down Expand Up @@ -189,7 +193,15 @@ msgctxt "#30062"
msgid "Block backend shutdown"
msgstr ""

#empty strings from id 30063 to 30099
msgctxt "#30063"
msgid "Enable channel icons"
msgstr ""

msgctxt "#30064"
msgid "Enable recording fanart/thumbnails"
msgstr ""

#empty strings from id 30065 to 30099

# Systeminformation labels
msgctxt "#30100"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ msgctxt "#30013"
msgid "MythTV Backend Port for API services"
msgstr "Port du dorsal MythTV pour les services API"

msgctxt "#30014"
msgid "MythTV Security Pin for API services"
msgstr "Code PIN de sécurité pour les services API"

msgctxt "#30019"
msgid "General"
msgstr "Général"
Expand Down
12 changes: 12 additions & 0 deletions addons/pvr.mythtv/addon/resources/language/French/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ msgctxt "#30013"
msgid "MythTV Backend Port for API services"
msgstr "Port du serveur MythTV pour les services API"

msgctxt "#30014"
msgid "MythTV Security Pin for API services"
msgstr "Code PIN de sécurité pour les services API"

msgctxt "#30019"
msgid "General"
msgstr "Général"
Expand Down Expand Up @@ -180,6 +184,14 @@ msgctxt "#30062"
msgid "Block backend shutdown"
msgstr "Bloquer l'arrêt du serveur"

msgctxt "#30063"
msgid "Enable channel icons"
msgstr "Afficher l'icône des chaînes"

msgctxt "#30064"
msgid "Enable recording fanart/thumbnails"
msgstr "Afficher la vignette des enregistrements"

msgctxt "#30100"
msgid "Protocol version: %i - Database version: %i"
msgstr "Version du protocole: %i - Version de la base de données: %i"
Expand Down
Binary file added addons/pvr.mythtv/addon/resources/recording.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions addons/pvr.mythtv/addon/resources/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<setting id="host" type="text" label="30000" default="127.0.0.1" />
<setting id="port" type="number" option="int" label="30001" default="6543" />
<setting id="wsport" type="number" option="int" label="30013" default="6544" />
<setting id="wssecuritypin" type="text" label="30014" default="0000" />
<setting id="host_ether" type="text" label="30012" default="" />
<setting id="livetv" type="bool" label="30006" default="true" />
<setting id="livetv_priority" type="bool" label="30007" default="true" />
Expand All @@ -29,5 +30,7 @@
<setting id="tunedelay" type="slider" option="int" range="5,1,30" label="30053" />
<setting id="group_recordings" type="enum" label="30054" lvalues="30055|30056|30057" default="0" />
<setting id="enable_edl" type="enum" label="30058" lvalues="30059|30060|30061" default="0" />
<setting id="channel_icons" type="bool" label="30063" default="true" />
<setting id="recording_icons" type="bool" label="30064" default="true" />
</category>
</settings>
2 changes: 1 addition & 1 deletion addons/pvr.mythtv/src/avinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*
*/

#include "xbmc_codec_types.h"
#include <xbmc_codec_types.h>

#include "avinfo.h"
#include "client.h"
Expand Down
51 changes: 51 additions & 0 deletions addons/pvr.mythtv/src/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,13 @@ std::string g_szMythHostname = DEFAULT_HOST; ///<
std::string g_szMythHostEther = ""; ///< The Host MAC address of the mythtv server
int g_iProtoPort = DEFAULT_PROTO_PORT; ///< The mythtv protocol port (default is 6543)
int g_iWSApiPort = DEFAULT_WSAPI_PORT; ///< The mythtv sevice API port (default is 6544)
std::string g_szWSSecurityPin = DEFAULT_WSAPI_SECURITY_PIN; ///< The default security pin for the mythtv wsapi
bool g_bExtraDebug = DEFAULT_EXTRA_DEBUG; ///< Output extensive debug information to the log
bool g_bLiveTV = DEFAULT_LIVETV; ///< LiveTV support (or recordings only)
bool g_bLiveTVPriority = DEFAULT_LIVETV_PRIORITY; ///< MythTV Backend setting to allow live TV to move scheduled shows
int g_iLiveTVConflictStrategy = DEFAULT_LIVETV_CONFLICT_STRATEGY; ///< Conflict resolving strategy (0=
bool g_bChannelIcons = DEFAULT_CHANNEL_ICONS; ///< Load Channel Icons
bool g_bRecordingIcons = DEFAULT_RECORDING_ICONS; ///< Load Recording Icons (Fanart/Thumbnails)
int g_iRecTemplateType = DEFAULT_RECORD_TEMPLATE; ///< Template type for new record (0=Internal, 1=MythTV)
bool g_bRecAutoMetadata = true;
bool g_bRecAutoCommFlag = false;
Expand Down Expand Up @@ -170,6 +173,17 @@ ADDON_STATUS ADDON_Create(void *hdl, void *props)
g_iWSApiPort = DEFAULT_WSAPI_PORT;
}

/* Read setting "wssecuritypin" from settings.xml */
if (XBMC->GetSetting("wssecuritypin", buffer))
g_szWSSecurityPin = buffer;
else
{
/* If setting is unknown fallback to defaults */
XBMC->Log(LOG_ERROR, "Couldn't get 'wssecuritypin' setting, falling back to '%s' as default", DEFAULT_WSAPI_SECURITY_PIN);
g_szWSSecurityPin = DEFAULT_WSAPI_SECURITY_PIN;
}
buffer[0] = 0;

/* Read setting "extradebug" from settings.xml */
if (!XBMC->GetSetting("extradebug", &g_bExtraDebug))
{
Expand Down Expand Up @@ -271,6 +285,22 @@ ADDON_STATUS ADDON_Create(void *hdl, void *props)
g_bBlockMythShutdown = DEFAULT_BLOCK_SHUTDOWN;
}

/* Read setting "channel_icons" from settings.xml */
if (!XBMC->GetSetting("channel_icons", &g_bChannelIcons))
{
/* If setting is unknown fallback to defaults */
XBMC->Log(LOG_ERROR, "Couldn't get 'channel_icons' setting, falling back to '%b' as default", DEFAULT_CHANNEL_ICONS);
g_bChannelIcons = DEFAULT_CHANNEL_ICONS;
}

/* Read setting "recording_icons" from settings.xml */
if (!XBMC->GetSetting("recording_icons", &g_bRecordingIcons))
{
/* If setting is unknown fallback to defaults */
XBMC->Log(LOG_ERROR, "Couldn't get 'recording_icons' setting, falling back to '%b' as default", DEFAULT_RECORDING_ICONS);
g_bRecordingIcons = DEFAULT_RECORDING_ICONS;
}

free (buffer);
XBMC->Log(LOG_DEBUG, "Loading settings...done");

Expand Down Expand Up @@ -446,12 +476,33 @@ ADDON_STATUS ADDON_SetSetting(const char *settingName, const void *settingValue)
return ADDON_STATUS_NEED_RESTART;
}
}
else if (str == "wssecuritypin")
{
std::string tmp_sWSSecurityPin;
XBMC->Log(LOG_INFO, "Changed Setting 'wssecuritypin' from %s to %s", g_szWSSecurityPin.c_str(), (const char*)settingValue);
tmp_sWSSecurityPin = g_szWSSecurityPin;
g_szWSSecurityPin = (const char*)settingValue;
if (tmp_sWSSecurityPin != g_szWSSecurityPin)
return ADDON_STATUS_NEED_RESTART;
}
else if (str == "demuxing")
{
XBMC->Log(LOG_INFO, "Changed Setting 'demuxing' from %u to %u", g_bDemuxing, *(bool*)settingValue);
if (g_bDemuxing != *(bool*)settingValue)
return ADDON_STATUS_NEED_RESTART;
}
else if (str == "channel_icons")
{
XBMC->Log(LOG_INFO, "Changed Setting 'channel_icons' from %u to %u", g_bChannelIcons, *(bool*)settingValue);
if (g_bChannelIcons != *(bool*)settingValue)
return ADDON_STATUS_NEED_RESTART;
}
else if (str == "recording_icons")
{
XBMC->Log(LOG_INFO, "Changed Setting 'recording_icons' from %u to %u", g_bRecordingIcons, *(bool*)settingValue);
if (g_bRecordingIcons != *(bool*)settingValue)
return ADDON_STATUS_NEED_RESTART;
}
else if (str == "host_ether")
{
XBMC->Log(LOG_INFO, "Changed Setting 'host_ether' from %s to %s", g_szMythHostEther.c_str(), (const char*)settingValue);
Expand Down
6 changes: 6 additions & 0 deletions addons/pvr.mythtv/src/client.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
#define DEFAULT_LIVETV true
#define DEFAULT_PROTO_PORT 6543
#define DEFAULT_WSAPI_PORT 6544
#define DEFAULT_WSAPI_SECURITY_PIN "0000"
#define DEFAULT_CHANNEL_ICONS true
#define DEFAULT_RECORDING_ICONS true
#define DEFAULT_RECORD_TEMPLATE 1

#define SUBTITLE_SEPARATOR " - "
Expand Down Expand Up @@ -84,10 +87,13 @@ extern std::string g_szMythHostname; ///< The Host name or IP of the
extern std::string g_szMythHostEther; ///< The Host MAC address of the mythtv server
extern int g_iProtoPort; ///< The mythtv protocol port (default is 6543)
extern int g_iWSApiPort; ///< The mythtv service API port (default is 6544)
extern std::string g_szWSSecurityPin; ///< The default security pin for the mythtv wsapi
extern bool g_bExtraDebug; ///< Debug logging
extern bool g_bLiveTV; ///< LiveTV support (or recordings only)
extern bool g_bLiveTVPriority; ///< MythTV Backend setting to allow live TV to move scheduled shows
extern int g_iLiveTVConflictStrategy; ///< Live TV conflict resolving strategy (0=Has later, 1=Stop TV, 2=Cancel recording)
extern bool g_bChannelIcons; ///< Load Channel Icons
extern bool g_bRecordingIcons; ///< Load Recording Icons (Fanart/Thumbnails)
extern int g_iRecTemplateType; ///< Template type for new record (0=Internal, 1=MythTV)
///* Internal Record template */
extern bool g_bRecAutoMetadata;
Expand Down
6 changes: 3 additions & 3 deletions addons/pvr.mythtv/src/cppmyth/MythScheduleManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,14 @@ bool MythRecordingRuleNode::IsInactiveRule() const
//// MythScheduleManager
////

MythScheduleManager::MythScheduleManager(const std::string& server, unsigned protoPort, unsigned wsapiPort)
MythScheduleManager::MythScheduleManager(const std::string& server, unsigned protoPort, unsigned wsapiPort, const std::string& wsapiSecurityPin)
: m_lock()
, m_control(NULL)
, m_protoVersion(0)
, m_versionHelper(NULL)
, m_showNotRecording(false)
{
m_control = new Myth::Control(server, protoPort, wsapiPort);
m_control = new Myth::Control(server, protoPort, wsapiPort, wsapiSecurityPin);
this->Update();
}

Expand Down Expand Up @@ -140,7 +140,7 @@ void MythScheduleManager::Setup()
}
}

uint32_t MythScheduleManager::MakeIndex(ScheduledPtr scheduled) const
uint32_t MythScheduleManager::MakeIndex(const ScheduledPtr &scheduled) const
{
// Recordings must keep same identifier even after refreshing cache (cf Update).
// Numeric hash of UID is used to make the constant numeric identifier.
Expand Down
4 changes: 2 additions & 2 deletions addons/pvr.mythtv/src/cppmyth/MythScheduleManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class MythScheduleManager
MSM_ERROR_SUCCESS = 1
};

MythScheduleManager(const std::string& server, unsigned protoPort, unsigned wsapiPort);
MythScheduleManager(const std::string& server, unsigned protoPort, unsigned wsapiPort, const std::string& wsapiSecurityPin);
~MythScheduleManager();

// Called by GetTimers
Expand Down Expand Up @@ -139,7 +139,7 @@ class MythScheduleManager
VersionHelper *m_versionHelper;
void Setup();

uint32_t MakeIndex(ScheduledPtr scheduled) const;
uint32_t MakeIndex(const ScheduledPtr &scheduled) const;

// The list of rule nodes
typedef std::list<RecordingRuleNodePtr> NodeList;
Expand Down
6 changes: 3 additions & 3 deletions addons/pvr.mythtv/src/demux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
*
*/

#include "platform/os.h"
#include <platform/os.h>

#include "libXBMC_pvr.h"
#include "xbmc_codec_types.h"
#include <libXBMC_pvr.h>
#include <xbmc_codec_types.h>

#include "demux.h"
#include "client.h"
Expand Down
2 changes: 1 addition & 1 deletion addons/pvr.mythtv/src/demuxer/tsDemuxer.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "common.h"
#include "tsPacket.h"
#include "elementaryStream.h"
#include "platform/threads/mutex.h"
#include <platform/threads/mutex.h>

#include <map>
#include <vector>
Expand Down

0 comments on commit 78397af

Please sign in to comment.