Skip to content

Commit

Permalink
Merge pull request #194 from alex-taylor/issue-193
Browse files Browse the repository at this point in the history
Changed file-open mode from 'chunked' to 'no buffer' to match new behaviour in Kodi 21
  • Loading branch information
phunkyfish authored Dec 22, 2024
2 parents a5658e0 + 4821deb commit 7125ca4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pvr.argustv/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.argustv"
version="21.0.2"
version="21.1.0"
name="ARGUS TV client"
provider-name="Fred Hoogduin, Marcel Groothuis">
<requires>@ADDON_DEPENDS@</requires>
Expand Down
3 changes: 3 additions & 0 deletions pvr.argustv/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
v21.1.0
- Updated file-open mode to ADDON_READ_NO_BUFFER for compatibility with Kodi 21

v21.0.2
- Translations updates from Weblate
- es_es, et_ee
Expand Down
5 changes: 4 additions & 1 deletion src/lib/tsreader/FileReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ long FileReader::SetFileName(const std::string& fileName)
//
long FileReader::OpenFile()
{
// Temporary definition - this flag was added in Kodi 21, but doesn't appear in filesystem.h until Kodi 22.
int ADDON_READ_NO_BUFFER = 0x200;

int Tmo = 25; //5 in MediaPortal

// Is the file already opened
Expand All @@ -72,7 +75,7 @@ long FileReader::OpenFile()
do
{
kodi::Log(ADDON_LOG_INFO, "FileReader::OpenFile() %s.", m_fileName.c_str());
if (m_file.OpenFile(m_fileName, ADDON_READ_CHUNKED))
if (m_file.OpenFile(m_fileName, ADDON_READ_NO_BUFFER))
{
break;
}
Expand Down

0 comments on commit 7125ca4

Please sign in to comment.