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

[database] Verify date parsing when querying videos by year #15615

merged 1 commit into from Mar 1, 2019


None yet
3 participants
Copy link

commented Feb 26, 2019


When reading the premiered year from the database an attempt is made to parse the string as a timestamp but no check was performed after the attempted parse sometimes resulting in a default year of 1601 to be returned. This change will check whether the parse succeeded before attempting to use the parsed value.

Motivation and Context

Before this change sort by year showed an empty year 1601, after the change sort by year omits titles with unparseable years. Fixes #15554

How Has This Been Tested?

Compiled and tested on Windows 10 x64 using local movie .nfo file containing empty <year></year> element.

Screenshots (if appropriate):

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Clean up (non-breaking change which removes non-working, unmaintained functionality)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that will cause existing functionality to change)
  • Cosmetic change (non-breaking change that doesn't touch code)
  • None of the above (please explain below)


  • My code follows the Code Guidelines of this project
  • My change requires a change to the documentation, either Doxygen or wiki
  • I have updated the documentation accordingly
  • I have read the Contributing document
  • I have added tests to cover my change
  • All new and existing tests passed

Rechi approved these changes Feb 27, 2019

@MartijnKaijser MartijnKaijser merged commit 97ff895 into xbmc:master Mar 1, 2019

1 check passed

default You're awesome. Have a cookie

@tylerszabo tylerszabo referenced this pull request Mar 4, 2019


Movies by year lists 1601 with no movies in it #15554

1 of 7 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.