mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 04:06:11 +00:00
Add BDMV and DVD Rip support in TV Shows
Porting @YK-Samgo's work from Movies.py to TVShows.py
This commit is contained in:
parent
2345dfd428
commit
b6ca78031c
1 changed files with 14 additions and 1 deletions
|
@ -11,7 +11,7 @@ from kodi_six.utils import py2_encode
|
||||||
|
|
||||||
import downloader as server
|
import downloader as server
|
||||||
from database import jellyfin_db, queries as QUEM
|
from database import jellyfin_db, queries as QUEM
|
||||||
from helper import api, stop, validate, jellyfin_item, values, Local
|
from helper import api, stop, validate, validate_bluray_dir, validate_dvd_dir, jellyfin_item, values, Local
|
||||||
from helper import LazyLogger
|
from helper import LazyLogger
|
||||||
from helper.utils import find_library
|
from helper.utils import find_library
|
||||||
from helper.exceptions import PathValidationException
|
from helper.exceptions import PathValidationException
|
||||||
|
@ -410,6 +410,19 @@ class TVShows(KodiDb):
|
||||||
raise PathValidationException("Failed to validate path. User stopped.")
|
raise PathValidationException("Failed to validate path. User stopped.")
|
||||||
|
|
||||||
obj['Path'] = obj['Path'].replace(obj['Filename'], "")
|
obj['Path'] = obj['Path'].replace(obj['Filename'], "")
|
||||||
|
|
||||||
|
'''check dvd directries and point it to ./VIDEO_TS/VIDEO_TS.IFO'''
|
||||||
|
if validate_dvd_dir(obj['Path'] + obj['Filename']):
|
||||||
|
obj['Path'] = obj['Path'] + obj['Filename'] + '/VIDEO_TS/'
|
||||||
|
obj['Filename'] = 'VIDEO_TS.IFO'
|
||||||
|
LOG.debug("DVD directry %s", obj['Path'])
|
||||||
|
|
||||||
|
'''check bluray directries and point it to ./BDMV/index.bdmv'''
|
||||||
|
if validate_bluray_dir(obj['Path'] + obj['Filename']):
|
||||||
|
obj['Path'] = obj['Path'] + obj['Filename'] + '/BDMV/'
|
||||||
|
obj['Filename'] = 'index.bdmv'
|
||||||
|
LOG.debug("Bluray directry %s", obj['Path'])
|
||||||
|
|
||||||
else:
|
else:
|
||||||
obj['Path'] = "plugin://plugin.video.jellyfin/%s/" % obj['SeriesId']
|
obj['Path'] = "plugin://plugin.video.jellyfin/%s/" % obj['SeriesId']
|
||||||
params = {
|
params = {
|
||||||
|
|
Loading…
Reference in a new issue