@@ -157,7 +157,7 @@ def _get_ids(kodi_id, kodi_type, path):
157
157
if not kodi_id and kodi_type and path :
158
158
kodi_id , _ = kodi_db .kodiid_from_filename (path , kodi_type )
159
159
if kodi_id :
160
- with PlexDB () as plexdb :
160
+ with PlexDB (lock = False ) as plexdb :
161
161
db_item = plexdb .item_by_kodi_id (kodi_id , kodi_type )
162
162
if db_item :
163
163
plex_id = db_item ['plex_id' ]
@@ -419,7 +419,7 @@ def _record_playstate(status, ended):
419
419
if status ['plex_type' ] not in v .PLEX_VIDEOTYPES :
420
420
LOG .debug ('Not messing with non-video entries' )
421
421
return
422
- with PlexDB () as plexdb :
422
+ with PlexDB (lock = False ) as plexdb :
423
423
db_item = plexdb .item_by_id (status ['plex_id' ], status ['plex_type' ])
424
424
if not db_item :
425
425
# Item not (yet) in Kodi library
@@ -466,7 +466,7 @@ def _playback_progress(status, ended, db_item):
466
466
playcount = status ['playcount' ]
467
467
if playcount is None :
468
468
LOG .debug ('playcount not found, looking it up in the Kodi DB' )
469
- with kodi_db .KodiVideoDB () as kodidb :
469
+ with kodi_db .KodiVideoDB (lock = False ) as kodidb :
470
470
playcount = kodidb .get_playcount (db_item ['kodi_fileid' ]) or 0
471
471
if status ['external_player' ]:
472
472
# video has either been entirely watched - or not.
@@ -535,7 +535,7 @@ def _external_player_correct_plex_watch_count(db_item):
535
535
playcountminimumtime set in playercorefactory.xml)
536
536
See https://kodi.wiki/view/External_players
537
537
"""
538
- with kodi_db .KodiVideoDB () as kodidb :
538
+ with kodi_db .KodiVideoDB (lock = False ) as kodidb :
539
539
playcount = kodidb .get_playcount (db_item ['kodi_fileid' ])
540
540
LOG .debug ('External player detected. Playcount: %s' , playcount )
541
541
PF .scrobble (db_item ['plex_id' ], 'watched' if playcount else 'unwatched' )
0 commit comments