Skip to content

Commit

Permalink
Merge branch 'develop' into plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
miigotu committed Jun 1, 2023
2 parents 5c69e68 + 86f2fce commit 490f601
Show file tree
Hide file tree
Showing 30 changed files with 1,940 additions and 1,309 deletions.
5 changes: 4 additions & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
### Before submitting your issue:
## Notice:
The issue tracker, wiki,and discussions tab on GitHub is going to be archived/disabled in the near future for SickChill. All issues, discussions, support, guides, feature requests, and communication will be handled on [discord](https://discord.gg/FXre9qkHwE). Please consider raising your issue there instead.

## Before submitting your issue:

Enable debug logging in SickChill settings, reproduce the error (be sure to disable after the bug is fixed)

Expand Down
54 changes: 17 additions & 37 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
cancel-in-progress: false

env:
SLEEP: 60
Expand All @@ -33,7 +33,7 @@ defaults:

jobs:
Environment:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
outputs:
docker_tags: ${{ steps.docker.outputs.tags }}
docker_labels: ${{ steps.docker.outputs.labels }}
Expand Down Expand Up @@ -81,34 +81,18 @@ jobs:
Test:
strategy:
matrix:
os: [ubuntu-22.04]
python-version: [3.7, 3.8, 3.9, "3.10"]
os: [ubuntu-latest]
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
experimental: [false]
include:
-
os: ubuntu-22.04
python-version: "3.11.0-rc.2"
experimental: true
-
os: windows-latest
python-version: "3.10"
experimental: true
python-version: "3.11"
experimental: false
-
os: macos-latest
python-version: "3.10"
experimental: true
-
os: ubuntu-22.04
python-version: "pypy3.9-v7.3.8"
experimental: true
-
os: ubuntu-22.04
python-version: "pypy3.8-v7.3.9"
experimental: true
-
os: ubuntu-22.04
python-version: "pypy3.7-v7.3.9"
experimental: true
python-version: "3.11"
experimental: false
fail-fast: true
continue-on-error: ${{ matrix.experimental }}
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -155,32 +139,28 @@ jobs:
name: Install yarn
run: npm install -g yarn
-
name: Update pip
name: Install python dependency tools
run: |
curl -sSL https://bootstrap.pypa.io/get-pip.py -o get-pip.py
poetry run python get-pip.py
rm get-pip.py
poetry run pip install --upgrade setuptools wheel
poetry run pip install --upgrade pytest-github-actions-annotate-failures
-
name: Output poetry info
name: Output tooling environment information
run: |
which poetry
poetry env info
python -V
echo -e "$(poetry --version --ansi) is at $(which poetry)\n$(poetry env info --ansi)\n\v$(poetry --ansi run pip -V)"
-
name: Install dependencies
name: Install sickchill
run: |
poetry run pip install --upgrade setuptools wheel
poetry install --no-interaction --with dev --with speedups
-
if: success() && startsWith(runner.os, 'Linux') && matrix.python-version == '3.10'
if: success() && startsWith(runner.os, 'Linux') && matrix.python-version == '3.11'
name: Run yarn
run: poetry run poe yarn
-
if: success() && startsWith(runner.os, 'Linux') && matrix.python-version == '3.10'
if: success() && startsWith(runner.os, 'Linux') && matrix.python-version == '3.11'
name: Lint Python
run: poetry run poe lint
-
if: success() && startsWith(runner.os, 'Linux') && matrix.python-version == '3.10'
if: success() && startsWith(runner.os, 'Linux') && matrix.python-version == '3.11'
name: Lint and test Javascript
run: poetry run poe yarn test
-
Expand Down
67 changes: 34 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,31 @@
SickChill [![Build Status](https://github.com/SickChill/SickChill/actions/workflows/pythonpackage.yml/badge.svg)](https://github.com/SickChill/SickChill/actions/workflows/pythonpackage.yml?query=branch%3Amaster) [![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo) [![Donate](https://img.shields.io/badge/donations-appreciated-green.svg)](https://github.com/SickChill/SickChill/wiki/Donations)
====================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
# SickChill

Huge thanks to JetBrains for providing "All Products Pack" licenses free of charge for SickChill developers as part of their support of OSS.
[https://jb.gg/OpenSourceSupport](https://jb.gg/OpenSourceSupport)
---

### Important Notice*
Issue/Bug tracking, feature requests, support, and developer communication is moving strictly to [discord](https://discord.gg/FXre9qkHwE) - please start making the habit to go there, rather than creating issues on GitHub. After a period of time GitHub issue tracker, discussions, and other social features will be disabled on GitHub.

Automatic Video Library Manager for TV Shows. It watches for new episodes of your favorite shows, and when they are posted it does its magic.
---
[![Language](https://img.shields.io/github/languages/top/sickchill/sickchill?logo=python&style=plastic)](https://python.org)
[![Build Status](https://img.shields.io/github/actions/workflow/status/sickchill/sickchill/pythonpackage.yml?logo=github&style=plastic)](https://github.com/SickChill/SickChill/actions/workflows/pythonpackage.yml?query=branch%3Amaster)
[![Release Date](https://img.shields.io/github/release-date/sickchill/sickchill?logo=github&style=plastic)](https://github.com/SickChill/sickchill/releases)
[![Last Commit](https://img.shields.io/github/last-commit/sickchill/sickchill?logo=github&style=plastic)](https://github.com/SickChill/sickchill/commits/master)
[![Commits Since](https://img.shields.io/github/commits-since/sickchill/sickchill/latest/develop?logo=github&sort=date&style=plastic)](https://github.com/SickChill/sickchill/commits/master)
[![Discord](https://img.shields.io/discord/502612977271439372?label=Discord&logo=discord&style=plastic)](https://discord.gg/FXre9qkHwE)
[![Donate](https://img.shields.io/badge/$_donations-needed-green.svg?style=plastic)](https://github.com/SickChill/SickChill/wiki/Donations)

#### Features
---

### Automatic Video Library Manager for TV Shows. It watches for new episodes of your favorite shows, and when they are posted it does its magic.

### Features
- Kodi/XBMC library updates, poster/banner/fanart downloads, and NFO/TBN generation
- Configurable automatic episode renaming, sorting, and other processing
- Easily see what episodes you're missing, are airing soon, and more
- Automatic torrent/nzb searching, downloading, and processing at the qualities you want
- Largest list of supported torrent and nzb providers, both public and private
- Automatic torrent/nzb searching, sending to your client, and processing at the qualities you want
- Largest list of supported torrent, newznab, and torznab providers - both public and private
- Can notify Kodi, XBMC, Growl, Trakt, Twitter, and more when new episodes are available
- Searches TheTVDB.com and AniDB.net for shows, seasons, episodes, and metadata
- Searches [TheTVDB](https://thetvdb.com), [AniDB.net](https://anidb.net), [iMDB](https://imdb.com), [FanArt.tv](https://fanart.tv), and more for shows, seasons, episodes, and metadata
- Episode status management allows for mass failing seasons/episodes to force retrying
- DVD Order numbering for returning the results in DVD order instead of Air-By-Date order
- Allows you to choose which indexer to have SickChill search its show info from when importing
Expand All @@ -27,36 +38,26 @@ Automatic Video Library Manager for TV Shows. It watches for new episodes of you
- Real SSL certificate validation
- Supports Anime shows

#### Installation/Setup

Visit the [Installation & Configuration guides page](https://github.com/SickChill/SickChill/wiki/Installation-&-Configuration-Guides) on our wiki

#### Dependencies

To run SickChill you will need Python 3.7+, preferably 3.10 or newer.

PyPy (python 3.7-3.9) 7.8.x+ is also supported.

#### More info

### Important Links
* [Installation & Configuration](https://github.com/SickChill/SickChill/wiki/Installation-&-Configuration-Guides)
* [Wiki](https://github.com/SickChill/SickChill/wiki)

* [FAQ](https://github.com/SickChill/SickChill/wiki/FAQ%27s-and-Fixes)
* [Issue Tracker](https://discord.gg/FXre9qkHwE)
* [Feature Requests](https://discord.gg/FXre9qkHwE)
* [Supported providers](https://github.com/SickChill/SickChill/wiki/SickChill-Search-Providers)
* [News](https://github.com/SickChill/sickchill.github.io/blob/master/sickchill-news/news.md)
* [Changelog](https://github.com/SickChill/sickchill.github.io/blob/master/sickchill-news/CHANGES.md)
* [Network Timezones](https://github.com/SickChill/sickchill.github.io/tree/master/sb_network_timezones)
* [Scene Exceptions](https://github.com/SickChill/sickchill.github.io/tree/master/scene_exceptions)

* [Issue Tracker](https://github.com/SickChill/SickChill/issues)
### Dependencies

#### Important notes on switching from other forks
To run SickChill you will need Python 3.8+, preferably 3.11 or newer. PyPy (python 3.7-3.9) 7.8.x+ is also supported.

Before using this with your existing database (`sickbeard.db`) please make a backup copy of it and delete any other database files such as cache.db and failed.db if present.
### Important notes on switching from other forks

Before using this with your existing database (`sickbeard.db`) please make a backup copy of it and delete any other database files such as cache.db and failed.db if present.
We HIGHLY recommend starting out with no database files at all to make this a fresh start but the choice is at your own risk.

#### Supported providers

A full list can be found here: [Link](https://github.com/SickChill/SickChill/wiki/SickChill-Search-Providers)

#### News and Changelog
[news.md and CHANGES.md have moved to a separate repo, click here](https://github.com/SickChill/SickChill.github.io)


### Huge thanks to [JetBrains](https://jb.gg/OpenSourceSupport) for providing "All Products Pack" licenses free of charge for SickChill developers as part of their support of OSS.
<a href="https://jb.gg/OpenSourceSupport"><img src="https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.svg" width="60" height="60"><img src="https://resources.jetbrains.com/storage/products/company/brand/logos/jb_square.svg" width="60" height="60"><img src="https://resources.jetbrains.com/storage/products/company/brand/logos/PyCharm_icon.svg" width="60" height="60"><img src="https://resources.jetbrains.com/storage/products/company/brand/logos/IntelliJ_IDEA_icon.svg" width="60" height="60"></a>
1 change: 1 addition & 0 deletions frontend/templates/js/show.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import 'bootstrap/dist/css/bootstrap.min.css';
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@
"eslint-plugin-no-use-extend-native": "^0.5.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-unicorn": "^46.0.0",
"eslint-plugin-unicorn": "^47.0.0",
"esm": "^3.2.25",
"grunt": "^1.5.2",
"grunt-bower-concat": "git+https://github.com/miigotu/grunt-bower-concat.git",
"grunt-bower-task": "^0.6.1",
"grunt-cli": "^1.2.0",
"grunt-contrib-clean": "^2.0.0",
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-cssmin": "^4.0.0",
"grunt-contrib-cssmin": "^5.0.0",
"grunt-contrib-jshint": "^3.2.0",
"grunt-contrib-sass": "^2.0.0",
"grunt-contrib-uglify": "^5.0.1",
Expand All @@ -59,19 +59,19 @@
"jquery": "^3.2.1",
"load-grunt-tasks": "^5.1.0",
"lodash": "^4.17.15",
"mem-fs": "^2.2.1",
"mem-fs-editor": "^9.5.0",
"mem-fs": "^3.0.0",
"mem-fs-editor": "^10.0.2",
"mini-css-extract-plugin": "^2.6.1",
"sass": "^1.55.0",
"sass-loader": "^13.1.0",
"snyk": "^1.1043.0",
"snyk": "^1.1163.0",
"style-loader": "^3.3.1",
"toml": "^3.0.0",
"webpack": "^5.74.0",
"webpack": "^5.76.0",
"webpack-cli": "^5.0.0",
"webpack-dev-server": "^4.11.1",
"workbox-webpack-plugin": "^6.5.4",
"xo": "^0.53.1",
"xo": "^0.54.2",
"yarn-minify": "^1.0.1"
},
"ava": {
Expand Down
10 changes: 4 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "sickchill"
version = "2023.1.2"
version = "2023.5.30"
description = 'Automatic Video Library Manager for TV Shows'
license = "GPL-3.0-or-later"

Expand Down Expand Up @@ -67,15 +67,13 @@ pytest-isort = "^3.0.0"
flake8-pytest-style = "^1.5.1"
flake8-commas = "^2.0.0"
flake8-quotes = "^3.3.0"
flake8-bandit = "^2.1.2"
flake8-docstrings = "^1.6.0"
flake9 = "^3.8.3"
codecov = "^2.1.12"
pytest = "^7.0.1"
isort = "^5.10.1"
poethepoet = ">=0.16,<0.20"
po2json = "^0.2.2"
bandit = "<=1.7.2"
pre-commit = "^2.20.0"

[tool.poetry.group.speedups]
Expand All @@ -97,7 +95,7 @@ types-python-dateutil = "^2.8.19"
types-python-slugify = ">=6.1,<9.0"
types-requests = "^2.28.11"
types-chardet = "^5.0.4"
types-pytz = "^2022.2.1.0"
types-pytz = ">=2022.2.1,<2024.0.0"
types-setuptools = ">=65.3,<68.0"
types-six = "^1.16.20"

Expand Down Expand Up @@ -258,9 +256,8 @@ pybabel update
[tool.poetry.dependencies]
python = ">=3.7.2,<4"
"bencode.py" = "^4.0.0"
CacheControl = "^0.12.6"
configobj = "^5.0.6"
greenlet = {version = ">=1.1.2", allow-prereleases = true}
greenlet = {version = ">=2.0.0", allow-prereleases = true}
ipaddress = "^1.0.23"
jsonrpclib-pelix = "^0.4.2"
Mako = "^1.1.4"
Expand Down Expand Up @@ -304,3 +301,4 @@ beekeeper-alt = ">=2022.9.3"
# stevedore dropped support for python 3.7
stevedore = {version = "<=3.5.0", python = "<3.8"}
importlib-metadata = {version = "<5.0.0", python = "<3.8"}
cacheyou = "^23.2"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sickchill/gui/slick/images/network/imdb tv.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sickchill/gui/slick/images/network/rte two.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion sickchill/gui/slick/js/ajaxEpSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ function updateImages(data) {
function checkManualSearches() {
let pollInterval = 5000;
const showId = $('#showID').val();
const url = showId !== undefined ? searchStatusUrl + '?show=' + showId : searchStatusUrl; // eslint-disable-line no-negated-condition
const url = showId ? searchStatusUrl + '?show=' + showId : searchStatusUrl;
$.ajax({
url,
success(data) {
Expand Down
2 changes: 1 addition & 1 deletion sickchill/gui/slick/js/configProviders.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ $(document).ready(function () {
url = 'http://' + url;
}

if (url.match('/$') === null) {
if (url.match('/$') === null && url.match(/morethantv/i) === null) {
url += '/';
}

Expand Down
4 changes: 2 additions & 2 deletions sickchill/gui/slick/views/config_notifications.mako
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,7 @@
</div>
<div class="row">
<div class="col-md-12">
<label><b>${_('note')}:</b>&nbsp;${_('requires SickChill to be running on your Synology NAS.')}</label>
<label><b>${_('note')}:</b>&nbsp;${_('requires SickChill to be running on your Synology NAS (DSM 6 only).')}</label>
</div>
</div>
</div>
Expand Down Expand Up @@ -3404,7 +3404,7 @@
<input type="text" name="discord_name" id="discord_name" value="${settings.DISCORD_NAME}" class="form-control input-sm input350" autocapitalize="off" />
</div>
<div class="col-md-12">
<label for="discord_name">${_('Blank will use webhook default Name.')}</label>
<label for="discord_name">${_('Must use Bot Name. Blank no longer valid and will fail')}</label>
</div>
</div>
</div>
Expand Down
3 changes: 0 additions & 3 deletions sickchill/gui/slick/views/layouts/main.mako
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,7 @@
</a>
<ul class="dropdown-menu">
<li><a href="${static_url("news/", include_version=False)}"><i class="fa fa-fw fa-newspaper-o"></i>&nbsp;${_('News')}${newsBadge}</a></li>
<li><a href="${static_url("IRC/", include_version=False)}"><i class="fa fa-fw fa-hashtag"></i>&nbsp;${_('IRC')}</a></li>
<li><a href="https://discord.gg/U8WPBdf"><i class="fa fa-fw fa-discord-alt"></i>&nbsp;${_('Discord')}</a></li>
<li><a href="https://sickchill.slack.com"><i class="fa fa-fw fa-slack"></i>&nbsp;${_('Slack')}</a></li>
<li><a href="https://t.me/sickchill"><i class="fa fa-fw fa-telegram"></i>&nbsp;${_('Telegram')}</a></li>
<li><a href="${static_url("changes/", include_version=False)}"><i class="fa fa-fw fa-globe"></i>&nbsp;${_('Changelog')}</a></li>
<li><a href="https://github.com/SickChill/SickChill/wiki/Donations" rel="noreferrer" onclick="window.open('${settings.ANON_REDIRECT}' + this.href); return false;"><i class="fa fa-fw fa-life-ring"></i>&nbsp;${_('Support SickChill')}</a></li>
<li role="separator" class="divider"></li>
Expand Down
2 changes: 1 addition & 1 deletion sickchill/oldbeard/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import ifaddr
import requests
import urllib3.exceptions
from cachecontrol import CacheControl
from cacheyou import CacheControl
from tornado._locale_data import LOCALE_NAMES
from unidecode import unidecode
from urllib3 import disable_warnings
Expand Down
16 changes: 15 additions & 1 deletion sickchill/oldbeard/notifications_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ def __len__(self):
def add_item(self, message, notifier="discord", force_next=False):
added = False
item = None

if not settings.USE_DISCORD:
logger.debug("Notification for Discord not enabled, skipping this notification")
return added

with self.lock:
if self.queue and not force_next:
for index in range(0, len(self.queue)):
Expand Down Expand Up @@ -131,6 +136,14 @@ def _send_discord(self, webhook: str = None, name: str = None, avatar: str = Non
avatar_icon = avatar or settings.DISCORD_AVATAR_URL
discord_tts = bool(settings.DISCORD_TTS if tts is None else tts)

if not settings.USE_DISCORD:
logger.debug("Notification for Discord not enabled, skipping this notification")
return False

if not discord_name:
logger.warning("Discord Bot Name is Blank. Please enter Webhook dedicated Bot Name.")
return False

logger.info("Sending discord message: " + ", ".join(f["value"] for f in self.embed["fields"]))
logger.info("Sending discord message to url: " + discord_webhook)

Expand All @@ -145,6 +158,7 @@ def _send_discord(self, webhook: str = None, name: str = None, avatar: str = Non
return False
except requests.exceptions.RequestException as error:
if error.response.status_code != 429 or int(error.response.headers.get("X-RateLimit-Remaining")) != 0:
logger.exception(f"RequestException traceback: {traceback.format_exc()}")
raise error

logger.info("Discord rate limiting, retrying after {} seconds".format(error.response.headers.get("X-RateLimit-Reset-After")))
Expand All @@ -155,7 +169,7 @@ def _send_discord(self, webhook: str = None, name: str = None, avatar: str = Non
r.raise_for_status()
except Exception as error:
logger.exception(f"Error Sending Discord message: {error}")

logger.exception(f"Traceback: {traceback.format_exc()}")
return False

return True
Loading

0 comments on commit 490f601

Please sign in to comment.