Skip to content

Commit

Permalink
tvscraper
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkusEh authored Jan 10, 2024
1 parent fb79541 commit bd16ef7
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions resources/lib/folder.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def __init__(self, folder, filesFoldersProvided = False, dirs = [], files = []):
else:
self.dirs, self.files = xbmcvfs.listdir(self.path)

def readScrapperFiles(self):
def readScraperFiles(self):
self.readKodiFile()
self.readTvscraperFile()

Expand Down Expand Up @@ -98,7 +98,7 @@ def writeKodiFile(self):
f_kodi.close()

def getContentType(self, default = constants.MOVIES):
self.readScrapperFiles()
self.readScraperFiles()
r = self.kodiLines.get('C')
if r != None: return r
r = self.tvscraperData.get('type')
Expand All @@ -113,15 +113,15 @@ def setContentType(self, contentType):
self.writeKodiFile()

def getEpisode(self, default):
self.readScrapperFiles()
self.readScraperFiles()
r = self.kodiLines.get('E')
if r != None: return int(r)
r = self.tvscraperData.get('episode_number')
if r == None: return default
return r

def getEpisodeName(self, default = ""):
self.readScrapperFiles()
self.readScraperFiles()
r = self.tvscraperData.get('episode_name')
if r == None: return default
return r
Expand All @@ -132,7 +132,7 @@ def setEpisode(self, Episode):
self.writeKodiFile()

def getSeason(self, default):
self.readScrapperFiles()
self.readScraperFiles()
r = self.kodiLines.get('S')
if r != None: return int(r)
r = self.tvscraperData.get('season_number')
Expand All @@ -145,7 +145,7 @@ def setSeason(self, Season):
self.writeKodiFile()

def getYear(self):
self.readScrapperFiles()
self.readScraperFiles()
r = self.kodiLines.get('Y')
if r != None:
if not r.isdigit(): xbmc.log("kfolder, file kodi, year not integer, year = " + str(r) + " path " + self.path, xbmc.LOGERROR)
Expand All @@ -156,13 +156,13 @@ def getYear(self):
return r

def getName(self, default):
self.readScrapperFiles()
self.readScraperFiles()
r = self.tvscraperData.get('name')
if r == None: return default
return r

def getDbUrl(self):
self.readScrapperFiles()
self.readScraperFiles()
r = self.tvscraperData.get('movie_tv_id')
if r == None: return ""
if self.source == 'themoviedb': return "https://www.themoviedb.org/movie/" + str(r)
Expand Down

0 comments on commit bd16ef7

Please sign in to comment.