mediathekview / plugin.video.mediathekview

Kodi plugin that gives access to most video-platforms from German public service broadcasters using the database of MediathekView.de
https://mediathekview.de/download/#mediathekview-f%C3%BCr-kodi-fr%C3%BCher-xbmc
MIT License
55 stars 24 forks source link

mvupdate3 fails to update totals in status table #192

Closed ahpohl closed 3 years ago

ahpohl commented 3 years ago

The standalone updater script mvupdate3 (version 0.6.6 from git clone) fails to update totals in status table.

Full database update log output shows zero totals:

Feb 27 10:57:22 odroidc4 mvupdate3[5328]: 2021-02-27 10:57:22.461099 INFO [mvupdate3-0.6.6:MediathekViewUpdater]: In progress (97%): channels:20, shows:6446, movies:435998 ...
Feb 27 10:57:23 odroidc4 mvupdate3[5328]: 2021-02-27 10:57:23.559319 INFO [mvupdate3-0.6.6:MediathekViewUpdater]: In progress (98%): channels:21, shows:6469, movies:436998 ...
Feb 27 10:57:24 odroidc4 mvupdate3[5328]: 2021-02-27 10:57:24.872419 INFO [mvupdate3-0.6.6:MediathekViewUpdater]: Added: channels:21, shows:6516, movies:437998 ...
Feb 27 10:57:29 odroidc4 mvupdate3[5328]: 2021-02-27 10:57:29.324320 INFO [mvupdate3-0.6.6:MediathekViewUpdater]: Deleted: channels:0, shows:0, movies:0
Feb 27 10:57:29 odroidc4 mvupdate3[5328]: 2021-02-27 10:57:29.324491 INFO [mvupdate3-0.6.6:MediathekViewUpdater]: Total: channels:0, shows:0, movies:0
Feb 27 10:57:29 odroidc4 mvupdate3[5328]: 2021-02-27 10:57:29.343020 INFO [mvupdate3-0.6.6:MediathekViewUpdater]: 438847 records processed
Feb 27 10:57:29 odroidc4 mvupdate3[5328]: 2021-02-27 10:57:29.343215 INFO [mvupdate3-0.6.6:MediathekViewUpdater]: Import of ./Filmliste-akt in update cycle 0 finished. Duration: 471 seconds
Feb 27 10:57:29 odroidc4 mvupdate3[5328]: 2021-02-27 10:57:29.343414 INFO [mvupdate3-0.6.6:MediathekViewUpdater]: Cleaning up downloads...
Feb 27 10:57:29 odroidc4 mvupdate3[5328]: 2021-02-27 10:57:29.403720 INFO [mvupdate3-0.6.6]: Exiting...
Feb 27 10:57:29 odroidc4 systemd[1]: mediathek-db-update.service: Succeeded.

status table after full update:

+------------+--------+------------+------------+------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
| modified   | status | lastupdate | filmupdate | fullupdate | add_chn | add_shw | add_mov | del_chm | del_shw | del_mov | tot_chn | tot_shw | tot_mov | version |
+------------+--------+------------+------------+------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+
| 1614419849 | IDLE   | 1614419849 | 1614414780 |          1 |      21 |    6516 |  437998 |       0 |       0 |       0 |       0 |       0 |       0 |       3 |
+------------+--------+------------+------------+------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+

in updater.py the code to update the status table is there but not working:

    def _update_end(self, full, status):
        self.logger.info('Added: channels:%d, shows:%d, movies:%d ...' % (
            self.add_chn, self.add_shw, self.add_mov))
        (self.del_chn, self.del_shw, self.del_mov, self.tot_chn, self.tot_shw,
         self.tot_mov) = self.database.ft_update_end(full and status == 'IDLE')
        self.logger.info('Deleted: channels:%d, shows:%d, movies:%d' %
                         (self.del_chn, self.del_shw, self.del_mov))
        self.logger.info('Total: channels:%d, shows:%d, movies:%d' %
                         (self.tot_chn, self.tot_shw, self.tot_mov))
        self.database.update_status(
            status,
            int(time.time()) if status != 'ABORTED' else None,
            None,
            1 if full else 0,
            self.add_chn, self.add_shw, self.add_mov,
            self.del_chn, self.del_shw, self.del_mov,
            self.tot_chn, self.tot_shw, self.tot_mov
        )

Hence in Kodi in the Database information dialog the totals are also shown zero. However, the totals are shown correctly when using Sqlite directly in the plugin instead of external MySQL.

codingPF commented 3 years ago

The dialog will be replaced in the next version. So it will be fixed in some way

codingPF commented 3 years ago

Released to 1.0.0 master