Поддръжка на The Movie Database

I'm attempting to integrate the Discover Movie API into my project using the following URL:

url = "https://api.themoviedb.org/3/discover/movie?include_adult=true&include_video=false&language=en-US&page=1&sort_by=popularity.desc&vote_average.lte=7&with_genres=Comedy"

I've primarily applied two filters to ensure that the returned movies should have a minimum rating of "7" and belong to the genre "Comedy." However, the issue arises as the returned results do not align with the applied filters. Many of them have ratings below 7 and don't even belong to the comedy genre. Despite adjusting the filters to include or exclude certain genres, trying different minimum ratings, the API consistently returns the same set of results in the exact same order. This suggests that the filters are not having any impact on the outcome.

3 отговора (на страница 1 от общо 1)

Jump to last post

Hi @hamzah_2000,

Comedy is not a valid genre. You need to use the ID’s.

…&with_genres=35

Would be a correct query for comedies.

That works, thank you. However, as per the vote_average field, it has a range of: minimum: -3.402823669209385e+38 maximum: 3.402823669209385e+38

I do understand that this is meant to hold a large number (not numerically), however i fail to see how this is appropraite for a movie rating, how can a vote_average be below 0? why can't it be any higher than 3.4? what kind of input to this field would return valid results?

thank you

Hi @hamzah_2000,

That's just because of how floating point arithmetic works. 3.402823669209385e+38 is not 3.4, it's 3.402823669209385 x 1038, ie. a massive number. You can essentially ignore those.

The practical values on TMDB are going to be 0.0..10.0.

Не можете да откриете филм или сериал? Влезте, за да го създадете.

Глобални

s фокусиране на лентата за търсене
p отваряне на меню "Профил"
esc затваряне на отворен прозорец
? отваряне на прозореца за клавишните комбинации

На страниците за медиите

b връщане назад
e към страницата за редактиране

На страниците за сезони

(стрелка надясно) към следващ сезон
(стрелка наляво) към предишния сезон

На страниците за епизоди

(стрелка надясно) към следващ епизод
(стрелка наляво) предишен епизод

На всички страници за изображения

a отваряне на прозорец за добавяне на изображение

На всички страници за редактиране

t меню за избор на език, на превода
ctrl+ s изпращане на форма

На страниците за дискусия

n създаване на нова дискусия
w статус на наблюдаване
p публична/лична
c затваряне/отваряне
a отваряне на действия
r отговаряне в дискусия
l към последния отговор
ctrl+ enter изпращане на вашето съобщение
(стрелка надясно) следваща страница
(стрелка наляво) предишна страница

Настройки

Искате ли да го оцените или добавите към списък?

Вход