Skip to content

Commit 635e516

Browse files
authored
Feature: Add debug log if request is not paginated, but should (#125)
2 parents 106efeb + b266674 commit 635e516

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

trakt/api.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ def request(self, method, url, data=None, include_headers=False):
136136
response = self.session.request(method, url, headers=self.headers, auth=self.auth, timeout=self.timeout, data=json.dumps(data))
137137
self.logger.debug('RESPONSE [%s] (%s): %s', method, url, str(response))
138138
headers = response.headers.copy()
139+
if not include_headers and headers.get('X-Pagination-Page-Count', None):
140+
self.logger.debug("Result is paginated, but pagination not used: [%s] (%s)", method, url)
139141
if response.status_code == 204: # HTTP no content
140142
body = None
141143
else:

0 commit comments

Comments
 (0)