another attempt to delete the tvshow.nfo

This commit is contained in:
Marcel van der Veldt 2015-03-31 23:28:05 +02:00
parent 1388eda326
commit a59ef9aea0

View file

@ -337,10 +337,9 @@ class WriteKodiDB():
docleanup = self.setKodiFilename(KodiItem["tvshowid"], KodiItem["file"], playurl, "tvshow") 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 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")
nfoPath = os.path.join(tvLibrary,MBitem["Id"],"tvshow.nfo") if xbmcvfs.exists(nfoPath):
print "about to delete file--> " + nfoPath xbmcvfs.remove(nfoPath)
os.remove(nfoPath)
#update/check all artwork #update/check all artwork
changes |= self.updateArtWork(KodiItem,MBitem) changes |= self.updateArtWork(KodiItem,MBitem)