Skip to content

Commit

Permalink
added: advancedsettings.xml option <tvmultipartmatching> in order to …
Browse files Browse the repository at this point in the history
…modify the default multipart enumeration regexp
  • Loading branch information
vdrfan committed Mar 2, 2011
1 parent 4d453f3 commit eaa64a3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions xbmc/settings/AdvancedSettings.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -742,6 +742,9 @@ bool CAdvancedSettings::Load()
if (pTVStacking) if (pTVStacking)
GetCustomTVRegexps(pTVStacking, m_tvshowStackRegExps); GetCustomTVRegexps(pTVStacking, m_tvshowStackRegExps);


//tv multipart enumeration regexp
XMLUtils::GetString(pRootElement, "tvmultipartmatching", m_tvshowMultiPartEnumRegExp);

// path substitutions // path substitutions
TiXmlElement* pPathSubstitution = pRootElement->FirstChildElement("pathsubstitution"); TiXmlElement* pPathSubstitution = pRootElement->FirstChildElement("pathsubstitution");
if (pPathSubstitution) if (pPathSubstitution)
Expand Down
9 changes: 7 additions & 2 deletions xbmc/video/VideoInfoScanner.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -923,7 +923,11 @@ namespace VIDEO
(regexppos >= 0 && regexp2pos == -1)) (regexppos >= 0 && regexp2pos == -1))
{ {
GetEpisodeAndSeasonFromRegExp(reg, episode); GetEpisodeAndSeasonFromRegExp(reg, episode);
CLog::Log(LOGDEBUG, "VideoInfoScanner: Adding new season %u, multipart episode %u", episode.iSeason, episode.iEpisode);
CLog::Log(LOGDEBUG, "VideoInfoScanner: Adding new season %u, multipart episode %u [%s]",
episode.iSeason, episode.iEpisode,
g_advancedSettings.m_tvshowMultiPartEnumRegExp.c_str());

episodeList.push_back(episode); episodeList.push_back(episode);
free(remainder); free(remainder);
remainder = reg.GetReplaceString("\\3"); remainder = reg.GetReplaceString("\\3");
Expand All @@ -935,7 +939,8 @@ namespace VIDEO
char *ep = reg2.GetReplaceString("\\1"); char *ep = reg2.GetReplaceString("\\1");
episode.iEpisode = atoi(ep); episode.iEpisode = atoi(ep);
free(ep); free(ep);
CLog::Log(LOGDEBUG, "VideoInfoScanner: Adding multipart episode %u", episode.iEpisode); CLog::Log(LOGDEBUG, "VideoInfoScanner: Adding multipart episode %u [%s]",
episode.iEpisode, g_advancedSettings.m_tvshowMultiPartEnumRegExp.c_str());
episodeList.push_back(episode); episodeList.push_back(episode);
offset += regexp2pos + reg2.GetFindLen(); offset += regexp2pos + reg2.GetFindLen();
} }
Expand Down

0 comments on commit eaa64a3

Please sign in to comment.