causefx / Organizr

HTPC/Homelab Services Organizer - Written in PHP
GNU General Public License v3.0
5.09k stars 289 forks source link

Why is Plex metadata is obtained from thtvdb instead of Plex server? #618

Closed joshuaavalon closed 6 years ago

joshuaavalon commented 6 years ago

When you click on the recently added, a card with metadata will pop up. But the metadata is obtained from thtvdb instead of the Plex server itself. What is the reason behind using thtvdb when you already have the Plex token? This is a problem for me because I am not using metadata from thtvdb and my metadata is not English.

causefx commented 6 years ago

Plex doesn't give full info. I will look into adding local info.

Sent from my iPhone

On Sep 24, 2017, at 7:23 PM, Joshua Avalon notifications@github.com wrote:

When you click on the recently added, a card with metadata will pop up. But the metadata is obtained from thtvdb instead of the Plex server itself. What is the reason behind using thtvdb when you already have the Plex token? This is a problem for me because I am not using metadata from thtvdb and my metadata is not English.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

joshuaavalon commented 6 years ago

@causefx From what I see, the pop up uses, poster, background, name, overview and actors. I pretty sure PlexPy can show everything except actors

causefx commented 6 years ago

Correct. Actors is only thing missing. I'll looking to rewriting that portion. Calendar on the other handle will always grab from tmdb as we don't get any info from sonarr or radarr.

Sent from my iPhone

On Sep 24, 2017, at 8:05 PM, Joshua Avalon notifications@github.com wrote:

@causefx From what I see, the pop up uses, poster, background, name, overview and actors. I pretty sure PlexPy can show everything except actors

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

causefx commented 6 years ago

@joshuaavalon

ok I got it:

i.e. image

image

causefx commented 6 years ago

do you have time to test it out real quick for me?

joshuaavalon commented 6 years ago

@causefx I can try it. But I am going to have lunch =p

causefx commented 6 years ago

no worries, was going to have u log into mine.

joshuaavalon commented 6 years ago

How can I test it? You push it to dev branch?

causefx commented 6 years ago

nothing pushed yet as i want to see if it works. I will PM you on Gitter

joshuaavalon commented 6 years ago

@causefx Actually you can get the actor as well. For example,

<Video allowSync="1" librarySectionID="12" librarySectionTitle="Movies" librarySectionUUID="bc2bf550-e41d-4c3a-a28b-b975ee0720d1" ratingKey="16852" key="/library/metadata/16852" studio="Universal Pictures" type="movie" title="The Lost World: Jurassic Park" titleSort="Lost World: Jurassic Park" contentRating="PG-13" summary="Four years after Jurassic Park&#39;s genetically bred dinosaurs ran amok, multimillionaire John Hammond shocks chaos theorist Ian Malcolm by revealing that Hammond has been breeding more beasties at a secret location. Malcolm, his paleontologist ladylove and a wildlife videographer join an expedition to document the lethal lizards&#39; natural behavior in this action-packed thriller." rating="5.3" audienceRating="5.1" viewCount="1" lastViewedAt="1506274867" year="1997" tagline="Something has survived." thumb="/library/metadata/16852/thumb/1506274810" art="/library/metadata/16852/art/1506274810" duration="7726793" originallyAvailableAt="1997-05-23" addedAt="1506274787" updatedAt="1506274810" audienceRatingImage="rottentomatoes://image.rating.spilled" chapterSource="agent" ratingImage="rottentomatoes://image.rating.rotten">
    <Media videoResolution="720" id="19548" duration="7726793" bitrate="852" width="1280" height="696" aspectRatio="1.85" audioChannels="2" audioCodec="aac" videoCodec="h264" container="mkv" videoFrameRate="24p" audioProfile="he-aac" videoProfile="high">
        <Part id="20343" key="/library/parts/20343/1506274643/file.mkv" duration="7726793" file="/media/plex/Media/Movie/The Lost World Jurassic Park (1997)/The Lost World Jurassic Park (1997).mkv" size="823261196" audioProfile="he-aac" container="mkv" indexes="sd" videoProfile="high" />
    </Media>
    <Genre tag="Sci-Fi" />
    <Genre tag="Action" />
    <Director tag="Steven Spielberg" />
    <Writer tag="David Koepp" />
    <Writer tag="Michael Crichton" />
    <Country tag="US" />
    <Collection tag="Jurassic Park" />
    <Role tag="Jeff Goldblum" />
    <Role tag="Julianne Moore" />
    <Role tag="Pete Postlethwaite" />
</Video>

From this key="/library/metadata/16852", then you can access /library/metadata/16852.

<?xml version="1.0" encoding="UTF-8"?>
<MediaContainer size="1" allowSync="1" identifier="com.plexapp.plugins.library" librarySectionID="12" librarySectionTitle="Movies" librarySectionUUID="bc2bf550-e41d-4c3a-a28b-b975ee0720d1" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1505835102">
    <Video ratingKey="16852" key="/library/metadata/16852" guid="com.plexapp.agents.imdb://tt0119567?lang=en" librarySectionID="12" librarySectionKey="/library/sections/12" studio="Universal Pictures" type="movie" title="The Lost World: Jurassic Park" titleSort="Lost World: Jurassic Park" contentRating="PG-13" summary="Four years after Jurassic Park&#39;s genetically bred dinosaurs ran amok, multimillionaire John Hammond shocks chaos theorist Ian Malcolm by revealing that Hammond has been breeding more beasties at a secret location. Malcolm, his paleontologist ladylove and a wildlife videographer join an expedition to document the lethal lizards&#39; natural behavior in this action-packed thriller." rating="5.3" audienceRating="5.1" viewCount="1" lastViewedAt="1506274867" year="1997" tagline="Something has survived." thumb="/library/metadata/16852/thumb/1506321980" art="/library/metadata/16852/art/1506321980" duration="7726793" originallyAvailableAt="1997-05-23" addedAt="1506274787" updatedAt="1506321980" audienceRatingImage="rottentomatoes://image.rating.spilled" chapterSource="agent" ratingImage="rottentomatoes://image.rating.rotten">
        <Media videoResolution="720" id="19548" duration="7726793" bitrate="852" width="1280" height="696" aspectRatio="1.85" audioChannels="2" audioCodec="aac" videoCodec="h264" container="mkv" videoFrameRate="24p" audioProfile="he-aac" videoProfile="high">
            <Part id="20343" key="/library/parts/20343/1506274643/file.mkv" duration="7726793" file="/media/plex/Media/Movie/The Lost World Jurassic Park (1997)/The Lost World Jurassic Park (1997).mkv" size="823261196" audioProfile="he-aac" container="mkv" indexes="sd" videoProfile="high">
                <Stream id="41022" streamType="1" default="1" codec="h264" index="0" bitrate="852" language="English" languageCode="eng" bitDepth="8" chromaSubsampling="4:2:0" frameRate="23.976" hasScalingMatrix="0" height="696" level="31" profile="high" refFrames="5" scanType="progressive" width="1280" />
                <Stream id="41023" streamType="2" selected="1" default="1" codec="aac" index="1" channels="2" bitrate="32" language="English" languageCode="eng" audioChannelLayout="stereo" profile="he-aac" samplingRate="48000" />
                <Stream id="41024" streamType="2" codec="aac" index="2" channels="2" bitrate="32" language="English" languageCode="eng" audioChannelLayout="stereo" profile="he-aac" samplingRate="48000" />
                <Stream id="41025" streamType="3" selected="1" default="1" codec="srt" index="3" bitrate="0" language="&#20013;&#25991;" languageCode="chi" />
            </Part>
        </Media>
        <Genre id="1539" filter="genre=1539" tag="Sci-Fi" count="8" />
        <Genre id="12" filter="genre=12" tag="Action" count="12" />
        <Genre id="104" filter="genre=104" tag="Adventure" count="14" />
        <Director id="7414" filter="director=7414" tag="Steven Spielberg" count="2" />
        <Writer id="7415" filter="writer=7415" tag="David Koepp" count="2" />
        <Writer id="7416" filter="writer=7416" tag="Michael Crichton" count="2" />
        <Producer id="1725" filter="producer=1725" tag="Colin Wilson" count="2" />
        <Producer id="7439" filter="producer=7439" tag="Gerald R. Molen" count="2" />
        <Country id="5688" filter="country=5688" tag="US" count="16" />
        <Collection id="7376" filter="collection=7376" tag="Jurassic Park" count="3" />
        <Role id="7417" filter="actor=7417" tag="Jeff Goldblum" count="2" role="Dr. Ian Malcolm" thumb="http://image.tmdb.org/t/p/original/w9frUiRJUyRnWvFqihtS31q6LWc.jpg" />
        <Role id="7418" filter="actor=7418" tag="Julianne Moore" role="Dr. Sarah Harding" thumb="http://image.tmdb.org/t/p/original/v2FcWGiiuvl6P7NV0966jNL09uh.jpg" />
        <Role id="7419" filter="actor=7419" tag="Pete Postlethwaite" role="Roland Tembo" thumb="http://image.tmdb.org/t/p/original/5nbSzrwyDcLhC15buncGdrQqJ8e.jpg" />
        <Role id="7420" filter="actor=7420" tag="Richard Attenborough" count="2" role="John Hammond" thumb="http://image.tmdb.org/t/p/original/Abo8fAcdruACs344ut6PNSKH7N4.jpg" />
        <Role id="7421" filter="actor=7421" tag="Vince Vaughn" role="Nick Van Owen" thumb="http://image.tmdb.org/t/p/original/r6ISnWjO5fA9QA1BTWUGaqdPyxE.jpg" />
        <Role id="7422" filter="actor=7422" tag="Arliss Howard" role="Peter Ludlow" thumb="http://image.tmdb.org/t/p/original/zDBEVA7Skrje3A8bmR2VOJRwkZc.jpg" />
        <Role id="7423" filter="actor=7423" tag="Vanessa Lee Chester" role="Kelly Curtis Malcolm" thumb="http://image.tmdb.org/t/p/original/7MISWIcns6CLagoPnKGzRXchoMz.jpg" />
        <Role id="7424" filter="actor=7424" tag="Joseph Mazzello" count="2" role="Tim Murphy" thumb="http://image.tmdb.org/t/p/original/zsBGvymDqB737PerJTqhS9dPuBd.jpg" />
        <Role id="7425" filter="actor=7425" tag="Ariana Richards" count="2" role="Lex Murphy" thumb="http://image.tmdb.org/t/p/original/b4S0q3uSDIophwYcPlBABgJObSX.jpg" />
        <Role id="7426" filter="actor=7426" tag="Steven Spielberg" role="Popcorn-Eating Man" thumb="http://image.tmdb.org/t/p/original/pOK15UNaw75Bzj7BQO1ulehbPPm.jpg" />
        <Role id="7427" filter="actor=7427" tag="Peter Stormare" role="Dieter Stark" thumb="http://image.tmdb.org/t/p/original/dDR0brp5L7fXDyEywrhjQv01LSg.jpg" />
        <Role id="7428" filter="actor=7428" tag="Camilla Belle" role="Cathy Bowman" thumb="http://image.tmdb.org/t/p/original/14kdXz89ewkw0aOClxMkSnqLF9X.jpg" />
        <Role id="7429" filter="actor=7429" tag="Thomas Rosales, Jr." role="Carter" thumb="http://image.tmdb.org/t/p/original/ffDrcpKGvjPgpcjd0t9T6EtQ2hz.jpg" />
        <Role id="7430" filter="actor=7430" tag="Thomas F. Duffy" role="Dr. Robert Burke" thumb="http://image.tmdb.org/t/p/original/jLANWUvY91SUNcBfB4z7PQUieE7.jpg" />
        <Role id="7431" filter="actor=7431" tag="Richard Schiff" role="Eddie Carr" thumb="http://image.tmdb.org/t/p/original/gHFxL7MIGvmcbg5hhTNrbjIttQN.jpg" />
        <Role id="7432" filter="actor=7432" tag="Harvey Jason" role="Ajay Sidhu" thumb="http://image.tmdb.org/t/p/original/8wgzBygmr51OnXS2uJFZMerIzXT.jpg" />
        <Role id="7433" filter="actor=7433" tag="Ian Abercrombie" role="Butler" thumb="http://image.tmdb.org/t/p/original/uywWX3MCmr9N2WFBcsInPzGFV4X.jpg" />
        <Role id="7434" filter="actor=7434" tag="Brian Turk" role="InGen Worker" thumb="http://image.tmdb.org/t/p/original/mLpRXKjB3gTzdLS9UeZmbPqPc1J.jpg" />
        <Role id="7435" filter="actor=7435" tag="Katy Boyer" role="Benjamin&#39;s Mom" thumb="http://image.tmdb.org/t/p/original/q6Wzl13sZfOsGWamggQ0vq2c7lK.jpg" />
        <Role id="7436" filter="actor=7436" tag="Colton James" role="Benjamin" thumb="http://image.tmdb.org/t/p/original/6zURfkzom11NfeyEwTnS3YsRSuX.jpg" />
        <Role id="7437" filter="actor=7437" tag="Larry Guardino" role="Board member (uncredited)" />
        <Role id="7438" filter="actor=7438" tag="Eli Roth" count="2" role="Subway Man" thumb="http://image.tmdb.org/t/p/original/lV7xjR2fUXX3u8Ixg8nhKFbuqm3.jpg" />
        <Role id="7438" filter="actor=7438" tag="Eli Roth" count="2" role="Subway Man (Uncredited)" thumb="http://image.tmdb.org/t/p/original/lV7xjR2fUXX3u8Ixg8nhKFbuqm3.jpg" />
        <Similar id="7462" filter="similar=7462" tag="Jurassic Park III" count="2" />
        <Similar id="7401" filter="similar=7401" tag="Jurassic Park" count="2" /
    </Video>
</MediaContainer>

This contains the thumbnail path.

causefx commented 6 years ago

Yes but no images without extra API calls

Sent from my iPhone

On Sep 24, 2017, at 11:48 PM, Joshua Avalon notifications@github.com wrote:

@causefx Actually you can get the actor as well. For example,

From this key="/library/metadata/16852", then you can access /library/metadata/16852".

<?xml version="1.0" encoding="UTF-8"?>

This contains the thumbnail path.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

joshuaavalon commented 6 years ago

How about calling only when the item is clicked? I don't think one extra call is to much.

causefx commented 6 years ago

Yea, I can plan for that for for everything beside calendar.