Skip to content

Commit

Permalink
Merge branch 'Leia' into Matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
rbuehlma committed Jan 1, 2020
2 parents f013cb5 + f2a8726 commit 0444314
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pvr.teleboy/addon.xml.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon id="pvr.teleboy"
version="19.4.0"
version="19.4.1"
name="Teleboy PVR Client"
provider-name="rbuehlma">
<requires>
Expand All @@ -26,6 +26,8 @@
<disclaimer lang="en_US">The authors are in no way responsible for failed recordings, incorrect timers, wasted hours, or any other undesirable effects..</disclaimer>
<platform>@PLATFORM@</platform>
<news>
v19.4.1
- Set genre on (planned) recordings
v19.4.0
- Disable addon for free accounts
v19.3.8
Expand Down Expand Up @@ -64,6 +66,8 @@ v19.1.0
- Update to GUI addon API v5.14.0
v19.0.0
- Update to PVR addon API v6.0.0
v18.2.1
- Set genre on (planned) recordings
v18.2.0
- Disable addon for free accounts
v18.1.8
Expand Down
23 changes: 23 additions & 0 deletions src/TeleBoy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,16 @@ void TeleBoy::GetRecordings(ADDON_HANDLE handle, string type)
tag.iTimerType = 1;
tag.iEpgUid = item["id"].GetInt();
tag.iClientChannelUid = item["station_id"].GetInt();
if (item.HasMember("genre_id")) {
int genreId = item["genre_id"].GetInt();
TeleboyGenre genre = genresById[genreId];
int kodiGenre = m_categories.Category(genre.nameEn);
if (kodiGenre != 0) {
tag.iGenreSubType = kodiGenre & 0x0F;
tag.iGenreType = kodiGenre & 0xF0;
}
}

PVR->TransferTimerEntry(handle, &tag);
UpdateThread::SetNextRecordingUpdate(tag.endTime + 60 * 21);

Expand All @@ -615,6 +625,19 @@ void TeleBoy::GetRecordings(ADDON_HANDLE handle, string type)
time_t endTime = Utils::StringToTime(GetStringOrEmpty(item, "end"));
tag.iDuration = endTime - tag.recordingTime;
tag.iEpgEventId = item["id"].GetInt();
if (item.HasMember("genre_id")) {
int genreId = item["genre_id"].GetInt();
TeleboyGenre genre = genresById[genreId];
int kodiGenre = m_categories.Category(genre.nameEn);
if (kodiGenre == 0) {
tag.iGenreType = EPG_GENRE_USE_STRING;
tag.iGenreSubType = 0;
PVR_STRCPY(tag.strGenreDescription, genre.name.c_str());
} else {
tag.iGenreSubType = kodiGenre & 0x0F;
tag.iGenreType = kodiGenre & 0xF0;
}
}

PVR->TransferRecordingEntry(handle, &tag);
}
Expand Down

0 comments on commit 0444314

Please sign in to comment.