I have seen the raw Json data of now playing movies and I have used Retrofit library to parse the data and I want to display the image also but when I am pasting the link of poster path in the browser it is not returning any image so I just want to know that if I write the code for fetching the image using glide library will it give me the image or not.
Δεν μπορείτε να βρείτε κάποια ταινία ή σειρά; Συνδεθείτε για να τη δημιουργήσετε.
Θέλετε να αξιολογήσετε ή να προσθέσετε αυτό το στοιχείο σε μια λίστα;
Δεν είσαι μέλος;
Απάντηση από τον/την Prithu
στις 22 Απρίλιος 2017 στις 09:59 ΜΜ
The Link to the image is made up of three parts : 1. base_url 2. file_size and 3. poster_path. The API returns the last part only that looks something like this - /iNpz2DgTsTMPaDRZq2tnbqjL2vF.jpg
base_url and a list of sizes available can be fetched using the configuration method. But this does not change that often so you can use
https://image.tmdb.org/t/p/
for base_url and any one of these sizes for file_size:But it is recommended by the developer to cache this data and check for updates every now and then.
combining the base_url, file_size and poster_path you will get the complete URL for the poster. Like this https://image.tmdb.org/t/p/w640/iNpz2DgTsTMPaDRZq2tnbqjL2vF.jpg
Another little thing - There is another size, w640 that works for posters as well but it is not mentioned in the configuration API, So Travis will have to confirm with this one.
Hope that helps
Απάντηση από τον/την Travis Bell
στις 23 Απρίλιος 2017 στις 11:24 ΕΊΜΑΙ
Hey @Prithu Only because I've seen you answer this question twice, we have some documentation around this you can link to that might help.
This article can be helpful to share. Usually, I'll also link to this one about image languages because it can be helpful to people as well.
Απάντηση από τον/την Prithu
στις 23 Απρίλιος 2017 στις 01:40 ΜΜ
Will do. Thanks !
Απάντηση από τον/την bit_coder
στις 25 Απρίλιος 2017 στις 01:12 ΜΜ
Thanks It worked