|
29 | 29 | import urllib2 |
30 | 30 | import re |
31 | 31 | import string |
32 | | -from libs.common import updateServiceRequested, ackUpdate, getVPNProfile, setVPNProfile, getVPNProfileFriendly, setVPNProfileFriendly, getReconnectTime |
| 32 | +from libs.common import updateServiceRequested, ackUpdate, setVPNProfile, getVPNProfileFriendly, setVPNProfileFriendly, getReconnectTime |
33 | 33 | from libs.common import getVPNRequestedProfile, setVPNRequestedProfile, getVPNRequestedProfileFriendly, setVPNRequestedProfileFriendly, getIPInfo |
34 | 34 | from libs.common import setVPNState, getVPNState, stopRequested, ackStop, startRequested, ackStart, updateService, stopVPNConnection, startVPNConnection |
35 | 35 | from libs.common import getVPNLastConnectedProfile, setVPNLastConnectedProfile, getVPNLastConnectedProfileFriendly, setVPNLastConnectedProfileFriendly |
|
43 | 43 | from libs.utility import debugTrace, errorTrace, infoTrace, ifDebug, newPrint, setID, setName, setShort, setVery, running, setRunning, now, isCustom |
44 | 44 | from libs.vpnproviders import removeGeneratedFiles, cleanPassFiles, fixOVPNFiles, getVPNLocation, usesPassAuth, clearKeysAndCerts, checkForVPNUpdates |
45 | 45 | from libs.vpnproviders import populateSupportingFromGit, isAlternative, regenerateAlternative, getAlternativeLocation, updateVPNFile, checkUserDefined |
46 | | -from libs.vpnproviders import getUserDataPath, getAlternativeMessages |
47 | | -from libs.access import getVPNURL, setVPNURL |
| 46 | +from libs.vpnproviders import getUserDataPath, getAlternativeMessages, postConnectAlternative |
| 47 | +from libs.access import getVPNURL, setVPNURL, getVPNProfile |
48 | 48 | from libs.vpnapi import VPNAPI |
49 | 49 |
|
50 | 50 | # Set the addon name for use in the dialogs |
@@ -974,6 +974,8 @@ def onPlayBackStarted(self, *arg): |
974 | 974 | addon.setSetting("alternative_message_time", str(now())) |
975 | 975 | addon.setSetting("alternative_message_token", new_id) |
976 | 976 | addon = xbmcaddon.Addon() |
| 977 | + if isAlternative(vpn_provider): |
| 978 | + postConnectAlternative(vpn_provider) |
977 | 979 | if addon.getSetting("display_location_on_connect") == "true": |
978 | 980 | _, ip, country, isp = getIPInfo(addon) |
979 | 981 | xbmcgui.Dialog().notification(notification_title, "Connected to "+ getVPNProfileFriendly() + " via Service Provider " + isp + " in " + country + ". IP is " + ip + ".", getAddonPath(True, icon), 20000, False) |
|
0 commit comments