Posts: 1,109
Joined: Feb 2011
Reputation:
39
Do you want a module that does the following:
isFollowing(leagueID): returns True if leagueID is in the current list of watched leagues.
addLeague(leagueID): add leagueID to list of watched leagues (return True if successful)
removeLeague(leagueID): remove leagueID to list of watched leagues (return True if successful)
That's easy enough.
Where I'm struggling is how you would call this from another addon because "RunScript" wouldn't capture any return value. Do you have any ideas?
Posts: 2,078
Joined: Nov 2012
Reputation:
176
enen92
Team-Kodi Member
Posts: 2,078
Probably you can define an extension point in the addon.xml to define a specific folder on your service addon (called bbclivescores or something) as a python module. Then on my side it would be simple as:
import bbclivescores
bbclivescores.Api().isFollowing(leagueId)
I didn't know the runscript function doesn't return any values
Posts: 1,109
Joined: Feb 2011
Reputation:
39
Ok. Sounds simple enough.
I'll have a go when I have a bit of free time.
Posts: 2,078
Joined: Nov 2012
Reputation:
176
enen92
Team-Kodi Member
Posts: 2,078
Thanks mate I'll have a go with it at night. Then I'll let you know about the success or issues. Many thanks
Posts: 1,109
Joined: Feb 2011
Reputation:
39
Sounds good. Happy to help where I can as it would be good to have these things as integrated as possible.
Would it be useful to have a method that returns all the league IDs?
Posts: 1,109
Joined: Feb 2011
Reputation:
39
FYI - anyone trying to use the service today for the Community Shield game then, unfortunately, it looks like this won't work.
This should just be an issue for this particular match (because the BBC haven't given the competition an ID) but normal league matches etc should still be ok.
Posts: 4
Joined: Oct 2015
Reputation:
0
I've installed this, but i can't make it work. When i install it from the zip file i get the popup saying that the BBC Football Scores add-on has been instaled and is activated, but after that i can't find it anywere, it's not in "services" or any other add-on category. Is this a known problem ?
Any help, please ? Thanks in advance.
Posts: 1,109
Joined: Feb 2011
Reputation:
39
Not a known problem, no. It should appear in "Services".
I hate to sound like IT support, but have you tried restarting Kodi? Try that and then have a look at the kodi.log file to see if there are any error messages in there.
Posts: 4
Joined: Oct 2015
Reputation:
0
Sure, i did all that before posting here. Yesterday i tried it again in another OS, with a fresh Kodi installation and still nothing in "Services", but i found it under "Programs", but only there. And now it is there in both computers.
I searched in "services" and the entire add-on section and it's nothing there, but it doesn't matter anymore, what's important is that i found it, and it's working now. Thanks, great job with this.
Posts: 1,109
Joined: Feb 2011
Reputation:
39
Hmm. It should be in both.
Running from programs should bring up the league table options but running as a service should give you the live scores.
Are the live scores notifications working?
Posts: 4
Joined: Oct 2015
Reputation:
0
That i don't know yet, still waiting for a game to try it. The next ones will be turkish league games in a couple of hours. I'll say something later.
Posts: 1,109
Joined: Feb 2011
Reputation:
39
Ok. Sounds like the BBC didn't have live score information for the Turkish league as you say. Glad to hear it seems to be working otherwise.