Skip to content
This repository has been archived by the owner on Apr 15, 2023. It is now read-only.

Commit

Permalink
bookmarks of items in the video library weren't being stored or retri…
Browse files Browse the repository at this point in the history
…eved correctly
  • Loading branch information
Jonathan Marshall committed Mar 19, 2012
1 parent 0692d0b commit f849326
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions xbmc/video/dialogs/GUIDialogVideoBookmarks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ void CGUIDialogVideoBookmarks::Update()

// open the d/b and retrieve the bookmarks for the current movie
CStdString path = g_application.CurrentFile();
if (g_application.CurrentFileItem().HasProperty("original_listitem_url"))
if (g_application.CurrentFileItem().HasProperty("original_listitem_url") &&
!URIUtils::IsVideoDb(g_application.CurrentFileItem().GetProperty("original_listitem_url").asString()))
path = g_application.CurrentFileItem().GetProperty("original_listitem_url").asString();
CVideoDatabase videoDatabase;
videoDatabase.Open();
Expand Down Expand Up @@ -220,7 +221,8 @@ void CGUIDialogVideoBookmarks::ClearBookmarks()
CVideoDatabase videoDatabase;
videoDatabase.Open();
CStdString path = g_application.CurrentFile();
if (g_application.CurrentFileItem().HasProperty("original_listitem_url"))
if (g_application.CurrentFileItem().HasProperty("original_listitem_url") &&
!URIUtils::IsVideoDb(g_application.CurrentFileItem().GetProperty("original_listitem_url").asString()))
path = g_application.CurrentFileItem().GetProperty("original_listitem_url").asString();
videoDatabase.ClearBookMarksOfFile(path, CBookmark::STANDARD);
videoDatabase.ClearBookMarksOfFile(path, CBookmark::RESUME);
Expand Down Expand Up @@ -282,7 +284,8 @@ void CGUIDialogVideoBookmarks::AddBookmark(CVideoInfoTag* tag)
else
{
CStdString path = g_application.CurrentFile();
if (g_application.CurrentFileItem().HasProperty("original_listitem_url"))
if (g_application.CurrentFileItem().HasProperty("original_listitem_url") &&
!URIUtils::IsVideoDb(g_application.CurrentFileItem().GetProperty("original_listitem_url").asString()))
path = g_application.CurrentFileItem().GetProperty("original_listitem_url").asString();
videoDatabase.AddBookMarkToFile(path, bookmark, CBookmark::STANDARD);
}
Expand Down

0 comments on commit f849326

Please sign in to comment.