Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
ksooo committed Aug 2, 2024
1 parent dbdb8a9 commit 1be6c77
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion pvr.hts/addon.xml.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon
id="pvr.hts"
version="22.0.0"
version="22.0.2"
name="Tvheadend HTSP Client"
provider-name="Adam Sutton, Sam Stenvall, Lars Op den Kamp, Kai Sommerfeld">
<requires>@ADDON_DEPENDS@</requires>
Expand Down
21 changes: 12 additions & 9 deletions src/Tvheadend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -754,15 +754,18 @@ PVR_ERROR CTvheadend::GetRecordingLastPlayedPosition(const kodi::addon::PVRRecor
if (!m_asyncState.WaitForState(ASYNC_EPG))
return PVR_ERROR_FAILED;

std::lock_guard<std::recursive_mutex> lock(m_mutex);

const auto& it = m_recordings.find(std::stoul(rec.GetRecordingId()));
if (it != m_recordings.end() && it->second.IsRecording())
{
Logger::Log(LogLevel::LEVEL_DEBUG, "Getting play position %i for recording %s",
it->second.GetPlayPosition(), rec.GetTitle().c_str());
playPosition = it->second.GetPlayPosition();
}
Logger::Log(LogLevel::LEVEL_INFO, "xxxx");
playPosition = 0;

// std::lock_guard<std::recursive_mutex> lock(m_mutex);
//
// const auto& it = m_recordings.find(std::stoul(rec.GetRecordingId()));
// if (it != m_recordings.end() && it->second.IsRecording())
// {
// Logger::Log(LogLevel::LEVEL_DEBUG, "Getting play position %i for recording %s",
// it->second.GetPlayPosition(), rec.GetTitle().c_str());
// playPosition = it->second.GetPlayPosition();
// }

return PVR_ERROR_NO_ERROR;
}
Expand Down

0 comments on commit 1be6c77

Please sign in to comment.