diff --git a/jellyfin_kodi/objects/movies.py b/jellyfin_kodi/objects/movies.py index 990ba6c5e..fa061fd55 100644 --- a/jellyfin_kodi/objects/movies.py +++ b/jellyfin_kodi/objects/movies.py @@ -189,13 +189,13 @@ def get_path_filename(self, obj): obj['Path'] = obj['Path'].replace(obj['Filename'], "") '''check dvd directories and point it to ./VIDEO_TS/VIDEO_TS.IFO''' - if validate_dvd_dir(obj['Path'] + obj['Filename']): + if ('Container' not in obj or ('Container' in obj and obj['Container'] == 'dvd')) and validate_dvd_dir(obj['Path'] + obj['Filename']): obj['Path'] = obj['Path'] + obj['Filename'] + '/VIDEO_TS/' obj['Filename'] = 'VIDEO_TS.IFO' LOG.debug("DVD directory %s", obj['Path']) '''check bluray directories and point it to ./BDMV/index.bdmv''' - if validate_bluray_dir(obj['Path'] + obj['Filename']): + if ('Container' not in obj or ('Container' in obj and obj['Container'] == 'bluray')) and validate_bluray_dir(obj['Path'] + obj['Filename']): obj['Path'] = obj['Path'] + obj['Filename'] + '/BDMV/' obj['Filename'] = 'index.bdmv' LOG.debug("Bluray directory %s", obj['Path']) diff --git a/jellyfin_kodi/objects/tvshows.py b/jellyfin_kodi/objects/tvshows.py index 3b169e1b0..c772f2cff 100644 --- a/jellyfin_kodi/objects/tvshows.py +++ b/jellyfin_kodi/objects/tvshows.py @@ -412,13 +412,13 @@ def get_episode_path_filename(self, obj): obj['Path'] = obj['Path'].replace(obj['Filename'], "") '''check dvd directories and point it to ./VIDEO_TS/VIDEO_TS.IFO''' - if validate_dvd_dir(obj['Path'] + obj['Filename']): + if ('Container' not in obj or ('Container' in obj and obj['Container'] == 'dvd')) and validate_dvd_dir(obj['Path'] + obj['Filename']): obj['Path'] = obj['Path'] + obj['Filename'] + '/VIDEO_TS/' obj['Filename'] = 'VIDEO_TS.IFO' LOG.debug("DVD directory %s", obj['Path']) '''check bluray directories and point it to ./BDMV/index.bdmv''' - if validate_bluray_dir(obj['Path'] + obj['Filename']): + if ('Container' not in obj or ('Container' in obj and obj['Container'] == 'bluray')) and validate_bluray_dir(obj['Path'] + obj['Filename']): obj['Path'] = obj['Path'] + obj['Filename'] + '/BDMV/' obj['Filename'] = 'index.bdmv' LOG.debug("Bluray directory %s", obj['Path'])