Fix db locking issue with thetvdb_favorites. fix #2827