Skip to content

Commit

Permalink
Allow PlayOrQueueMedia to resume plugin items
Browse files Browse the repository at this point in the history
  • Loading branch information
FeLiZk committed Dec 17, 2024
1 parent b77c9b2 commit 8b1654e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions xbmc/interfaces/builtins/PlayerBuiltins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,11 @@ int PlayOrQueueMedia(const std::vector<std::string>& params, bool forcePlay)
CMediaSettings::GetInstance().SetMediaStartWindowed(true);
else if (StringUtils::EqualsNoCase(params[i], "resume"))
{
// force the item to resume (if applicable)
if (VIDEO::UTILS::GetItemResumeInformation(item).isResumable)
// Force the item to resume (if applicable).
// If item is provided by a plugin, we don't know if this can be resumed or not at this point,
// that information was lost when the item was turned into a string but we were told to resume
// so we will try to do that.
if (item.IsPlugin() || VIDEO::UTILS::GetItemResumeInformation(item).isResumable)
item.SetStartOffset(STARTOFFSET_RESUME);
else
item.SetStartOffset(0);
Expand Down

0 comments on commit 8b1654e

Please sign in to comment.