NemesisRE / sensor.plex_recently_added

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

Add more (episode) attributes #7

Open Lackmake opened 5 months ago

Lackmake commented 5 months ago

I've build myself a custom card for displaying the info this sensor provides. I would really like some more media attributes for episodes eg episodeNumber and seasonNumber (not just the combined one called 'number'), libraryName (if possible).

I think plex provides many more info about the media which could be integrated here. I dont think that would break the upcoming-media-card as long as the existing attribute arent changed. So maybe these attributes can help me and others build more custom things more easily based on this sensor.

(With my card i use media_player.play_media to stream episodes from plex to a chromecast. For that to work i needed to seperate the Episode/Season number from the "number" attribute myself and had to hardcode my library-name. So i already accomplished what i wanted to do, but it could have been nicer 😄)

mkanet commented 5 months ago

That should be pretty easy. I coincidently recently added plex web_links to attributes yesterday. I also made some cool improvements to upcoming media card related to web_links. https://github.com/NemesisRE/sensor.plex_recently_added/issues/6#issuecomment-1907487010 I also fixed some bugs along the way in both Plex recently added integration and upcoming-media-card. I plan to start a new fork for both really soon. I can add espide and season attributes for you.

mkanet commented 5 months ago

Done. It only needed a few lines of code. It was pretty simple compared to the web_link attribute I also added recently. I'll let you know as soon as I update: https://github.com/mkanet/upcoming-media-card and https://github.com/mkanet/sensor.plex_recently_added with the new features and bugfixes I recently added.

Example

mkanet commented 5 months ago

Get it below. More updates to come...

https://github.com/mkanet/upcoming-media-card https://github.com/mkanet/sensor.plex_recently_added

Lackmake commented 5 months ago

Thanks 👍 would the 'libraryName' also be possible or does the Plex API not provide it?

mkanet commented 5 months ago

I don't think I understand. Do you mean just return TV Shows and Movies library names? I don't think I've ever seen them called anything other than the default names. If you mean something else, can you give me a couple of examples? Is there anything else you would like to see?

Lackmake commented 5 months ago

Yes, For most users the libraries probably still have their default names, however they are customizable and required to cast plex media to Google Cast devices.

When i do "Get Info" > "View XML" in plex, the attribute i would like to have is called "librarySectionTitle". This is available on all media elements, not just episodes and movies. On the Plex Integration page is an example where the tv shows are split into "Kids TV" and "Adult TV" libraries.

On another topic: Currently you are updating your own fork of this repo, but not the one found in HACS. Are there plans to update this one too or maybe let HACS point to your repository instead?

mkanet commented 5 months ago

@Lackmake getting that data is actually very straightforward.

upcoming-media-card and Plex_Recently_Added repos that are searchable on HACs were neglected without any updates for so long that they eventually became "archived".

IMHO, upcomin_media_card is still arguably one of the nicest-looking cards on Home Assistant; with lots of potential for improvement. I've always wanted for it to be more interactive; I.E., being able to mouse-click or touch each TV Show Episode or Movie to take me directly to the Plex Web interface to start watching the Show or Movie. However, in order for that to happen, both Upcoming Media Card as well as Plex_Recently_Added would have to be updated with deep_link support.

Since I knew that features like this would never be implemented, I decided to resurrect these two repos from the dead with my own forks. My intention is to add my repos on HACS soon and continue to provide support for them. As long as the requests are reasonable; and, don't bloat/slow down these components, I dont mind implementing them; especially if I can also take advantage of them.

mkanet commented 5 months ago

@Lackmake I have good news. The original author of all these components added me as a maintainer to these repos. Plex_Recently_Update now officially has episode number and season number and deep_link attributes I have not added library names to the attribute yet. I will do that after I update the original upcoming_media_card repo.

mkanet commented 5 months ago

Done. All official/original repos have been updated. From now on, you can just make your feature requests on the official repos' issues section. I still need to look at the backlog of feature requests on the official repos to see which ones are feasible; and, in which order.

Since NemesisRE/sensor.plex_recently_added isnt my repo, I can't close this issue.. even though I completed the request already.

Lackmake commented 5 months ago

I don't see an update in HACS but I can close this issue nevertheless. HACS also points me to exactly this repository for the recently added sensor, which confused me a bit because you linked the one from "custom_components" earlier....

mkanet commented 5 months ago

Thanks for letting me know. It looks like the original repos were all removed from HACS after their statuses on Github changed to an 'archived' status (since HACS installer on Home Assistant wouldn't let us install archived repos).

I didnt notice this since I was using my forked repo's still; which I manually added in Home Assistant.

I'll see if I can update HACS' official repo list to include all the original/official repos again.

It looks like NemesisRE/sensor.plex_recently_added was made searchable on HACS as a temporary solution since the original author of all these repos was MIA. Luckily, I got a hold of him.

Stay tuned...

Lackmake commented 3 months ago

Any news?