Skip to content

Commit

Permalink
Added useragent to properly identify plugin with the backend.
Browse files Browse the repository at this point in the history
  • Loading branch information
elgatito committed Mar 24, 2021
1 parent 6f3d631 commit e3073b4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion resources/site-packages/elementum/navigation.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,9 @@ def run(url_suffix="", retry=0):
preload_timeout = 1

socket.setdefaulttimeout(buffer_timeout)
urllib_request.install_opener(urllib_request.build_opener(NoRedirectHandler()))
opener = urllib_request.build_opener(NoRedirectHandler())
opener.addheaders = [('User-Agent', ADDON_ID)]
urllib_request.install_opener(opener)

# Pause currently playing Elementum file to avoid doubling requests
try:
Expand Down

0 comments on commit e3073b4

Please sign in to comment.