NemesisRE / sensor.plex_recently_added

▶️ Plex component to feed Upcoming Media Card.
Apache License 2.0
14 stars 3 forks source link

Add few important metadata key in card_item #8

Open 18rrs opened 5 days ago

18rrs commented 5 days ago

i have edited my sensor.py file in added this code for showing item sumary, director and actors:

if 'Director' in media:
                    card_item['director'] = ', '.join(
                        [director['tag'] for director in media['Director']][:3])   

if media['type'] == 'movie':
                    card_item['title'] = media.get('title', '')
                    card_item['episode'] = ''
                    if 'tagline' in media:
                        card_item['tagline'] = media.get('tagline', '')  
                    if 'Role' in media:
                        card_item['actors'] = ', '.join(
                            [actor['tag'] for actor in media['Role']][:3]) 

if 'summary' in media:
                    card_item['summary'] = media.get('summary', '')
                else:
                    card_item['summary'] = ''

it will be nice you you add this to original code

mkanet commented 4 days ago

@18rrs if you want to see this added to UMC, your best bet would be to switch to using the original UMC; which as a bunch of new features and is regularly updated. You can make your feature requests here. Note: For the time being, you will have to manually add the original repo's URL to HACS to make it searchable. If you don't know how to do this, use this link to show you: https://hacs.xyz/docs/faq/custom_repositories/