Progress: The addon works well with a static database I created by adding a few events to it through the db api of the addon.
Created with a script like this:
Code:
import sc_database
lista_ligas = ['4344','4335','4328','4387','4380']
for id_ in lista_ligas:
sc_database.Inserter().insert_league(id_)
lista_teams = ['134850','134849','134855','134854','134869','134867','134882','134863','134116','134588','134114','134118','134386','134108','133738','133736','133739','133725','133610','133612','134777','133616','133613','133636']
for id_ in lista_teams:
sc_database.Inserter().insert_team(id_)
lista_events = ['482649','482647','452436','452433','446426','446424','446430','443895','443893','441750','441752','441744']
for id_ in lista_events:
sc_database.Inserter().insert_event(id_,'folder_or_file.mp4')
This is basically what the scrapper will do, try to find the event id and then call the db api to add that event, that league and the teams involved.
Season list and teams list in the submenu of the home menu are also working. See screenshots below:
watch gallery
Now missing a dialog/views for events and then the next step is the scrapper
For the scrapper I will probably have a request for @
zag. Probably we will need to add an entry in the database for Leagues and Teams called keywords. Something the site might ignore when searching for teams but that would be returned in the json response.
For instance if you have a file named:
EPL.1415.Chelsea.vs.Arsenal.mp4 it will be hard to find the league of the event without checking the teams first. EPL is a common name but we can only search the api for something like Premier League or British Premier League. A simple field (invisible in the main page as alternative name is right now) where one could fill keywords separated by ; would be helpfull. For instance for arsenal you could have:
Arsenal;gunners;arsenalfc;etc