Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

[argustv-fix] fixes error adding Timer #178

Merged
merged 1 commit into from

2 participants

@Red-F

This fixes an error that occurred when adding a Timer with " in the title.

@opdenkamp
Owner

sorry, the merge window for Frodo 12.1 closed a couple of days ago. this fix can be included in the repository updates later, but not in the final binaries

addons/pvr.argustv/src/utils.cpp
@@ -317,4 +317,16 @@
} // namespace UTF8Util
#endif
+namespace StringHelper
+{
+ void myReplace(std::string& str, const std::string& oldStr, const std::string& newStr)
@opdenkamp Owner

we got StdString in https://github.com/opdenkamp/xbmc-pvr-addons/blob/master/lib/platform/util/StdString.h which already supports replacing. please use that one to minimise dupe code

@Red-F
Red-F added a note

np

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@Red-F

I know, we are all doing this for fun and joy, but is there something of a rough schedule somewhere? With so many fora around it gets kinda tough to read everything - everywhere :).

@opdenkamp
Owner

there's one on the non-public part of the forum :) no idea if we announced this officially anywhere

@Red-F

Hehehe :D, perhaps a mailing list for binary addon maintainers would we an idea then? Our PVR addons are just actually a little more like 'extensions' then 'addons'. Therefore we're more dependent on XBMC freeze/update/release schedules.

Anyway, no harm done. I'll update the PR's this evening or tomorrow.

@Red-F

duplicated string replace code removed

@opdenkamp opdenkamp merged commit a176630 into opdenkamp:frodo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 13, 2013
  1. @Red-F
This page is out of date. Refresh to see the latest.
View
2  addons/pvr.argustv/addon/addon.xml.in
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon
id="pvr.argustv"
- version="1.6.165"
+ version="1.6.166"
name="ARGUS TV client"
provider-name="Fred Hoogduin, Marcel Groothuis">
<requires>
View
2  addons/pvr.argustv/addon/changelog.txt
@@ -1,3 +1,5 @@
+v1.6.166 (13-03-2013)
+- Fixed error when adding timers with " in their title
v1.6.165 (19-01-2013)
- Do not disable the add-on when it can not connect to the ARGUS-TV server.
v1.6.164 (18-01-2013)
View
5 addons/pvr.argustv/src/argustvrpc.cpp
@@ -31,6 +31,7 @@
#include "utils.h"
#include "argustvrpc.h"
#include "platform/threads/mutex.h"
+#include "platform/util/StdString.h"
using namespace ADDON;
@@ -1138,10 +1139,12 @@ namespace ArgusTV
time_t now = time(NULL);
std::string modifiedtime = TimeTToWCFDate(mktime(localtime(&now)));
+ CStdString modifiedtitle = title;
+ modifiedtitle.Replace("\"", "\\\"");
char arguments[1024];
snprintf( arguments, sizeof(arguments),
"{\"ChannelType\":0,\"IsActive\":true,\"IsOneTime\":true,\"KeepUntilMode\":\"%i\",\"KeepUntilValue\":\"%i\",\"LastModifiedTime\":\"%s\",\"Name\":\"%s\",\"PostRecordSeconds\":%i,\"PreRecordSeconds\":%i,\"ProcessingCommands\":[],\"RecordingFileFormatId\":null,\"Rules\":[{\"Arguments\":[\"%s\"],\"Type\":\"TitleEquals\"},{\"Arguments\":[\"%i-%02i-%02iT00:00:00\"],\"Type\":\"OnDate\"},{\"Arguments\":[\"%02i:%02i:%02i\"],\"Type\":\"AroundTime\"},{\"Arguments\":[\"%s\"],\"Type\":\"Channels\"}],\"ScheduleId\":\"00000000-0000-0000-0000-000000000000\",\"SchedulePriority\":0,\"ScheduleType\":82,\"Version\":0}",
- lifetimeToKeepUntilMode(lifetime), lifetimeToKeepUntilValue(lifetime), modifiedtime.c_str(), title.c_str(), postrecordseconds, prerecordseconds, title.c_str(),
+ lifetimeToKeepUntilMode(lifetime), lifetimeToKeepUntilValue(lifetime), modifiedtime.c_str(), modifiedtitle.c_str(), postrecordseconds, prerecordseconds, modifiedtitle.c_str(),
tm_start.tm_year + 1900, tm_start.tm_mon + 1, tm_start.tm_mday,
tm_start.tm_hour, tm_start.tm_min, tm_start.tm_sec,
channelid.c_str());
Something went wrong with that request. Please try again.