Skip to content

Commit

Permalink
Merge pull request #6772 from pymedusa/release/release-0.3.2
Browse files Browse the repository at this point in the history
Release 0.3.2
  • Loading branch information
medariox authored Jun 5, 2019
2 parents f46bfac + 954435c commit 6a21a60
Show file tree
Hide file tree
Showing 450 changed files with 47,858 additions and 11,622 deletions.
5 changes: 0 additions & 5 deletions .eslintignore

This file was deleted.

14 changes: 0 additions & 14 deletions .eslintrc

This file was deleted.

7 changes: 5 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,15 @@ If applicable, add screenshots to help explain your problem.
- OS: [e.g. ubuntu 14.04 x64]
- Branch: [e.g. master, develop]
- Commit: [e.g. c65ca2]
- Python version: [e.g. 3.6.8]
- Database version: [e.g. 44.12]

**Logs:**
**Debug logs (at least 50 lines):**
General > Advanced Settings > Enable debug
<details>

```
<-- Please replace this whole line with your logs -->
<-- Please replace this whole line with your debug logs -->
```
</details>

Expand Down
12 changes: 11 additions & 1 deletion .github/build-themes-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,24 @@ elif [[ $TRAVIS_BRANCH == "develop" ]]; then
build_mode="development"
fi

# Keep track of the current themes size.
size_before=$(du -sb themes/ | cut -f1)

# Build themes.
cd themes-default/slim/
[[ -n $build_cmd ]] && run_verbose "$build_cmd"
run_verbose "yarn gulp sync"
cd ../../

# Keep track of the new themes size.
size_after=$(du -sb themes/ | cut -f1)

echo "Themes size before: $size_before"
echo "Themes size after: $size_after"

# Check if the themes changed.
status="$(git status --porcelain -- themes/)";
if [[ -n $status ]]; then
if [[ -n $status && $size_before != $size_after ]]; then
if [[ -z $build_mode ]]; then
echo "Please build the themes"
echo "-----------------------"
Expand Down
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
script:
- ./.github/build-themes-check.sh
- cd $TRAVIS_BUILD_DIR/themes-default/slim
- yarn xo
- yarn lint
- yarn lint-css
- yarn test
- yarn coverage
Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:
script:
- yarn test-api
after_failure:
- cat ./dredd/data/Logs/application.log
- cat ./dredd/hook.log
# dredd tests (py3.6) start here
- name: 'Dredd tests (py3.6)'
python: '3.6'
Expand All @@ -81,7 +81,7 @@ jobs:
script:
- yarn test-api
after_failure:
- cat ./dredd/data/Logs/application.log
- cat ./dredd/hook.log
notifications:
slack:
secure: >-
Expand Down
1 change: 1 addition & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
unsafe-disable-integrity-migration false
--add.exact true
--upgrade.exact true
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
## 0.3.2 (2019-06-05)

#### New Features
- Added nCore torrent provider ([#6537](https://github.com/pymedusa/Medusa/pull/6537))
- Added Gimmepeers torrent provider (credits to @mystycs) ([#6635](https://github.com/pymedusa/Medusa/pull/6635))
- Added BTDB torrent provider ([#6678](https://github.com/pymedusa/Medusa/pull/6678))

#### Improvements
- Converted the sub-menu into a Vue SFC ([#6724](https://github.com/pymedusa/Medusa/pull/6724))
- Converted View Log page into a Vue SFC ([#6738](https://github.com/pymedusa/Medusa/pull/6738))
- Converted the Quality Chooser into a Vue SFC ([#6737](https://github.com/pymedusa/Medusa/pull/6737))

#### Fixes
- Fixed lists not being saved when used with comma separated items ([#6428](https://github.com/pymedusa/Medusa/pull/6428))
- Fixed extra scripts running with Python 3 ([#6428](https://github.com/pymedusa/Medusa/pull/6428))
- Fixed Torrenting provider exception when offline ([#6430](https://github.com/pymedusa/Medusa/pull/6430))
- Fixed not displaying quality preferred in show-header when configured ([#6455](https://github.com/pymedusa/Medusa/pull/6455))
- Fixed snatching of air by date shows specials ([#6457](https://github.com/pymedusa/Medusa/pull/6457))
- Fixed email notifier name parser warning for ABD episodes ([#6527](https://github.com/pymedusa/Medusa/pull/6527))
- Fixed download of multi episode releases without single results ([#6537](https://github.com/pymedusa/Medusa/pull/6537))
- Fixed "send to trash" option not doing anything (Python 3.6 and higher) ([#6625](https://github.com/pymedusa/Medusa/pull/6625))
- Fixed setting episodes to archived in backlog overview ([#6636](https://github.com/pymedusa/Medusa/pull/6636))
- Fixed exception in Elite-Tracker provider when no result is found ([#6680](https://github.com/pymedusa/Medusa/pull/6680))
- Fixed exception in API v2 when an incorrect API key was provided, or none was provided ([#6703](https://github.com/pymedusa/Medusa/pull/6703))
- Removed legacy log-censoring code for Newznab providers ([#6705](https://github.com/pymedusa/Medusa/pull/6705))
- Fixed DelugeD remove torrents when ratio is reached (Python 2.7) ([#6702](https://github.com/pymedusa/Medusa/pull/6702))
- Fixed home page slow down issue ([#6754](https://github.com/pymedusa/Medusa/pull/6754))

## 0.3.1 (2019-03-20)

#### Fixes
Expand Down
5 changes: 0 additions & 5 deletions SickBeard.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@
"""Script for backwards compatibility."""
from __future__ import unicode_literals

import sys

from medusa.__main__ import main

if __name__ == '__main__':
if sys.version_info.major == 3 and sys.version_info.minor < 5:
print('Medusa supports Python 2 from version 2.7.10 and Python 3 from version 3.5.0, exiting!')
raise Exception('Incorrect Python version. Shutting down!')
main()
3 changes: 2 additions & 1 deletion dredd/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
data
/data
/hook.log
12 changes: 9 additions & 3 deletions dredd/api-description.yml
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,9 @@ paths:
responses:
201:
description: Log message successfully created
x-request:
body-update:
thread: ''
x-expect:
no-body: true
400:
Expand Down Expand Up @@ -1072,7 +1075,7 @@ definitions:
items:
type: integer
format: int32
prefered:
preferred:
type: array
items:
type: integer
Expand Down Expand Up @@ -1472,6 +1475,10 @@ definitions:
logs:
type: object
properties:
debug:
type: boolean
dbDebug:
type: boolean
loggingLevels:
type: object
properties:
Expand Down Expand Up @@ -2559,8 +2566,7 @@ parameters:
type: string
enum:
- main
- statuses
- qualities
- consts
- metadata
- search
- notifiers
Expand Down
8 changes: 2 additions & 6 deletions dredd/dredd.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
dry-run: null
hookfiles: dredd/dredd_hook.py
language: python
sandbox: false
server: python dredd/dredd_hook.py
server-wait: 20
init: false
names: false
only: []
output: []
header: []
sorted: false
sorted: true
user: null
inline-errors: false
details: false
method: []
color: true
level: info
timestamp: false
silent: false
loglevel: warning
path: []
hooks-worker-timeout: 5000
hooks-worker-connect-timeout: 1500
Expand All @@ -27,6 +24,5 @@ hooks-worker-term-timeout: 5000
hooks-worker-term-retry: 500
hooks-worker-handler-host: localhost
hooks-worker-handler-port: 61321
config: dredd.yml
blueprint: dredd/api-description.yml
endpoint: 'http://localhost:8081'
52 changes: 42 additions & 10 deletions dredd/dredd_hook.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,31 @@
#!/usr/bin/env python
# coding=utf-8
"""Dredd hook."""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals

import io
import json
import os
import sys

sys.path.insert(1, os.path.abspath(os.path.join(os.path.dirname(__file__), '../ext')))
if sys.version_info[0] == 2:
sys.path.insert(1, os.path.abspath(os.path.join(os.path.dirname(__file__), '../ext2')))
try:
from builtins import print as real_print
except ImportError:
# Python 2
from __builtin__ import print as real_print

try:
from collections.abc import Mapping
except ImportError:
from collections import Mapping

current_dir = os.path.abspath(os.path.dirname(__file__))
root_dir = os.path.abspath(os.path.join(current_dir, '..'))
sys.path.insert(1, os.path.join(root_dir, 'ext'))
sys.path.insert(1, os.path.join(root_dir, 'ext%d' % sys.version_info.major))

from collections import Mapping
from configparser import ConfigParser

import dredd_hooks as hooks
Expand All @@ -31,6 +44,19 @@
'api-key': '1234567890ABCDEF1234567890ABCDEF',
}

hook_log = os.path.join(current_dir, 'hook.log')
try:
os.remove(hook_log)
except OSError:
pass


def print(*args, **kwargs):
"""Override builtin print to write to a file, because nothing prints to `stdout`."""
with io.open(hook_log, 'a', encoding='utf-8') as fh:
kwargs['file'] = fh
return real_print(*args, **kwargs)


@hooks.before_all
def load_api_description(transactions):
Expand Down Expand Up @@ -79,8 +105,18 @@ def configure_transaction(transaction):

request = response.get('x-request', {})
body = request.get('body')
body_update = request.get('body-update')
if body is not None:
transaction['request']['body'] = json.dumps(evaluate(body))
elif body_update is not None:
try:
orig_body = json.loads(transaction['request']['body'])
except ValueError:
orig_body = {}

# Use the current request body and update it with the new values
new_body = dict(orig_body, **evaluate(body_update))
transaction['request']['body'] = json.dumps(new_body)

path_params = request.get('path-params')
if path_params:
Expand Down Expand Up @@ -151,13 +187,9 @@ def evaluate(expression, context=None):

def start():
"""Start application."""
import os
import shutil
import sys

current_dir = os.path.dirname(__file__)
app_dir = os.path.abspath(os.path.join(current_dir, '..'))
data_dir = os.path.abspath(os.path.join(current_dir, 'data'))
data_dir = os.path.join(current_dir, 'data')
if os.path.isdir(data_dir):
shutil.rmtree(data_dir)
args = [
Expand All @@ -176,7 +208,7 @@ def start():
with io.open('config.ini', 'w', encoding='utf-8') as configfile:
config.write(configfile)

sys.path.insert(1, app_dir)
sys.path.insert(1, root_dir)

from medusa.__main__ import Application
application = Application()
Expand Down
Loading

0 comments on commit 6a21a60

Please sign in to comment.