aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorksooo <3226626+ksooo@users.noreply.github.com>2024-06-27 13:04:22 +0200
committerksooo <3226626+ksooo@users.noreply.github.com>2024-06-27 18:20:52 +0200
commit66dc6399f08ef0487a7bf59811e3433b09eb87af (patch)
tree1929d515c340385db71192e4d450a82f8fed274e
parent14aac683c8efcd7e3ce0672ddf446bf5c4e22706 (diff)
[FileItem] Fix CFileItem::LoadDetails not to pass item's path to CVideoDatabase::Get*Info methods. The path is actually not needed because we always have the media id available here. Even worse, item's path could be a videodb URL which leads to misbehavior once passed to CVideoDatabase::Get*Info methods, including writing wrong entries to video db's 'files' and 'path' tables. The latter causes all kind of weird follow-up issues, like not being able to resume playback from the right position once a bookmark for a movie was created by the user.
-rw-r--r--xbmc/FileItem.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/xbmc/FileItem.cpp b/xbmc/FileItem.cpp
index 43ca4749ed..98360446a3 100644
--- a/xbmc/FileItem.cpp
+++ b/xbmc/FileItem.cpp
@@ -2430,12 +2430,12 @@ bool CFileItem::LoadDetails()
bool ret{false};
auto tag{std::make_unique<CVideoInfoTag>()};
if (params.GetMovieId() >= 0)
- ret = db.GetMovieInfo(GetPath(), *tag, static_cast<int>(params.GetMovieId()),
+ ret = db.GetMovieInfo({}, *tag, static_cast<int>(params.GetMovieId()),
static_cast<int>(params.GetVideoVersionId()));
else if (params.GetMVideoId() >= 0)
- ret = db.GetMusicVideoInfo(GetPath(), *tag, static_cast<int>(params.GetMVideoId()));
+ ret = db.GetMusicVideoInfo({}, *tag, static_cast<int>(params.GetMVideoId()));
else if (params.GetEpisodeId() >= 0)
- ret = db.GetEpisodeInfo(GetPath(), *tag, static_cast<int>(params.GetEpisodeId()));
+ ret = db.GetEpisodeInfo({}, *tag, static_cast<int>(params.GetEpisodeId()));
else if (params.GetSetId() >= 0) // movie set
ret = db.GetSetInfo(static_cast<int>(params.GetSetId()), *tag, this);
else if (params.GetTvShowId() >= 0)
@@ -2448,7 +2448,7 @@ bool CFileItem::LoadDetails()
ret = db.GetSeasonInfo(idSeason, *tag, this);
}
else
- ret = db.GetTvShowInfo(GetPath(), *tag, static_cast<int>(params.GetTvShowId()), this);
+ ret = db.GetTvShowInfo({}, *tag, static_cast<int>(params.GetTvShowId()), this);
}
if (ret)