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

[videodatabase] fix 'replace file names with library titles' not working... #6969

Merged
merged 1 commit into from
Apr 18, 2015

Conversation

mkortstiege
Copy link
Member

This fixes a files node issue where episodes in sub-directories are not properly replaced with library titles.

@Montellese for review please.

@mkortstiege mkortstiege added the Type: Fix non-breaking change which fixes an issue label Apr 17, 2015
@@ -6880,10 +6880,12 @@ std::string CVideoDatabase::GetContentForPath(const std::string& strPath)
// 1. if episodes are in the path then we're in episodes.
// 2. if no episodes are found, and content was set directly on this path, then we're in shows.
// 3. if no episodes are found, and content was not set directly on this path, we're in seasons (assumes tvshows/seasons/episodes)
std::string sql = PrepareSQL("select count(1) from episode_view where strPath = '%s' limit 1", strPath.c_str());
std::string sql = PrepareSQL("SELECT count(1) FROM episode_view WHERE SUBSTR(strPath,1,%i) = '%s' LIMIT 1"

This comment was marked as spam.

This comment was marked as spam.

@mkortstiege
Copy link
Member Author

Updated and rebased. Now using LIKE '%s%%' as suggested.

@mkortstiege
Copy link
Member Author

Updated.

@xhaggi
Copy link
Member

xhaggi commented Apr 18, 2015

Thanks, jenkins build and merge

@jenkins4kodi jenkins4kodi merged commit 632d629 into xbmc:master Apr 18, 2015
@hudokkow hudokkow added this to the Isengard 15.0-beta1 milestone Apr 18, 2015
@mkortstiege mkortstiege deleted the fix-replace-filenames branch July 3, 2015 06:58
@ksooo
Copy link
Member

ksooo commented Aug 13, 2015

@mkortstiege for me, this completely breaks replacement of tv show file names by db titles.

Directory structure:

  • Movies <= themoviedb scraper
    ++ XYZ <= thetvdb scraper
    +++ XYZ.s01e01.mkv
    +++ XYZ.s01.e02.mkv
    +++ .....

    With this PR applied, file names appear. When reverting this commit, db titles are back again.

@mkortstiege
Copy link
Member Author

Files node .. pff ;) Will check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Fix non-breaking change which fixes an issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants