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

[videodb] fetch season year based on first aired episode #7121

Merged
merged 1 commit into from Jul 3, 2015

Conversation

Projects
None yet
3 participants
@mkortstiege
Member

mkortstiege commented May 11, 2015

This adds episode based premiered/first aired date to season view. Tvshow based premiered date is used as fallback. Request @ http://forum.kodi.tv/showthread.php?tid=226638.

Having premiered date for season based on the tvshow makes no sense actually ;) As this is a pretty minor change which IMO adjusts the false logic used in there, I'd even consider this as a fix for Isengard. No biggie if it has to wait for J***.

@Montellese for review please.

@mkortstiege

This comment has been minimized.

Member

mkortstiege commented May 12, 2015

jenkins build this please

pItem->GetVideoInfoTag()->m_premiered.SetFromDBDate(m_pDS->fv(VIDEODB_ID_SEASON_TVSHOW_PREMIERED).get_asString());
if (pItem->GetVideoInfoTag()->m_premiered.IsValid())
pItem->GetVideoInfoTag()->m_iYear = pItem->GetVideoInfoTag()->m_premiered.GetYear();
// season premiered date - based on first episode airdate associated to the season
pItem->GetVideoInfoTag()->m_firstAired.SetFromDBDate(m_pDS->fv("aired").get_asString());

This comment has been minimized.

@Montellese

Montellese May 12, 2015

Member

Please use an enum constant instead of "aired" like everywhere else.

// season premiered date - based on first episode airdate associated to the season
pItem->GetVideoInfoTag()->m_firstAired.SetFromDBDate(m_pDS->fv("aired").get_asString());
if (pItem->GetVideoInfoTag()->m_firstAired.IsValid())
pItem->GetVideoInfoTag()->m_iYear = pItem->GetVideoInfoTag()->m_firstAired.GetYear();

This comment has been minimized.

@Montellese

Montellese May 12, 2015

Member

Maybe move the logic to set the year together to make it more obvious which has preference over the other like

if (pItem->GetVideoInfoTag()->m_firstAired.IsValid())
  pItem->GetVideoInfoTag()->m_iYear = pItem->GetVideoInfoTag()->m_firstAired.GetYear();
else if (pItem->GetVideoInfoTag()->m_premiered.IsValid())
  pItem->GetVideoInfoTag()->m_iYear = pItem->GetVideoInfoTag()->m_premiered.GetYear();
@Montellese

This comment has been minimized.

Member

Montellese commented May 12, 2015

Looks good apart from the two comments.

@mkortstiege

This comment has been minimized.

Member

mkortstiege commented May 12, 2015

Updated according your comments

@Montellese

This comment has been minimized.

Member

Montellese commented May 12, 2015

Great thanks.

@mkortstiege

This comment has been minimized.

Member

mkortstiege commented May 14, 2015

jenkins build this please

@mkortstiege

This comment has been minimized.

Member

mkortstiege commented May 15, 2015

@Montellese, do we want this in for Isengard or hold back for J***?

@Montellese

This comment has been minimized.

Member

Montellese commented May 15, 2015

IMO it's not that big of a deal so I'd wait for J*** to avoid bumping the videodb version at this point in the release.

@mkortstiege

This comment has been minimized.

Member

mkortstiege commented May 15, 2015

Agreed.

@mkortstiege

This comment has been minimized.

Member

mkortstiege commented Jul 2, 2015

Rebased. jenkins build this please.

@mkortstiege

This comment has been minimized.

Member

mkortstiege commented Jul 3, 2015

Build errors are unrelated.

mkortstiege added a commit that referenced this pull request Jul 3, 2015

Merge pull request #7121 from mkortstiege/season-date
[videodb] fetch season year based on first aired episode

@mkortstiege mkortstiege merged commit 0619042 into xbmc:master Jul 3, 2015

1 check failed

default Merged build finished.
Details

@MartijnKaijser MartijnKaijser modified the milestone: Isengard 16.0-alpha1 Jul 3, 2015

@mkortstiege mkortstiege deleted the mkortstiege:season-date branch Jul 3, 2015

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