Skip to content

Commit 892bdb6

Browse files
committed
Fix TMDB request failure on newer Python versions
1 parent 3b38774 commit 892bdb6

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

custom_components/plex_recently_added/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
"iot_class": "local_polling",
1010
"issue_tracker": "https://github.com/custom-components/sensor.plex_recently_added/issues",
1111
"requirements": [],
12-
"version": "0.6.1"
12+
"version": "0.6.2"
1313
}
1414

custom_components/plex_recently_added/tmdb_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ async def get_tmdb_trailer_url(hass, title, media_type):
1717

1818
title = re.sub(r'\s*\(.*?\)', '', title).strip()
1919

20-
async with aiohttp.ClientSession() as session:
20+
async with aiohttp.ClientSession(headers={"Accept-Encoding": "identity"}) as session:
2121
# Search for the movie or TV show
2222
search_url = TMDB_SEARCH_URL.format(media_type=media_type, api_key=TMDB_API_KEY, query=title)
2323
async with session.get(search_url) as response:

0 commit comments

Comments
 (0)