mirror of
https://github.com/SickGear/SickGear.git
synced 2024-11-28 23:53:37 +00:00
Merge branch 'feature/FixKodiNfo' into dev
Some checks are pending
Python Unit Tests / windows (windows-latest, 3.10) (push) Waiting to run
Python Unit Tests / windows (windows-latest, 3.11) (push) Waiting to run
Python Unit Tests / windows (windows-latest, 3.12) (push) Waiting to run
Python Unit Tests / windows (windows-latest, 3.8) (push) Waiting to run
Python Unit Tests / windows (windows-latest, 3.9) (push) Waiting to run
Python Unit Tests / linux (ubuntu-latest, 3.10) (push) Waiting to run
Python Unit Tests / linux (ubuntu-latest, 3.11) (push) Waiting to run
Python Unit Tests / linux (ubuntu-latest, 3.12) (push) Waiting to run
Python Unit Tests / linux (ubuntu-latest, 3.8) (push) Waiting to run
Python Unit Tests / linux (ubuntu-latest, 3.9) (push) Waiting to run
Python Unit Tests / macos (macos-latest, 3.10) (push) Waiting to run
Python Unit Tests / macos (macos-latest, 3.11) (push) Waiting to run
Python Unit Tests / macos (macos-latest, 3.12) (push) Waiting to run
Python Unit Tests / macos (macos-latest, 3.8) (push) Waiting to run
Python Unit Tests / macos (macos-latest, 3.9) (push) Waiting to run
Some checks are pending
Python Unit Tests / windows (windows-latest, 3.10) (push) Waiting to run
Python Unit Tests / windows (windows-latest, 3.11) (push) Waiting to run
Python Unit Tests / windows (windows-latest, 3.12) (push) Waiting to run
Python Unit Tests / windows (windows-latest, 3.8) (push) Waiting to run
Python Unit Tests / windows (windows-latest, 3.9) (push) Waiting to run
Python Unit Tests / linux (ubuntu-latest, 3.10) (push) Waiting to run
Python Unit Tests / linux (ubuntu-latest, 3.11) (push) Waiting to run
Python Unit Tests / linux (ubuntu-latest, 3.12) (push) Waiting to run
Python Unit Tests / linux (ubuntu-latest, 3.8) (push) Waiting to run
Python Unit Tests / linux (ubuntu-latest, 3.9) (push) Waiting to run
Python Unit Tests / macos (macos-latest, 3.10) (push) Waiting to run
Python Unit Tests / macos (macos-latest, 3.11) (push) Waiting to run
Python Unit Tests / macos (macos-latest, 3.12) (push) Waiting to run
Python Unit Tests / macos (macos-latest, 3.8) (push) Waiting to run
Python Unit Tests / macos (macos-latest, 3.9) (push) Waiting to run
This commit is contained in:
commit
66dff0ce7e
2 changed files with 21 additions and 8 deletions
|
@ -11,6 +11,7 @@
|
|||
* Change increase viewable history menu items from 13 to 15
|
||||
* Change add parsing of 2160p releases that don't have a source tag
|
||||
* Change twitter.com to x.com and Twitter to X (Twitter) branding
|
||||
* Fix credits in Kodi episode nfo writer
|
||||
|
||||
|
||||
### 3.32.8 (2024-10-07 00:30:00 UTC)
|
||||
|
|
|
@ -21,6 +21,7 @@ from . import generic
|
|||
from .. import logger
|
||||
import sg_helpers
|
||||
from ..indexers.indexer_config import TVINFO_IMDB, TVINFO_TVDB
|
||||
from lib.tvinfo_base import RoleTypes
|
||||
from lib.tvinfo_base.exceptions import *
|
||||
import sickgear
|
||||
import exceptions_helper
|
||||
|
@ -33,6 +34,7 @@ from six import string_types
|
|||
# noinspection PyUnreachableCode
|
||||
if False:
|
||||
from typing import AnyStr, Dict, Optional, Union
|
||||
from lib.tvinfo_base import PersonBase
|
||||
|
||||
|
||||
class KODIMetadata(generic.GenericMetadata):
|
||||
|
@ -378,15 +380,25 @@ class KODIMetadata(generic.GenericMetadata):
|
|||
watched = etree.SubElement(ep_node, 'watched')
|
||||
watched.text = 'false'
|
||||
|
||||
credits = etree.SubElement(ep_node, 'credits')
|
||||
credits_text = getattr(ep_info, 'writer', None)
|
||||
if None is not credits_text:
|
||||
credits.text = '%s' % credits_text
|
||||
crew = getattr(ep_info, 'crew', None)
|
||||
if None is not crew:
|
||||
for role_type, sub_el_name in [(RoleTypes.CrewWriter, 'credits'), (RoleTypes.CrewDirector, 'director')]:
|
||||
for credit in (crew[role_type] or []): # type: PersonBase
|
||||
if credit.name:
|
||||
sub_el = etree.SubElement(ep_node, sub_el_name)
|
||||
sub_el.text = '%s' % credit.name
|
||||
|
||||
director = etree.SubElement(ep_node, 'director')
|
||||
director_text = getattr(ep_info, 'director', None)
|
||||
if None is not director_text:
|
||||
director.text = '%s' % director_text
|
||||
# credits_text = getattr(ep_info, 'writer', None)
|
||||
# if None is not credits_text and (
|
||||
# credits_list := [_c.strip() for _c in credits_text.split('|') if _c.strip()]):
|
||||
# for credit in credits_list:
|
||||
# credits = etree.SubElement(ep_node, 'credits')
|
||||
# credits.text = '%s' % credit
|
||||
|
||||
# director = etree.SubElement(ep_node, 'director')
|
||||
# director_text = getattr(ep_info, 'director', None)
|
||||
# if None is not director_text:
|
||||
# director.text = '%s' % director_text
|
||||
|
||||
ratings = etree.SubElement(ep_node, 'ratings')
|
||||
if None is not getattr(ep_info, 'rating', None):
|
||||
|
|
Loading…
Reference in a new issue