Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport PR 286 #287

Merged
merged 1 commit into from
Feb 5, 2025
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
10 changes: 5 additions & 5 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ jobs:
ARCHITECTURE: x64
CONFIGURATION: Release
WINSTORE: -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0.17763.0"
ARM32-UWP:
GENERATOR: "Visual Studio 17 2022"
ARCHITECTURE: ARM
CONFIGURATION: Release
WINSTORE: -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0.17763.0"
#ARM32-UWP:
# GENERATOR: "Visual Studio 17 2022"
# ARCHITECTURE: ARM
# CONFIGURATION: Release
# WINSTORE: -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0.17763.0"
#ARM64-UWP:
# GENERATOR: "Visual Studio 17 2022"
# ARCHITECTURE: ARM64
Expand Down
2 changes: 1 addition & 1 deletion pvr.nextpvr/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.nextpvr"
version="21.3.1"
version="21.3.2"
name="NextPVR PVR Client"
provider-name="Graeme Blackley">
<requires>@ADDON_DEPENDS@
Expand Down
5 changes: 4 additions & 1 deletion pvr.nextpvr/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
v21.3.2
- Fix custom genres

v21.3.1
- Translations updates from Weblate
- af_za, am_et, ar_sa, ast_es, az_az, be_by, bg_bg, bs_ba, ca_es, cs_cz, cy_gb, da_dk, de_de, el_gr, en_au, en_nz, en_us, eo, es_ar, es_es, es_mx, et_ee, eu_es, fa_af, fa_ir, fi_fi, fo_fo, fr_ca, fr_fr, gl_es, he_il, hi_in, hr_hr, hu_hu, hy_am, id_id, is_is, it_it, ja_jp, ko_kr, lt_lt, lv_lv, mi, mk_mk, ml_in, mn_mn, ms_my, mt_mt, my_mm, nb_no, nl_nl, pl_pl, pt_br, pt_pt, ro_ro, ru_ru, si_lk, sk_sk, sl_si, sq_al, sr_rs, sr_rs@latin, sv_se, szl, ta_in, te_in, tg_tj, th_th, tr_tr, uk_ua, uz_uz, vi_vn, zh_cn, zh_tw
- af_za, am_et, ar_sa, ast_es, az_az, be_by, bg_bg, bs_ba, ca_es, cs_cz, cy_gb, da_dk, de_de, el_gr, en_au, en_nz, en_us, eo, es_ar, es_es, es_mx, et_ee, eu_es, fa_af, fa_ir, fi_fi, fo_fo, fr_ca, fr_fr, gl_es, he_il, hi_in, hr_hr, hu_hu, hy_am, id_id, is_is, it_it, ja_jp, ko_kr, lt_lt, lv_lv, mi, mk_mk, ml_in, mn_mn, ms_my, mt_mt, my_mm, nb_no, nl_nl, pl_pl, pt_br, pt_pt, ro_ro, ru_ru, si_lk, sk_sk, sl_si, sq_al, sr_rs, sr_rs@latin, sv_se, szl, ta_in, te_in, tg_tj, th_th, tr_tr, uk_ua, uz_uz, vi_vn, zh_cn, zh_tw

v21.3.0
- Support EPG genre sub type for better genre display
Expand Down
3 changes: 1 addition & 2 deletions src/EPG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ PVR_ERROR EPG::GetEPGForChannel(int channelUid, time_t start, time_t end, kodi::
// genre type
broadcast.SetGenreType(XMLUtils::GetIntValue(pListingNode, "genre_type"));
broadcast.SetGenreSubType(XMLUtils::GetIntValue(pListingNode, "genre_sub_type"));

}

NextPVR::GenreBlock genreBlock = { sGenre, broadcast.GetGenreType(), EPG_EVENT_CONTENTMASK_UNDEFINED };
Expand All @@ -137,7 +136,7 @@ PVR_ERROR EPG::GetEPGForChannel(int channelUid, time_t start, time_t end, kodi::
broadcast.SetEpisodePartNumber(EPG_TAG_INVALID_SERIES_EPISODE);
// Backend could send epidode only as S00 and parts are not support
if (season <= 0 || episode == EPG_TAG_INVALID_SERIES_EPISODE)
{
{
std::regex base_regex("^.*\\([eE][pP](\\d+)(?:/?(\\d+))?\\)");
std::smatch base_match;
if (std::regex_search(description, base_match, base_regex))
Expand Down
13 changes: 5 additions & 8 deletions src/utilities/GenreMapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ GenreMapper::GenreMapper(const std::shared_ptr<InstanceSettings>& settings) : m_
GenreMapper::~GenreMapper() {}


bool GenreMapper::IsEnabled()
bool GenreMapper::UseDvbGenre()
{
return !m_settings->m_genreString;
}
Expand Down Expand Up @@ -66,7 +66,7 @@ bool GenreMapper::ParseAllGenres(const tinyxml2::XMLNode* node, GenreBlock& genr
{
if (allGenres.find(EPG_STRING_TOKEN_SEPARATOR) != std::string::npos)
{
if (IsEnabled())
if (UseDvbGenre())
{
std::vector<std::string> genreCodes = kodi::tools::StringUtils::Split(allGenres, EPG_STRING_TOKEN_SEPARATOR);
if (genreCodes.size() == 2)
Expand All @@ -86,17 +86,14 @@ bool GenreMapper::ParseAllGenres(const tinyxml2::XMLNode* node, GenreBlock& genr
}
if (genreBlock.genreSubType == EPG_EVENT_CONTENTMASK_UNDEFINED)
{
if (genreBlock.genreType != EPG_GENRE_USE_STRING)
{
genreBlock.genreType = EPG_GENRE_USE_STRING;
}
genreBlock.genreSubType = EPG_GENRE_USE_STRING;
genreBlock.description = allGenres;
}
}
else if (!IsEnabled() && genreBlock.genreSubType != EPG_GENRE_USE_STRING)
else if (!UseDvbGenre() && genreBlock.genreSubType == EPG_EVENT_CONTENTMASK_UNDEFINED)
{
genreBlock.description = allGenres;
genreBlock.genreType = EPG_GENRE_USE_STRING;
genreBlock.genreSubType = EPG_GENRE_USE_STRING;
}

return true;
Expand Down
2 changes: 1 addition & 1 deletion src/utilities/GenreMapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace NextPVR
int GetGenreType(std::string code);
int GetGenreSubType(std::string code);
bool ParseAllGenres(const tinyxml2::XMLNode* node, GenreBlock& genreBlock);
bool IsEnabled();
bool UseDvbGenre();

private:
GenreMapper() = default;
Expand Down