duck7000 / imdbGraphQLPHP

7 stars 0 forks source link

Suggestion: Add a cover image in the award() section of Name to return it #68

Closed jianglin8-hub closed 1 month ago

jianglin8-hub commented 2 months ago

When obtaining artist information, it is hoped that relevant artwork poster images can be returned at the same time, which is very useful for artist introductions.

For example, the list of works returned by award currently has an IMDB ID. If you need to display pictures of your works, you need to query the information of your works again, which seems too cumbersome.

duck7000 commented 2 months ago

I'm not sure i understand what you exactly mean?

Do you want to add image url to this section of award()

                //credited titles
                $titles = array();
                if ($edge->node->awardedEntities->secondaryAwardTitles !== null) {
                    foreach ($edge->node->awardedEntities->secondaryAwardTitles as $title) {
                        $titleName = isset($title->title->titleText->text) ? $title->title->titleText->text : '';
                        $titleId = isset($title->title->id) ? $title->title->id : '';
                        $titleNote = isset($title->note->plainText) ? $title->note->plainText : '';
                        $titles[] = array(
                            'titleId' => str_replace('tt', '', $titleId),
                            'titleName' => $titleName,
                            'titleNote' => trim($titleNote, " ()")
                        );
                    }
                }
jianglin8-hub commented 2 months ago

I'm not sure i understand what you exactly mean?

Do you want to add image url to this section of award()

                //credited titles
                $titles = array();
                if ($edge->node->awardedEntities->secondaryAwardTitles !== null) {
                    foreach ($edge->node->awardedEntities->secondaryAwardTitles as $title) {
                        $titleName = isset($title->title->titleText->text) ? $title->title->titleText->text : '';
                        $titleId = isset($title->title->id) ? $title->title->id : '';
                        $titleNote = isset($title->note->plainText) ? $title->note->plainText : '';
                        $titles[] = array(
                            'titleId' => str_replace('tt', '', $titleId),
                            'titleName' => $titleName,
                            'titleNote' => trim($titleNote, " ()")
                        );
                    }
                }

Yes, I need a photo of the imdb ID

duck7000 commented 2 months ago

Okay i'll see what i can come up with Do you want the full image url or a thumbnail? If thumbnail what size you prefer?

jianglin8-hub commented 2 months ago

Okay i'll see what i can come up with Do you want the full image url or a thumbnail? If thumbnail what size you prefer?

Well, can we add them all?

duck7000 commented 2 months ago

No, impossible imdb works with parameters in the url so you can get thumbnail in any size or the full image url The full image url is the easiest (and largest!), you can use it to get the image and resize it yourself if you want.

For display purpose thumbnail would be sufficient i guess

jianglin8-hub commented 2 months ago

No, impossible imdb works with parameters in the url so you can get thumbnail in any size or the full image url The full image url is the easiest (and largest!), you can use it to get the image and resize it yourself if you want.

For display purpose thumbnail would be sufficient i guess

It's also possible, at least there are pictures available

duck7000 commented 2 months ago

you asked to get all versions... no that is not possible as this would be thousands possibility's

So again if you want thumbnail what size? Or a full image url Or both a thumbnail and full image

Edit: sorry i didn't understand what you mean at first but you want both, full and thumb image url. I settled thumbnail size the same as thumbnail in Title class. I'll upload the changes soon

duck7000 commented 2 months ago

This is added in the latest commit version

jianglin8-hub commented 2 months ago

salary pubprints pubmovies creditKnownFor credit

Can these also be added?

duck7000 commented 2 months ago

I don't understand what you are asking as all those methods are already there?

duck7000 commented 2 months ago

Salary, pubprints and pubmovies don't have images (if that is what you mean) credit and creditknownfor do have images, i'll look in to that (if that is what you mean)

You need to be more specific when asking something, this is way too short to understand what you are exactly asking

jianglin8-hub commented 2 months ago

Salary, pubprints and pubmovies don't have images (if that is what you mean) credit and creditknownfor do have images, i'll look in to that (if that is what you mean)

You need to be more specific when asking something, this is way too short to understand what you are exactly asking

Same as award, add the picture

duck7000 commented 2 months ago

Okay i understand but you still don't listen to what i said.

Again: salary, pubprint and pubmovies DON'T have images. (Unless you can proof otherwise?) So i can only add credit and creditkownfor, i'll see what i can do

jianglin8-hub commented 2 months ago

salary

image

I'm not sure which methods have cover pages. I saw a query for title in salary, so I guess that has a cover page as well.

duck7000 commented 2 months ago

salary

image

I'm not sure which methods have cover pages. I saw a query for title in salary, so I guess that has a cover page as well.

Ah now i understand why you come up with salary but no not every method that has title in their query has images.

So i will add images to credit and creditknowfor as i know for sure that those methods do have images

jianglin8-hub commented 2 months ago

salary

image

I'm not sure which methods have cover pages. I saw a query for title in salary, so I guess that has a cover page as well.

Ah now i understand why you come up with salary but no not every method that has title in their query has images.

So i will add images to credit and creditknowfor as i know for sure that those methods do have images

Thanks!

duck7000 commented 2 months ago

credit and creditKnownFor images are now added in latest git commit

jianglin8-hub commented 1 month ago

The salary method should also have a primaryImage For example: https://www.imdb.com/name/nm0005562/bio/


The pubmovies method should also have a primaryImage For example: https://www.imdb.com/name/nm0634240/publicity/

Film Biography: The Director's Notebook (2007)

duck7000 commented 1 month ago

Well salary and pubmovies technically don't have images (imdb don't list them) but the url to the title technically does have a primaryImage.

I think that the images don't add anything to those methods? For example salary is about what the actor is earning for this title not for the title itself. So i think this is going too far beyond what the method is about.

credit and creditKnownFor do list the images so they add something

jianglin8-hub commented 1 month ago

Well salary and pubmovies technically don't have images (imdb don't list them) but the url to the title technically does have a primaryImage.

I think that the images don't add anything to those methods? For example salary is about what the actor is earning for this title not for the title itself. So i think this is going too far beyond what the method is about.

credit and creditKnownFor do list the images so they add something

Maybe the data that is related is a movie, um. It doesn't seem necessary, let's put it aside for now.

Thank you.

duck7000 commented 1 month ago

Thanks for understanding my decision