Willy,
I think you've misunderstood me.
With what I had in mind (and it isn't more than that), you could even grab with a single config, as files like they are created now will be no longer relevant. Whatever is created by the grabber (either 1 or 1000 files) is imported into that database.
When the database import process runs on the server, it can compare every item of grabbed programme information with what is in the database. It might be new, it might be an update, or there might be a database record but nothing in the import (which is a delete). Whatever it is, the database is updated with it, and with the update an update timestamp is written.
Based on that timestamp, you can generate delta files (all programme data updated since time x). So if you have 7 days of data for a channel, the delta file could contain 1 update for today, nothing for Tuesday and Wednesday, 2 additions and 1 delete for Thursday, nothing for Friday and Saturday, and all entries for Sunday (as that is a new day compared to yesterday's run). Since these are delta files, you need to keep several days of it (in this example at least 7) online, so that you can also update a box that doesn't have had regular updates.
The server can also generate an "all channels" list, if needed ordered by language, provider, whatever, in a nested structure. This file can be used on the box to allow the user to create the mapping between the service refs there is EPG data for, and the users local service refs. This has to happen with a GUI that needs to be designed. The GUI can also have features to autmatically map, for example based on the current map files you already maintain for the different providers. This is all something to be worked out.
After completing the mapping locally, the box now has a local file with service ref's of all channels it wants EPG data of. This file can optionally contain an alias (so you can say "this service ref for a stream requires the EPG from this cable service ref).
This is btw quite similar to how the EPG import GUI in Enigma1 used to work.
When the importer starts, it loops over this file, and
- for each entry, it will fire a download request containing the service ref and the last update timestamp: http://example.org?s...&t=89873125537
- the server will respond with a data structure (xml, json), that lists the files the box needs to download
- the box downloads each file, and imports it
This way
- the box will only download EPG for the channels the user has defined she/he wants EPG data for.
- the box will only download every programme description exactly once.
- the load of downloading and processing is spread over time, as it isn't one big file, but several small files.
Only in the case of a complete reload (for example after a flash), a bit more data then needed is downloaded, as the delta's can contain updates so for those programme's you load a description more than once. But I think that in terms of volume that is acceptable.
Thinking very out of the box: We could even think of having that GUI send feedback to the server with regards to the mapping. So if the user says "this local service ref entry needs EPG from channel A instead of B", or "this channel no longer exists", the GUI can report it back, so the users can maintain the mapping list, instead of you.