Inconsistent User Agent

HI
There has been a small bug introduced to the latest version of CoreElec. The user agent when accessing HTTPS sites is inconsistent. Sometimes its “Kodi/18.2 (X11; Linux aarch64) LibreELEC/9.0 App_Bitness/32 Version/18.2-Git:18.2-Leia” and sometimes “Kodi/18.3 (X11; Linux aarch64) CoreELEC/9.0 App_Bitness/32 Version/18.3-Git:18.3-Leia”. Its no biggie I have a program that scans the logs and tells me if the boxes have not been upgraded.

We manually changed the user agent as we learned that our users where being tracked via the user agent when devices are polling for addon updates.

Hi its the user/agent for content that is inconsistent my media server uses the user agent and IP to identify the box it just appears I now have twice as many boxed than I have. I seem to remember I can add a user agent to the end of the media url. It is just handy to know which boxes need to be updated.

Not sure about this but the change was only introduced in 9.0.3.

Yes it was fine in 9.02. the weird thing is the User/Agent can change during the playback of the file It normally starts as “… 9.03” but the 206 subsequent requests can be “… 9.02”. As I said it not a problem I just thought you would like to know.

I think I may have the problem I dived into the source and found

CoreELEC/packages/mediacenter/kodi/patches/ kodi-ce-005-fix-le-addons.patch

diff --git a/xbmc/filesystem/CurlFile.cpp b/xbmc/filesystem/CurlFile.cpp index 3169bb9..f7c3ab9 100644 --- a/xbmc/filesystem/CurlFile.cpp +++ b/xbmc/filesystem/CurlFile.cpp @@ -1000,6 +1000,11 @@ bool CCurlFile::Open(const CURL& url)

// setup common curl options
SetCommonOptions(m_state, m_failOnError && !CServiceBroker::GetSettingsComponent()->GetAdvancedSettings()->CanLogComponent(LOGCURL));
+

  • if(strcmp(url2.GetHostName().c_str(), “libreelec.tv”)
  • || strcmp(url2.GetHostName().c_str(), “kodi.tv”))
  • g_curlInterface.easy_setopt(m_state->m_easyHandle, CURLOPT_USERAGENT, “Kodi/18.2 (X11; Linux aarch64) LibreELEC/9.0 App_Bitness/32 Version/18.2-Git:18.2-Leia”);
  • SetRequestHeaders(m_state);
    m_state->m_sendRange = m_seekable;
    m_state->m_bRetry = m_allowRetry;

    Curl User Agent is set to “Kodi/18.2 (X11; Linux aarch64) LibreELEC/9.0 App_Bitness/32 Version/18.2-Git:18.2-Leia”

It’s not a problem, Adam has explained why it’s this way.

I found this issue and fixed it for the next version, thanks for reporting it.