Open Excidion opened 3 years ago
@fanyx will there be a list of tracks and time windows in future versions of your code that the bot could read in?
Yes, i could change the way tracks are loaded into the tmserver using a xaseco plugin to accomodate for this.
For this we could extend the database table 'challenges' to include a CalenderWeek column or two columns 'From' and 'To' that hold the week/days for the track. Then we could pass the information about the tracks and intended weeks to the telegram bot to fill those fields on startup/check for added tracks or changed week assignments. The xaseco plugin could read those assignments, find out which track should be online atm and reassign the trackmania server playlist accordingly.
Is this your intention?
How to handle the track selection server-side i leave up to you. But in general to have a place where the tracks and their related timeframes are stored should be the goal.
From my perspective it is enough to have two columns in the table challenges:
Unless you want to have breaks within a season (which might be good to have) you only need the starting timestamp (or the ending for that matter) to always identify which track is the current one.
If we want to restrict ourselfes with changing tracks only on a per-calender-week basis (which I think is the best anyways) we could also just have the calender week as a column. Maybe we should just start with that and adapt if we ever feel the need to have more flexible timeframes
Status Awating server-side implementation of scheduled tracks and weeks by @fanyx (via yaml file, DB table, whatever, ...). Solution to this will be taylored to fit the implementation.
By giving a "ground truth" the bot does not have to guess the order of tracks from the data. This enables multiple things:
it might make sense to store this list in the DB, so @fanyx input might be needed.