internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: pymedusa/Medusa

Issue:
API v2 link headers are doubling query params
A request to this was returning the link headers below.

```
Request URL: http://localhost:8081/api/v2/series?limit=25&page=1
Request Method: GET
Status Code: 304 Not Modified
Remote Address: 127.0.0.1:8081
Referrer Policy: no-referrer-when-downgrade
```

```
Link: </api/v2/series?limit=25&page=1&page=2&limit=25>; rel="next", </api/v2/series?limit=25&page=1&page=11&limit=25>; rel="last", </api/v2/series?limit=25&page=1&page=1&limit=25>; rel="first"
```
API v2 link headers are doubling query params
A request to this was returning the link headers below.

```
Request URL: http://localhost:8081/api/v2/series?limit=25&page=1
Request Method: GET
Status Code: 304 Not Modified
Remote Address: 127.0.0.1:8081
Referrer Policy: no-referrer-when-downgrade
```

```
Link: </api/v2/series?limit=25&page=1&page=2&limit=25>; rel="next", </api/v2/series?limit=25&page=1&page=11&limit=25>; rel="last", </api/v2/series?limit=25&page=1&page=1&limit=25>; rel="first"
```


Discussion:
This shouldn't be using uri as that also contains the query params.

https://github.com/pymedusa/Medusa/blob/d6eb72d4e1019e5d1286ae6ac1d7e4b318229ebe/medusa/server/api/v2/base.py#L277
This shouldn't be using uri as that also contains the query params.

https://github.com/pymedusa/Medusa/blob/d6eb72d4e1019e5d1286ae6ac1d7e4b318229ebe/medusa/server/api/v2/base.py#L277

Resolving patch:
diff --git a/medusa/server/api/v2/base.py b/medusa/server/api/v2/base.py
--- a/medusa/server/api/v2/base.py
+++ b/medusa/server/api/v2/base.py
@@ -21,6 +21,7 @@
 from six import string_types, text_type, viewitems
 
 from tornado.httpclient import HTTPError
+from tornado.httputil import url_concat
 from tornado.web import RequestHandler
 
 log = logging.getLogger(__name__)
@@ -272,15 +273,25 @@ def _paginate(self, data=None, data_generator=None, sort=None):
             if last_page <= arg_page:
                 last_page = None
 
+        # Reconstruct the query parameters
+        query_params = []
+        for arg, values in viewitems(self.request.query_arguments):
+            if arg in ('page', 'limit'):
+                continue
+            if not isinstance(values, list):
+                values = [values]
+            query_params += [(arg, value) for value in values]
+
+        bare_uri = url_concat(self.request.path, query_params)
+
         links = []
         for rel, page in (('next', next_page), ('last', last_page),
                           ('first', first_page), ('previous', previous_page)):
             if page is None:
                 continue
 
-            delimiter = '&' if self.request.query_arguments else '?'
-            link = '<{uri}{delimiter}page={page}&limit={limit}>; rel="{rel}"'.format(
-                uri=self.request.uri, delimiter=delimiter, page=page, limit=arg_limit, rel=rel)
+            uri = url_concat(bare_uri, dict(page=page, limit=arg_limit))
+            link = '<{uri}>; rel="{rel}"'.format(uri=uri, rel=rel)
             links.append(link)
 
         self.set_header('Link', ', '.join(links))


Test patch:
Repository: pymedusa/Medusa

Issue:
[APP SUBMITTED]: JSONDecodeError: Expecting value: line 1 column 1 (char 0)

### INFO
**Python Version**: `2.7.9 (default, Jun 29 2016, 13:08:31) [GCC 4.9.2]`
**Operating System**: `Linux-4.14.11-feral-x86_64-with-debian-8.10`
**Locale**: `UTF-8`
**Branch**: [master](../tree/master)
**Database**: `44.9`
**Commit**: pymedusa/Medusa@d6eb72d4e1019e5d1286ae6ac1d7e4b318229ebe
**Link to Log**: https://gist.github.com/122e4ed719471a1c9052d17cf239277e
### ERROR
<pre>
2018-03-17 09:52:59 ERROR    SEARCHQUEUE-FORCED-263365 :: [d6eb72d] Deluge: Failed Sending Torrent
Traceback (most recent call last):
  File "/media/sdq1/home/**********/.sickrage/medusa/clients/torrent/generic.py", line 256, in send_torrent
    r_code = self._add_torrent_file(result)
  File "/media/sdq1/home/**********/.sickrage/medusa/clients/torrent/deluge_client.py", line 247, in _add_torrent_file
    result.hash = self.response.json()['result']
  File "/media/sdq1/home/**********/.sickrage/ext/requests/models.py", line 892, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib/python2.7/dist-packages/simplejson/__init__.py", line 505, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/dist-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/lib/python2.7/dist-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators



Discussion:

Resolving patch:
diff --git a/medusa/clients/torrent/deluge_client.py b/medusa/clients/torrent/deluge_client.py
--- a/medusa/clients/torrent/deluge_client.py
+++ b/medusa/clients/torrent/deluge_client.py
@@ -226,11 +226,13 @@ def _add_torrent_uri(self, result):
             'id': 2,
         })
 
-        self._request(method='post', data=post_data)
+        if not self._request(method='post', data=post_data):
+            return False
 
-        result.hash = self.response.json()['result']
+        data = self.response.json()
+        result.hash = data['result']
 
-        return self.response.json()['result']
+        return data['result']
 
     def _add_torrent_file(self, result):
 
@@ -244,11 +246,13 @@ def _add_torrent_file(self, result):
             'id': 2,
         })
 
-        self._request(method='post', data=post_data)
+        if not self._request(method='post', data=post_data):
+            return False
 
-        result.hash = self.response.json()['result']
+        data = self.response.json()
+        result.hash = data['result']
 
-        return self.response.json()['result']
+        return data['result']
 
     def move_torrent(self, info_hash):
         """Set new torrent location given info_hash.


Test patch:
Repository: pymedusa/Medusa

Issue:
Possible to add and download WWE shows?
Other apps only used the TVDB which didn't give any new information for WWE/UFC stuff. TVMaze does however. Is it possible to do this? I added it successfully but get no results when trying to download or search manually.


Discussion:
What one you searching for? Monday Night Raw? Smackdown?


Best bet for now is testing release names, and hoping they get parsed correctly by guessit, through the daily search.

Beside that its a know issue that it's hard to search for them. We have some ideas to fix this, but the combination of it taking allot of effort with little gain. 
@ripper1967 Both of those would be great. I was ecstatic when it pulled all the info properly. The shows are on the NZBIndexers, so right now I use RSS. I have just had this dream for years of it being automatic.
Just tested for the first time in a while and I was able to get it work successfully. Only struggles now are on import with this error " Processing failed: Not enough information to determine what episode this is". But at least it will find and download the episodes now! Thanks!
Im working on a feature where you can configure your own search strings. You might wanna took a look at that branch. Ill have it working in a couple of weeks. 

Resolving patch:
diff --git a/medusa/post_processor.py b/medusa/post_processor.py
--- a/medusa/post_processor.py
+++ b/medusa/post_processor.py
@@ -666,7 +666,8 @@ def _analyze_name(self, name):
             self.log(u'{0}'.format(error), logger.DEBUG)
             return to_return
 
-        if parse_result.series and all([parse_result.series.air_by_date, parse_result.is_air_by_date]):
+        if parse_result.series and all([parse_result.series.air_by_date or parse_result.series.is_sports,
+                                        parse_result.is_air_by_date]):
             season = -1
             episodes = [parse_result.air_date]
         else:


Test patch:
Repository: pymedusa/Medusa

Issue:
HeBits provider failed to find HD torrents
When using 'html5lib' HeBits provider failed to find HD torrents (720p) for me.
Switching to with BS4Parser(data, 'html.parser') as html: fix the issue for me.

Please consider to switch to html.parser or fixing html5lib search.




Discussion:
Search was done for Krypton.S01E01

Resolving patch:
diff --git a/medusa/providers/torrent/html/hebits.py b/medusa/providers/torrent/html/hebits.py
--- a/medusa/providers/torrent/html/hebits.py
+++ b/medusa/providers/torrent/html/hebits.py
@@ -111,7 +111,7 @@ def parse(self, data, mode):
         """
         items = []
 
-        with BS4Parser(data, 'html5lib') as html:
+        with BS4Parser(data, 'html.parser') as html:
             torrent_table = html.find('div', class_='browse')
             torrent_rows = torrent_table('div', class_=re.compile('^line')) if torrent_table else []
 


Test patch:
Repository: pymedusa/Medusa

Issue:
Absolute number now append to season number
#Version 0.2.5

Hi, 
while refreshing files from an anime I saw that naming scheme changed. I usually rename only with absolute number, so I've checked my settings and something odd showed-up : 

<img width="366" alt="image" src="https://user-images.githubusercontent.com/8405448/41512033-d2f9d1d2-7282-11e8-969f-b2e3fcd72863.png">

Season number isn't replace by absolute number. At first I assumed that something went wrong because I use a custom pattern : "%SN - S%0SE%0E - [%QN] [%RG]". So I've tried with pre-selected pattern but still the same.

<img width="318" alt="image" src="https://user-images.githubusercontent.com/8405448/41512085-9660be10-7283-11e8-920f-631361e64bc8.png">

finally I've tried to check what would be the behaviour if I "preview rename" bad renamed files and it seems to be worst : 
<img width="496" alt="image" src="https://user-images.githubusercontent.com/8405448/41512128-471a47c6-7284-11e8-9a7f-619619befa12.png">


Absolute number now append to season number
#Version 0.2.5

Hi, 
while refreshing files from an anime I saw that naming scheme changed. I usually rename only with absolute number, so I've checked my settings and something odd showed-up : 

<img width="366" alt="image" src="https://user-images.githubusercontent.com/8405448/41512033-d2f9d1d2-7282-11e8-969f-b2e3fcd72863.png">

Season number isn't replace by absolute number. At first I assumed that something went wrong because I use a custom pattern : "%SN - S%0SE%0E - [%QN] [%RG]". So I've tried with pre-selected pattern but still the same.

<img width="318" alt="image" src="https://user-images.githubusercontent.com/8405448/41512085-9660be10-7283-11e8-920f-631361e64bc8.png">

finally I've tried to check what would be the behaviour if I "preview rename" bad renamed files and it seems to be worst : 
<img width="496" alt="image" src="https://user-images.githubusercontent.com/8405448/41512128-471a47c6-7284-11e8-9a7f-619619befa12.png">




Discussion:
For now you can drop the `S%0SE` from your custom naming format and it should work as expected.
`%SN - %0E - [%QN] [%RG]`

I'll look into fixing this.
For now you can drop the `S%0SE` from your custom naming format and it should work as expected.
`%SN - %0E - [%QN] [%RG]`

I'll look into fixing this.

Resolving patch:
diff --git a/medusa/tv/episode.py b/medusa/tv/episode.py
--- a/medusa/tv/episode.py
+++ b/medusa/tv/episode.py
@@ -1688,7 +1688,7 @@ def _format_pattern(self, pattern=None, multi=None, anime_type=None):
                             ep_string += '-' + '%(#)03d' % {'#': rel_ep.episode}
 
             regex_replacement = None
-            if anime_type == 2 and not ep_only_match:
+            if anime_type == 2 and regex_used != ep_only_regex:
                 regex_replacement = r'\g<pre_sep>' + ep_string + r'\g<post_sep>'
             elif season_ep_match:
                 regex_replacement = r'\g<pre_sep>\g<2>\g<3>' + ep_string + r'\g<post_sep>'


Test patch:
Repository: pymedusa/Medusa

Issue:
[APP SUBMITTED]: ValueError: max() arg is an empty sequence

### INFO
**Python Version**: `2.7.14 (default, May 28 2018, 14:47:18) [GCC 4.7.3 20130102 (prerelease)]`
**Operating System**: `Linux-3.10.102-x86_64-with-glibc2.2.5`
**Locale**: `UTF-8`
**Branch**: [master](../tree/master)
**Database**: `44.11`
**Commit**: pymedusa/Medusa@c65ca2607fae74405dcceaaf8c02f3d29d0313ea
**Link to Log**: https://gist.github.com/a956127914034e5a65e4a9ff026d988f
### ERROR
<pre>
2018-06-21 04:00:19 ERROR    SHOWUPDATER :: [c65ca26] Problem running show_updater, Indexer TVDBv2 seems to be having issues while trying to get updates for show The Exorcist. Cause: max() arg is an empty sequence.
Traceback (most recent call last):
  File "/volume1/@appstore/sickbeard-custom/var/<a href="../blob/c65ca2607fae74405dcceaaf8c02f3d29d0313ea/SickBeard/medusa/show_updater.py#L91">SickBeard/medusa/show_updater.py</a>", line 91, in run
    last_update, update_max_weeks
  File "/volume1/@appstore/sickbeard-custom/var/<a href="../blob/c65ca2607fae74405dcceaaf8c02f3d29d0313ea/SickBeard/medusa/indexers/tvdbv2/fallback.py#L136">SickBeard/medusa/indexers/tvdbv2/fallback.py</a>", line 136, in __call__
    return self.func(*args, **kwargs)
  File "/volume1/@appstore/sickbeard-custom/var/<a href="../blob/c65ca2607fae74405dcceaaf8c02f3d29d0313ea/SickBeard/medusa/indexers/tvdbv2/tvdbv2_api.py#L633">SickBeard/medusa/indexers/tvdbv2/tvdbv2_api.py</a>", line 633, in get_last_updated_series
    last_update_ts = max(x.last_updated for x in updates)
ValueError: max() arg is an empty sequence
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators



Discussion:

Resolving patch:
diff --git a/medusa/indexers/tvdbv2/tvdbv2_api.py b/medusa/indexers/tvdbv2/tvdbv2_api.py
--- a/medusa/indexers/tvdbv2/tvdbv2_api.py
+++ b/medusa/indexers/tvdbv2/tvdbv2_api.py
@@ -633,7 +633,7 @@ def get_last_updated_series(self, from_time, weeks=1, filter_show_list=None):
         try:
             while updates and count < weeks:
                 updates = self.config['session'].updates_api.updated_query_get(from_time).data
-                if updates is not None:
+                if updates:
                     last_update_ts = max(x.last_updated for x in updates)
                     from_time = last_update_ts
                     total_updates += [int(_.id) for _ in updates]


Test patch:
Repository: pymedusa/Medusa

Issue:
[APP SUBMITTED]: Error loading IMDb info: Indexer TMDB is unavailable at this time. Cause: 502 Server Error: Bad Gateway for url: https://api.themoviedb.org/3/configuration?api_key=**********

### INFO
**Python Version**: `2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit (AMD64)]`
**Operating System**: `Windows-10-10.0.17134`
**Locale**: `cp1252`
**Branch**: [master](../tree/master)
**Database**: `44.11`
**Commit**: pymedusa/Medusa@c65ca2607fae74405dcceaaf8c02f3d29d0313ea
**Link to Log**: https://gist.github.com/14d19864bde545816f2d2e865c0f88a4
### ERROR
<pre>
2018-07-01 22:15:23 ERROR    SHOWQUEUE-ADD :: [c65ca26] Error loading IMDb info: Indexer TMDB is unavailable at this time. Cause: 502 Server Error: Bad Gateway for url: https://api.themoviedb.org/3/configuration?api_key=**********
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators

[APP SUBMITTED]: Error loading IMDb info: Indexer TMDB is unavailable at this time. Cause: 502 Server Error: Bad Gateway for url: https://api.themoviedb.org/3/configuration?api_key=**********

### INFO
**Python Version**: `2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit (AMD64)]`
**Operating System**: `Windows-10-10.0.17134`
**Locale**: `cp1252`
**Branch**: [master](../tree/master)
**Database**: `44.11`
**Commit**: pymedusa/Medusa@c65ca2607fae74405dcceaaf8c02f3d29d0313ea
**Link to Log**: https://gist.github.com/14d19864bde545816f2d2e865c0f88a4
### ERROR
<pre>
2018-07-01 22:15:23 ERROR    SHOWQUEUE-ADD :: [c65ca26] Error loading IMDb info: Indexer TMDB is unavailable at this time. Cause: 502 Server Error: Bad Gateway for url: https://api.themoviedb.org/3/configuration?api_key=**********
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators



Discussion:

Resolving patch:
diff --git a/medusa/tv/series.py b/medusa/tv/series.py
--- a/medusa/tv/series.py
+++ b/medusa/tv/series.py
@@ -1523,7 +1523,13 @@ def load_imdb_info(self):
         tmdb_id = self.externals.get('tmdb_id')
         if tmdb_id:
             # Country codes and countries obtained from TMDB's API. Not IMDb info.
-            country_codes = Tmdb().get_show_country_codes(tmdb_id)
+            try:
+                country_codes = Tmdb().get_show_country_codes(tmdb_id)
+            except IndexerException as error:
+                log.info(u'Unable to get country codes from TMDB. Error: {error}',
+                         {'error': error})
+                country_codes = None
+
             if country_codes:
                 countries = (from_country_code_to_name(country) for country in country_codes)
                 self.imdb_info['countries'] = '|'.join([_f for _f in countries if _f])


Test patch:
Repository: pymedusa/Medusa

Issue:
[APP SUBMITTED]: KeyError: u'indexer'

### INFO
**Python Version**: `2.7.9 (default, Sep 17 2016, 20:26:04) [GCC 4.9.2]`
**Operating System**: `Linux-4.9.35-v7+-armv7l-with-debian-8.0`
**Locale**: `UTF-8`
**Branch**: [develop](../tree/develop)
**Database**: `44.11`
**Commit**: pymedusa/Medusa@49f4f98b30fb58340aef2a46104d94bd7b37ca66
**Link to Log**: https://gist.github.com/0739fafec855121ce03f822e97b94633
### ERROR
<pre>
2018-07-13 15:02:59 ERROR    Thread_5 :: [49f4f98] Exception generated: u'indexer'
Traceback (most recent call last):
  File "/home/pi/Medusa/<a href="../blob/49f4f98b30fb58340aef2a46104d94bd7b37ca66/medusa/server/web/core/base.py#L259">medusa/server/web/core/base.py</a>", line 259, in async_call
    result = function(**kwargs)
  File "/home/pi/Medusa/<a href="../blob/49f4f98b30fb58340aef2a46104d94bd7b37ca66/medusa/server/web/home/handler.py#L1768">medusa/server/web/home/handler.py</a>", line 1768, in deleteShow
    app.SHOWS_RECENT = [x for x in app.SHOWS_RECENT if x['indexer'] != series_obj.indexer and x['indexerid'] != series_obj.series_id]
KeyError: u'indexer'
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators



Discussion:
This happen while trying to remove this show: https://www.thetvdb.com/series/liang-sheng-can-we-not-be-laden-with-grief with ID 330661 

Resolving patch:
diff --git a/medusa/server/web/home/handler.py b/medusa/server/web/home/handler.py
--- a/medusa/server/web/home/handler.py
+++ b/medusa/server/web/home/handler.py
@@ -1765,7 +1765,7 @@ def deleteShow(self, indexername=None, seriesid=None, full=0):
             time.sleep(cpu_presets[app.CPU_PRESET])
 
         # Remove show from 'RECENT SHOWS' in 'Shows' menu
-        app.SHOWS_RECENT = [x for x in app.SHOWS_RECENT if x['indexer'] != series_obj.indexer and x['indexerid'] != series_obj.series_id]
+        app.SHOWS_RECENT = [show for show in app.SHOWS_RECENT if show['indexerName'] != series_obj.indexer_name and show['showId'] != series_obj.series_id]
 
         # Don't redirect to the default page, so the user can confirm that the show was deleted
         return self.redirect('/home/')


Test patch:
Repository: pymedusa/Medusa

Issue:
YGGTorrent : Unable to bdecode torrent
**Describe the bug**
The YggTorrent provider seems to have a bug. The downloads are not correctly handled to rtorrent. The "unable to bdecode torrent" occurs. Thank you for your help. 


**Medusa (please complete the following information):**

Branch: master 
Commit: e7c4ff3bc9a48b47c932b0e40a539d62e3a62f64 Version: v0.2.6 Database: 44.11
Python Version: | 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609]
SSL Version: | OpenSSL 1.0.2g 1 Mar 2016
OS: | Linux-4.12.14-041214-generic-x86_64-with-Ubuntu-16.04-xenial

**Logs:**
<details>

```
2018-07-23 12:45:32 WARNING  SEARCHQUEUE-FORCED-325517 :: [e7c4ff3] Unable to bdecode torrent. Invalid torrent: Salvation.S02E01.FASTSUB.VOSTFR.720p.AMZN.WEB-DL.DDP5.1.H.264-GOLD. Deleting cached result if exists
2018-07-23 12:45:32 INFO     SEARCHQUEUE-FORCED-325517 :: [e7c4ff3] Downloading Salvation.S02E01.FASTSUB.VOSTFR.720p.AMZN.WEB-DL.DDP5.1.H.264-GOLD with 36 seeders and 0 leechers and size 938.52 MB from Yggtorrent
2018-07-23 12:45:32 INFO     SEARCHQUEUE-FORCED-325517 :: [Yggtorrent] :: [e7c4ff3] Picked Salvation.S02E01.FASTSUB.VOSTFR.720p.AMZN.WEB-DL.DDP5.1.H.264-GOLD as the best result.
2018-07-23 12:45:32 INFO     SEARCHQUEUE-FORCED-325517 :: [Yggtorrent] :: [e7c4ff3] Quality of Salvation.S02E01.(FASTSUB.VOSTFR.720p.WEBRip.x265.NSP) is 720p WEB-DL
2018-07-23 12:45:32 INFO     SEARCHQUEUE-FORCED-325517 :: [Yggtorrent] :: [e7c4ff3] Quality of Salvation.S02E01.FASTSUB.VOSTFR.720p.HDTV.x264.-.ZKH is 720p HDTV
2018-07-23 12:45:32 INFO     SEARCHQUEUE-FORCED-325517 :: [Yggtorrent] :: [e7c4ff3] Quality of Salvation.S02E01.FASTSUB.VOSTFR.720p.AMZN.WEB-DL.DDP5.1.H.264-GOLD is 720p WEB-DL
2018-07-23 12:45:31 INFO     SEARCHQUEUE-FORCED-325517 :: [Yggtorrent] :: [e7c4ff3] Performing episode search for Salvation```
</details>




Discussion:

Resolving patch:
diff --git a/medusa/providers/torrent/html/yggtorrent.py b/medusa/providers/torrent/html/yggtorrent.py
--- a/medusa/providers/torrent/html/yggtorrent.py
+++ b/medusa/providers/torrent/html/yggtorrent.py
@@ -36,7 +36,7 @@ def __init__(self):
         self.password = None
 
         # URLs
-        self.url = 'https://ww1.yggtorrent.is'
+        self.url = 'https://ww2.yggtorrent.is'
         self.urls = {
             'login': urljoin(self.url, 'user/login'),
             'search': urljoin(self.url, 'engine/search'),


Test patch:
Repository: pymedusa/Medusa

Issue:
Abnormal Provider : Invalid username or password
**Describe the bug**
A search with the provider "Abnormal" returns an "invalid username of password" error even if they are correct. 


**Medusa (please complete the following information):**
 Branch: master 
Commit: e7c4ff3bc9a48b47c932b0e40a539d62e3a62f64 Version: v0.2.6 Database: 44.11
Python Version: | 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609]
SSL Version: | OpenSSL 1.0.2g 1 Mar 2016
OS: | Linux-4.12.14-041214-generic-x86_64-with-Ubuntu-16.04-xenial

**Logs:**
<details>

```
2018-07-23 12:45:31 WARNING  SEARCHQUEUE-FORCED-325517 :: [ABNormal] :: [e7c4ff3] Invalid username or password. Check your settings
2018-07-23 12:45:31 INFO     SEARCHQUEUE-FORCED-325517 :: [ABNormal] :: [e7c4ff3] Performing episode search for Salvation```
</details>



Discussion:

Resolving patch:
diff --git a/medusa/providers/torrent/html/abnormal.py b/medusa/providers/torrent/html/abnormal.py
--- a/medusa/providers/torrent/html/abnormal.py
+++ b/medusa/providers/torrent/html/abnormal.py
@@ -189,7 +189,7 @@ def login(self):
             log.warning('Unable to connect to provider')
             return False
 
-        if not re.search('torrents.php', response.text):
+        if "Votre nom d'utilisateur ou mot de passe est incorrect." in response.text:
             log.warning('Invalid username or password. Check your settings')
             return False
 


Test patch: