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

Fix watched items in plugins after updating Kodi #14992

Merged
merged 1 commit into from
Dec 19, 2018
Merged

Conversation

AkariDN
Copy link
Contributor

@AkariDN AkariDN commented Dec 4, 2018

Closes jdf76/plugin.video.youtube#487

Description

Old Kodi versions incorrectly save path for plugin items in video database (CVideoDatabase::SplitPath() and URIUtils::GetParentPath() behavior mismatch for plugin URLs). This is fixed in 18a2, but when updating video database we have to set new pathes for old plugin items to save watched/progress history in plugins with complex URLs.

How Has This Been Tested?

  • Install Kodi 17 and YouTube plugin
  • Mark some youtube videos as watched, save resume points
  • Update to Kodi 18 with this PR
  • Check status of watched youtube videos

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)

Checklist:

  • 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

xbmc/video/VideoDatabase.cpp Outdated Show resolved Hide resolved
Copy link
Member

@yol yol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for looking into this. Unfortunately, I don't think we can merge this as-is (see comment).

xbmc/video/VideoDatabase.cpp Outdated Show resolved Hide resolved
@AkariDN
Copy link
Contributor Author

AkariDN commented Dec 17, 2018

@pkerling done

@yol
Copy link
Member

yol commented Dec 18, 2018

Looking good now, thanks!

Two minors, then I think we are good to go (@MartijnKaijser should probably go into v18):

  • Change the version to 113
  • Add a comment to the code explaining what this update does and why it is necessary.

@AkariDN
Copy link
Contributor Author

AkariDN commented Dec 18, 2018

Done. Please merge this PR before v18 release otherwise we can get more "watch history gone..." tickets.

@MartijnKaijser
Copy link
Member

If all good please merge

@MartijnKaijser MartijnKaijser added this to the Leia 18.0-rc4 milestone Dec 18, 2018
@yol
Copy link
Member

yol commented Dec 19, 2018

I took the liberty of editing the comment to save some back-and-forth and so you can see what I would expect. Very briefly, the comment should provide enough context to understand why the update is necessary (most other migrations just add columns, it's obvious in that case). Merging this now, thanks for taking care. It will for sure save us some bug reports :-)

@yol yol merged commit c460472 into xbmc:master Dec 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Database Type: Fix non-breaking change which fixes an issue v18 Leia
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LE 17.6 (8.2.5) to LE 9.0 (Milhouse Builds) "Watched History Gone"
4 participants