There are directories now that contain neither a name or an id
delivered by the API for some reason, looking like this:
{
'is_visible': True,
'is_readable': False,
'is_writable': True
}
which makes no sense at all. If such a directory is given the
processing is stopped here and all further directories are ignored.
This should not be the case.
This commit fixes this behavior, so that all directories are processed
as expected.
Before we used insecure python variables to assemble a query string.
Now we use the DB-APIs parameter subtitution.
pymysqlite was switched for sqlite due to being included in python.
Currently we only need the db to keep track of the files that were
already downloaded, thus we only use one database and only one table.
A complete sql database is a bit too bulky for this purpose.
By using sqlite we can minimize and embed the db.
- mysql creates database and tables to given mysql if not existent already
- mysql reads last change values from db
- mysql saves ch_date after downloading
- run now takes care for the variables of mysql and studip