ZeroQI / Hama.bundle

Plex HTTP Anidb Metadata Agent (HAMA)
GNU General Public License v3.0
1.19k stars 110 forks source link

[QUESTION] is it possible to provide episodes unique id? #510

Closed arabcoders closed 2 years ago

arabcoders commented 2 years ago

Hello,

The new plex agents provide unique id for each episode for example

<MediaContainer>
    <Video guid="plex://episode/5d9c0b767b5c2e001e678d76" type="episode" title="Departure">
        <Guid id="imdb://tt1640230"/>
        <Guid id="tmdb://883937"/>
        <Guid id="tvdb://1926031"/>
    </Video>
</MediaContainer>

i simplified the xml payload just to give an idea of how the new agents provide the external GUIDs, is it possible to for Hama to provide those ids as well?

ZeroQI commented 2 years ago

Hi, i am sorry but i do not know what you mean

arabcoders commented 2 years ago

Hi

Thank you for the response, those ids are usually used to sync the watch state using plugins and tools like trakt.tv etc, between different media servers like jellyfin and emby.

ZeroQI commented 2 years ago

This XML is internal to Plex

In short, you want HAMA to synchronise read status but give the Plex propriatary XML as example, there is a logical leap there...

Wouldn't installing Trakt.tv scrobbler do that ? Could not figure out how Trakt.tv agent does it, way too complex https://github.com/trakt/Plex-Trakt-Scrobbler/blob/master/Trakttv.bundle/Contents/Code/main.py

I do not know how to update safely this XML, and Third party Plex agents can't do so to my knowledge, so don't think it can be done. New Plex agents are in C++ cna may be able to do that...

arabcoders commented 2 years ago

Thank you for your explanation, i have solved this problem in my own watchstate tool by using something i call relative unique id which is pretty much like plex GUIDs for now. im just wondering do you have list of possible dbs prefix hama uses? for example i noticed right now the following

anidb-(showid), tvdb-(showid), tvdb2-(showid), tvdb3-(showid)

my tool is able to parse this one for now as i don't know how many variation hama uses for db identifiers. right now i am able to parse hama://(db:anidb)-(id:showid),

ZeroQI commented 2 years ago

https://github.com/ZeroQI/Hama.bundle/blob/master/Contents/Code/__init__.py#L105 Force IDs: anidb anidb2 tvdb tvdb2 tvdb3 tvdb4 tvdb5 tmdb tsdb imdb

arabcoders commented 2 years ago

Thank you, I am gonna list some assumptions from what i understand from the code

Sorry if im bothering you.

ZeroQI commented 2 years ago

Tmdb for movies, Tsdb for series, I thought it was clever and consistent... I do not support thetvdb movies currently so no conflict...