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

[argustv-fix] fixes error adding Timer #178

Merged
merged 1 commit into from
Apr 15, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion addons/pvr.argustv/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.argustv"
version="1.6.165"
version="1.6.166"
name="ARGUS TV client"
provider-name="Fred Hoogduin, Marcel Groothuis">
<requires>
Expand Down
2 changes: 2 additions & 0 deletions addons/pvr.argustv/addon/changelog.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
5 changes: 4 additions & 1 deletion addons/pvr.argustv/src/argustvrpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "utils.h"
#include "argustvrpc.h"
#include "platform/threads/mutex.h"
#include "platform/util/StdString.h"

using namespace ADDON;

Expand Down Expand Up @@ -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());
Expand Down