From a59ef9aea01bb8da9adc90982fa0be2165ef12dd Mon Sep 17 00:00:00 2001 From: Marcel van der Veldt Date: Tue, 31 Mar 2015 23:28:05 +0200 Subject: [PATCH] another attempt to delete the tvshow.nfo --- resources/lib/WriteKodiDB.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/resources/lib/WriteKodiDB.py b/resources/lib/WriteKodiDB.py index 28133f6c..59ee0c58 100644 --- a/resources/lib/WriteKodiDB.py +++ b/resources/lib/WriteKodiDB.py @@ -337,10 +337,9 @@ class WriteKodiDB(): docleanup = self.setKodiFilename(KodiItem["tvshowid"], KodiItem["file"], playurl, "tvshow") #if the path has been set directly in the DB, cleanup the locally created nfo file to import the tvshow into the Kodi DB to prevent Kodi from scanning it again. - if docleanup: - nfoPath = os.path.join(tvLibrary,MBitem["Id"],"tvshow.nfo") - print "about to delete file--> " + nfoPath - os.remove(nfoPath) + nfoPath = os.path.join(tvLibrary,MBitem["Id"],"tvshow.nfo") + if xbmcvfs.exists(nfoPath): + xbmcvfs.remove(nfoPath) #update/check all artwork changes |= self.updateArtWork(KodiItem,MBitem)