Skip to content

Commit b6c18e7

Browse files
authored
Merge pull request #723 from phunkyfish/async-connect-nexus
Async connect nexus
2 parents 6cef720 + bf898c1 commit b6c18e7

File tree

5 files changed

+19
-4
lines changed

5 files changed

+19
-4
lines changed

pvr.iptvsimple/addon.xml.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<addon
33
id="pvr.iptvsimple"
4-
version="20.8.1"
4+
version="20.9.0"
55
name="IPTV Simple Client"
66
provider-name="nightik and Ross Nicholson">
77
<requires>@ADDON_DEPENDS@

pvr.iptvsimple/changelog.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
v20.9.0
2+
- Support async connect
3+
14
v20.8.1
25
- Set default settings correctly and update settings migration
36

src/IptvSimple.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ bool IptvSimple::Initialise()
3535
{
3636
std::lock_guard<std::mutex> lock(m_mutex);
3737

38+
ConnectionStateChange("", PVR_CONNECTION_STATE_CONNECTING, "");
39+
3840
m_channels.Init();
3941
m_channelGroups.Init();
4042
m_providers.Init();
@@ -43,6 +45,11 @@ bool IptvSimple::Initialise()
4345
{
4446
m_channels.ChannelsLoadFailed();
4547
m_channelGroups.ChannelGroupsLoadFailed();
48+
ConnectionStateChange("", PVR_CONNECTION_STATE_DISCONNECTED, "");
49+
}
50+
else
51+
{
52+
ConnectionStateChange("", PVR_CONNECTION_STATE_CONNECTED, "");
4653
}
4754
m_epg.Init(EpgMaxPastDays(), EpgMaxFutureDays());
4855

@@ -116,7 +123,8 @@ void IptvSimple::Process()
116123
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
117124

118125
m_settings->ReloadAddonInstanceSettings();
119-
m_playlistLoader.ReloadPlayList();
126+
if (m_playlistLoader.ReloadPlayList())
127+
ConnectionStateChange("", PVR_CONNECTION_STATE_CONNECTED, "");
120128
m_epg.ReloadEPG(); // Reloading EPG also updates media
121129

122130
m_reloadChannelsGroupsAndEPG = false;

src/iptvsimple/PlaylistLoader.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ void PlaylistLoader::ParseSinglePropertyIntoChannel(const std::string& line, Cha
517517
}
518518
}
519519

520-
void PlaylistLoader::ReloadPlayList()
520+
bool PlaylistLoader::ReloadPlayList()
521521
{
522522
m_m3uLocation = m_settings->GetM3ULocation();
523523

@@ -532,11 +532,15 @@ void PlaylistLoader::ReloadPlayList()
532532
m_client->TriggerChannelGroupsUpdate();
533533
m_client->TriggerProvidersUpdate();
534534
m_client->TriggerRecordingUpdate();
535+
536+
return true;
535537
}
536538
else
537539
{
538540
m_channels.ChannelsLoadFailed();
539541
m_channelGroups.ChannelGroupsLoadFailed();
542+
543+
return false;
540544
}
541545
}
542546

src/iptvsimple/PlaylistLoader.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ namespace iptvsimple
7171
bool Init();
7272

7373
bool LoadPlayList();
74-
void ReloadPlayList();
74+
bool ReloadPlayList();
7575

7676
private:
7777
static std::string ReadMarkerValue(const std::string& line, const std::string& markerName);

0 commit comments

Comments
 (0)