diff -Nru kodi-pvr-teleboy-18.1.6/debian/changelog kodi-pvr-teleboy-18.1.7/debian/changelog --- kodi-pvr-teleboy-18.1.6/debian/changelog 2013-05-31 22:59:22.000000000 +0000 +++ kodi-pvr-teleboy-18.1.7/debian/changelog 2013-05-31 22:59:22.000000000 +0000 @@ -1,4 +1,4 @@ -kodi-pvr-teleboy (18.1.6-1~eoan) eoan; urgency=low +kodi-pvr-teleboy (18.1.7-1~eoan) eoan; urgency=low [ kodi ] * autogenerated dummy changelog diff -Nru kodi-pvr-teleboy-18.1.6/pvr.teleboy/addon.xml.in kodi-pvr-teleboy-18.1.7/pvr.teleboy/addon.xml.in --- kodi-pvr-teleboy-18.1.6/pvr.teleboy/addon.xml.in 2013-05-31 22:59:22.000000000 +0000 +++ kodi-pvr-teleboy-18.1.7/pvr.teleboy/addon.xml.in 2013-05-31 22:59:22.000000000 +0000 @@ -1,6 +1,6 @@ @@ -26,6 +26,10 @@ The authors are in no way responsible for failed recordings, incorrect timers, wasted hours, or any other undesirable effects.. @PLATFORM@ +v18.1.7 + - Init update threads after login + - Fix error messages + - Reduce number of update threads v18.1.6 - Implement HTTP request caching - Add addon information to user agent diff -Nru kodi-pvr-teleboy-18.1.6/pvr.teleboy/resources/language/resource.language.en_gb/strings.po kodi-pvr-teleboy-18.1.7/pvr.teleboy/resources/language/resource.language.en_gb/strings.po --- kodi-pvr-teleboy-18.1.6/pvr.teleboy/resources/language/resource.language.en_gb/strings.po 2013-05-31 22:59:22.000000000 +0000 +++ kodi-pvr-teleboy-18.1.7/pvr.teleboy/resources/language/resource.language.en_gb/strings.po 2013-05-31 22:59:22.000000000 +0000 @@ -9,25 +9,30 @@ "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: en\n" +"Language: en_GB\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -msgctxt "#37101" +msgctxt "#30000" msgid "Username" -msgstr "" +msgstr "Username" -msgctxt "#37102" +msgctxt "#30001" msgid "Password" -msgstr "" +msgstr "Password" -msgctxt "#37103" +msgctxt "#30002" msgid "Favourite channels only" msgstr "Load only channels which are in the favourite list" -msgctxt "#37104" +msgctxt "#30003" msgid "Enable Dolby" msgstr "Enable support for dolby" -msgctxt "#37111" +msgctxt "#30100" +msgid "Missing username or password" +msgstr "Missing username or password" + +msgctxt "#30101" msgid "Login failed!" -msgstr "" +msgstr "Login failed!" + diff -Nru kodi-pvr-teleboy-18.1.6/pvr.teleboy/resources/settings.xml kodi-pvr-teleboy-18.1.7/pvr.teleboy/resources/settings.xml --- kodi-pvr-teleboy-18.1.6/pvr.teleboy/resources/settings.xml 2013-05-31 22:59:22.000000000 +0000 +++ kodi-pvr-teleboy-18.1.7/pvr.teleboy/resources/settings.xml 2013-05-31 22:59:22.000000000 +0000 @@ -1,7 +1,7 @@ - - - - + + + + diff -Nru kodi-pvr-teleboy-18.1.6/README.md kodi-pvr-teleboy-18.1.7/README.md --- kodi-pvr-teleboy-18.1.6/README.md 1970-01-01 00:00:00.000000000 +0000 +++ kodi-pvr-teleboy-18.1.7/README.md 2013-05-31 22:59:22.000000000 +0000 @@ -0,0 +1,11 @@ +# Teleboy PVR addon for Kodi + +This is a [Kodi](https://kodi.tv) PVR addon for streaming live TV from [Teleboy](https://www.teleboy.ch). + +## Build instructions + +1. `git clone --branch Leia https://github.com/xbmc/xbmc` +2. `git clone --branch Leia https://github.com/rbuehlma/pvr.teleboy` +3. `cd pvr.teleboy && mkdir build && cd build` +4. `cmake -DADDONS_TO_BUILD=pvr.teleboy -DADDON_SRC_PREFIX=../.. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=../../xbmc/addons -DPACKAGE_ZIP=1 ../../xbmc/cmake/addons` +5. `make package-pvr.teleboy` diff -Nru kodi-pvr-teleboy-18.1.6/src/client.cpp kodi-pvr-teleboy-18.1.7/src/client.cpp --- kodi-pvr-teleboy-18.1.6/src/client.cpp 2013-05-31 22:59:22.000000000 +0000 +++ kodi-pvr-teleboy-18.1.7/src/client.cpp 2013-05-31 22:59:22.000000000 +0000 @@ -98,22 +98,23 @@ teleboyUsername = ""; teleboyPassword = ""; ADDON_ReadSettings(); + + if (teleboyUsername.empty() || teleboyPassword.empty()) { + XBMC->Log(LOG_NOTICE, "Username or password not set."); + XBMC->QueueNotification(QUEUE_WARNING, XBMC->GetLocalizedString(30100)); + return m_CurStatus; + } + XBMC->Log(LOG_DEBUG, "Create Teleboy"); - teleboy = new TeleBoy(teleboyFavoritesOnly, teleboyEnableDolby); - XBMC->Log(LOG_DEBUG, "Teleboy created"); - if (!teleboyUsername.empty() && !teleboyPassword.empty()) { - XBMC->Log(LOG_DEBUG, "Login Teleboy"); - if (teleboy->Login(teleboyUsername, teleboyPassword)) { - XBMC->Log(LOG_DEBUG, "Login done"); - teleboy->LoadChannels(); - teleboy->LoadGenres(); - m_CurStatus = ADDON_STATUS_OK; - } else { - XBMC->Log(LOG_ERROR, "Login failed"); - XBMC->QueueNotification(QUEUE_ERROR, XBMC->GetLocalizedString(37111)); - } - } - + teleboy = new TeleBoy(teleboyFavoritesOnly, teleboyEnableDolby); + XBMC->Log(LOG_DEBUG, "Login Teleboy"); + if (teleboy->Login(teleboyUsername, teleboyPassword)) { + XBMC->Log(LOG_DEBUG, "Login done"); + m_CurStatus = ADDON_STATUS_OK; + } else { + XBMC->Log(LOG_ERROR, "Login failed"); + XBMC->QueueNotification(QUEUE_ERROR, XBMC->GetLocalizedString(30101)); + } return m_CurStatus; } diff -Nru kodi-pvr-teleboy-18.1.6/src/TeleBoy.cpp kodi-pvr-teleboy-18.1.7/src/TeleBoy.cpp --- kodi-pvr-teleboy-18.1.6/src/TeleBoy.cpp 2013-05-31 22:59:22.000000000 +0000 +++ kodi-pvr-teleboy-18.1.7/src/TeleBoy.cpp 2013-05-31 22:59:22.000000000 +0000 @@ -156,10 +156,6 @@ { XBMC->Log(LOG_NOTICE, "Using useragent: %s", user_agent.c_str()); ReadDataJson(); - for (int i = 0; i < 5; ++i) - { - updateThreads.emplace_back(new UpdateThread(this)); - } this->favoritesOnly = favoritesOnly; this->enableDolby = enableDolby; } @@ -257,6 +253,14 @@ isComfortMember = result.find("setIsComfortMember(1", endPos) != std::string::npos; XBMC->Log(LOG_DEBUG, "Got userId: %s.", userId.c_str()); + + for (int i = 0; i < 3; ++i) + { + updateThreads.emplace_back(new UpdateThread(this)); + } + + LoadChannels(); + LoadGenres(); return true; } @@ -558,7 +562,7 @@ Document json; if (!ApiGet( "/users/" + userId + "/recordings/" + type - + "?desc=1&expand=flags,logos&limit=100&skip=" + to_string(sum) + "&sort=date", json, 0)) + + "?desc=1&expand=flags,logos&limit=100&skip=" + to_string(sum) + "&sort=date", json, 10)) { XBMC->Log(LOG_ERROR, "Error getting recordings of type %s.", type.c_str()); diff -Nru kodi-pvr-teleboy-18.1.6/src/TeleBoy.h kodi-pvr-teleboy-18.1.7/src/TeleBoy.h --- kodi-pvr-teleboy-18.1.6/src/TeleBoy.h 2013-05-31 22:59:22.000000000 +0000 +++ kodi-pvr-teleboy-18.1.7/src/TeleBoy.h 2013-05-31 22:59:22.000000000 +0000 @@ -34,8 +34,6 @@ TeleBoy(bool favoritesOnly, bool enableDolby); virtual ~TeleBoy(); virtual bool Login(string u, string p); - void LoadGenres(); - virtual bool LoadChannels(); virtual void GetAddonCapabilities(PVR_ADDON_CAPABILITIES* pCapabilities); virtual int GetChannelsAmount(void); virtual PVR_ERROR GetChannels(ADDON_HANDLE handle, bool bRadio); @@ -88,4 +86,6 @@ bool WriteDataJson(); bool ReadDataJson(); std::string GetStreamParameters(); + void LoadGenres(); + bool LoadChannels(); };