The Movie Database 지원

https://api.themoviedb.org/4/list/118015?page=2&api_key=[your_key]&sort_by=release_date.desc

That's just one example but seems all my lists the sort_by=release_date.asc works but sort_by=release_date.desc does not. In the example I gave it gets progressively worse. Pay attention to the end of page1...then flip to page2 and it's grossly off. The apis order does not match the web site, which seems to sort it fine. 118015

5 댓글 (1 / 1)

Jump to last post

Hi @Ken62465,

Sorting by release_date.desc without a region filter, will use the earliest date added to a movie. So just as an example, if you look at the second item in your list, Raging Fire, you can see there is a date added for 2021-07-30. But, if you update your query to:

https://api.themoviedb.org/4/list/118015?page=1&api_key=###&sort_by=release_date.desc&region=US

You'll see the returned date as 2021-08-13 which is more accurate. Keep in mind though, I am only using US as an example and not every movie will have a US release date, so in those cases the filter will still fallback to the earliest available.

I had no idea it allowed a region query param. It was not listed here https://developers.themoviedb.org/4/list/get-list nor can you add the param. I didn't think to try that param in a browser but should of been obvious to me I guess.

So I just tested that. Still a no go as it now drops 9 titles and a few are still out of order, but close enough to live with I guess. The dropped 9 titles I can't live with so I'm stuck with using .asc sort for now. Did you notice the 9 dropped titles using the &region=US? Should return 32 total items like the web site shows, which sorts .desc fine there. If you compare how sort_by=release_date.asc works it's fine there in the json response also. Wonder if this is related to that same issue I had with lists dropping titles on me a year ago..like you remember talking to me back then..lol. You fixed the problem though, this just looks strangely familiar to that.

Thanks for looking into this Travis..appreciate all you do!!!!

https://api.themoviedb.org/4/list/118015?page=1&api_key=###&sort_by=primary_release_date.desc

This did the trick. It sorted exactly as the web site does and region was not required.

Can I change API information details because by mistake I have selected app instead of website

@savithaparmar said:
Can I change API information details because by mistake I have selected app instead of website

Your question has been answered here.
https://www.themoviedb.org/talk/610f7edb960cde0072c1ff65

찾으시는 영화나 TV 프로그램이 없나요? 로그인 하셔서 직접 만들어주세요.

전체

s 검색 바 띄우기
p 프로필 메뉴 열기
esc 열린 창 닫기
? 키보드 단축키 창 열기

미디어 페이지

b 돌아가기
e 편집 페이지로 이동

TV 시즌 페이지

(우 화살표) 다음 시즌으로 가기
(좌 화살표) 이전 시즌으로 가기

TV 에피소드 페이지

(우 화살표) 다음 에피소드로 가기
(좌 화살표) 이전 에피소드로 가기

모든 이미지 페이지

a 이미지 추가 창 열기

모든 편집 페이지

t 번역 선택 열기
ctrl+ s 항목 저장

토론 페이지

n 새 토론 만들기
w 보기 상태
p 공개/비공개 전환
c 열기/닫기 전환
a 활동 열기
r 댓글에 글쓰기
l 마지막 댓글로 가기
ctrl+ enter 회원님의 메세지 제출
(우 화살표) 다음 페이지
(좌 화살표) 이전 페이지

설정

Want to rate or add this item to a list?

로그인