Commit 45fb67c0 authored by echel0n's avatar echel0n
Browse files

Merge branch 'release/10.0.47'

parents dd5b90f8 e49ae746
......@@ -2,8 +2,14 @@
 
All notable changes to this project will be documented in this file. Dates are displayed in UTC.
 
#### [10.0.47](https://git.sickrage.ca/SiCKRAGE/sickrage/compare/10.0.46...10.0.47)
- Refactored video files to be mime typed by built-in module mimetypes, no longer requires end-user to specify allowed video file extensions [`9f0903d`](https://git.sickrage.ca/SiCKRAGE/sickrage/commit/9f0903deafba49880b6003bacf8fc3f579070ea0)
#### [10.0.46](https://git.sickrage.ca/SiCKRAGE/sickrage/compare/10.0.45...10.0.46)
 
> 2 November 2021
#### [10.0.45](https://git.sickrage.ca/SiCKRAGE/sickrage/compare/10.0.44...10.0.45)
 
> 4 October 2021
......
{
"name": "sickrage",
"version": "10.0.46",
"version": "10.0.47",
"private": true,
"repository": {
"type": "git",
......
[bumpversion]
current_version = 10.0.46
current_version = 10.0.47
commit = False
tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<release>[a-z]+)(?P<dev>\d+))?
......
......@@ -19,7 +19,7 @@
# along with SiCKRAGE. If not, see <http://www.gnu.org/licenses/>.
# ##############################################################################
__version__ = "10.0.46"
__version__ = "10.0.47"
__install_type__ = ""
import argparse
......
This diff is collapsed.
......@@ -842,9 +842,25 @@ class Config(object):
default=self.general.calendar_unprotected, field_type=bool)
self.general.calendar_icons = self._get_config_file_value(config_object, 'General', 'calendar_icons', default=self.general.calendar_icons,
field_type=bool)
self.general.no_restart = self._get_config_file_value(config_object, 'General', 'no_restart', default=self.general.no_restart, field_type=bool)
self.general.no_restart = self._get_config_file_value(
config_object,
'General',
'no_restart',
default=self.general.no_restart,
field_type=bool
)
self.general.allowed_video_file_exts = ','.join(
self._get_config_file_value(config_object, 'General', 'allowed_video_file_exts', default=self.general.allowed_video_file_exts, field_type=list))
self._get_config_file_value(
config_object,
'General',
'allowed_video_file_exts',
default=self.general.allowed_video_file_exts.split(','),
field_type=list
)
)
self.general.extra_scripts = self._get_config_file_value(config_object, 'General', 'extra_scripts', default=self.general.extra_scripts, field_type=str)
self.general.display_all_seasons = self._get_config_file_value(config_object, 'General', 'display_all_seasons',
default=self.general.display_all_seasons, field_type=bool)
......
......@@ -26,6 +26,7 @@ import datetime
import glob
import hashlib
import ipaddress
import mimetypes
import os
import platform
import random
......@@ -60,6 +61,17 @@ from sickrage.core.enums import TorrentMethod
from sickrage.core.helpers import encryption
from sickrage.core.websession import WebSession
mimetypes.add_type('video/divx', '.divx')
mimetypes.add_type("video/x-flv", ".flv")
mimetypes.add_type("video/x-f4v", ".f4v")
mimetypes.add_type("video/x-dvd-iso", ".iso")
mimetypes.add_type("video/x-dvd-iso", ".img")
mimetypes.add_type("video/x-dvd-iso", ".nrg")
mimetypes.add_type("video/dvd", ".vob")
mimetypes.add_type("video/mpeg", ".wtv")
mimetypes.add_type("application/x-bittorrent", ".torrent")
mimetypes.add_type("application/x-nzb", ".nzb")
def safe_getattr(object, name, default=None):
try:
......@@ -154,7 +166,10 @@ def remove_extension(name):
if name and "." in name:
base_name, sep, extension = name.rpartition('.')
if base_name and extension.lower() in ['nzb', 'torrent'] + sickrage.app.config.general.allowed_video_file_exts.split(','):
mime_type = mimetypes.guess_type(name)[0]
is_video = True if mime_type is not None and mime_type.startswith('video') else False
if base_name and extension.lower() in ['nzb', 'torrent'] or is_video:
name = base_name
return name
......@@ -319,7 +334,8 @@ def is_media_file(filename):
if re.search('extras?$', sepFile[0], re.I):
return False
return sepFile[-1].lower() in sickrage.app.config.general.allowed_video_file_exts.split(',')
mime_type = mimetypes.guess_type(filename)[0]
return True if mime_type is not None and mime_type.startswith('video') else False
def is_rar_file(filename):
......
......@@ -81729,7 +81729,7 @@ var debugs = {};
var debugEnviron;
exports.debuglog = function(set) {
if (isUndefined(debugEnviron))
debugEnviron = Object({"SENTRY_DSN":'https://[email protected]/2',"PACKAGE_VERSION":"10.0.46"}).NODE_DEBUG || '';
debugEnviron = Object({"SENTRY_DSN":'https://[email protected]/2',"PACKAGE_VERSION":"10.0.47"}).NODE_DEBUG || '';
set = set.toUpperCase();
if (!debugs[set]) {
if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
......@@ -82538,7 +82538,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
 
Sentry.init({
dsn: 'https://[email protected]/2',
release: "10.0.46",
release: "10.0.47",
beforeSend: function beforeSend(event, hint) {
if (event.exception) {
event.exception.values[0].stacktrace.frames.forEach(function (frame) {
......@@ -87594,6 +87594,7 @@ $(document).ready(function ($) {
 
if (isDefault !== 'true') {
$('#editANewznabProvider').append($("<option></option>").attr("value", id).text(name));
$('#editANewznabProvider').val(id);
SICKRAGE.config.providers.populateNewznabSection();
}
 
......@@ -159,27 +159,7 @@
<!-- start div for editing providers //-->
% for providerID, providerObj in sickrage.app.search_providers.newznab().items():
<div class="providerDiv" id="${providerID}Div">
% if not providerObj.default:
<div class="form-row form-group">
<div class="col-lg-3 col-md-4 col-sm-5">
<label class="component-title">${_('URL:')}</label>
</div>
<div class="col-lg-9 col-md-8 col-sm-7 component-desc">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><span class="fas fa-globe"></span></span>
</div>
<input id="${providerID}_url"
value="${providerObj.urls['base_url']}"
title="Provider URL"
class="form-control"
autocapitalize="off" disabled/>
</div>
</div>
</div>
% endif
% if providerObj.private:
% if providerObj.private and providerObj.default:
<div class="form-row form-group">
<div class="col-lg-3 col-md-4 col-sm-5">
<label class="component-title">${_('API key:')}</label>
......@@ -192,7 +172,7 @@
<input id="${providerID}_api_key"
name="${providerID}_api_key"
value="${providerObj.api_key}"
newznab_name="${providerID}_api_key"
newznab_name="${providerID}"
class="newznab_key form-control"
title="Provider API key"
autocapitalize="off"/>
......@@ -218,7 +198,7 @@
% endif
% if hasattr(providerObj, 'enable_backlog'):
<div class="row field-pair${(' d-none', '')[providerObj.supports_backlog]}">
<div class="form-row form-group ${('d-none', '')[providerObj.supports_backlog]}">
<div class="col-lg-3 col-md-4 col-sm-5">
<label class="component-title">${_('Enable backlog searches')}</label>
</div>
......@@ -892,27 +872,27 @@
</div>
% endif
## % if hasattr(providerObj, 'cat') and providerID == 'tntvillage':
## <div class="form-row form-group">
## <div class="col-lg-3 col-md-4 col-sm-5">
## <label class="component-title">${_('Category:')}</label>
## </div>
## <div class="col-lg-9 col-md-8 col-sm-7 component-desc">
## <div class="input-group">
## <div class="input-group-prepend">
## <span class="input-group-text"><span class="fas fa-list"></span></span>
## </div>
## <select name="${providerID}_cat" id="${providerID}_cat"
## title="Provider category"
## class="form-control">
## % for i in providerObj.category_dict.keys():
## <option value="${providerObj.category_dict[i]}" ${('', 'selected')[providerObj.category_dict[i] == providerObj.cat]}>${i}</option>
## % endfor
## </select>
## </div>
## </div>
## </div>
## % endif
## % if hasattr(providerObj, 'cat') and providerID == 'tntvillage':
## <div class="form-row form-group">
## <div class="col-lg-3 col-md-4 col-sm-5">
## <label class="component-title">${_('Category:')}</label>
## </div>
## <div class="col-lg-9 col-md-8 col-sm-7 component-desc">
## <div class="input-group">
## <div class="input-group-prepend">
## <span class="input-group-text"><span class="fas fa-list"></span></span>
## </div>
## <select name="${providerID}_cat" id="${providerID}_cat"
## title="Provider category"
## class="form-control">
## % for i in providerObj.category_dict.keys():
## <option value="${providerObj.category_dict[i]}" ${('', 'selected')[providerObj.category_dict[i] == providerObj.cat]}>${i}</option>
## % endfor
## </select>
## </div>
## </div>
## </div>
## % endif
% if 'subtitle' in providerObj.custom_settings and providerID == 'tntvillage':
<div class="form-row form-group">
......@@ -1029,7 +1009,9 @@
style="min-width:10em;"></select>
<p>
${_('(select your Newznab categories on the left, and click the "update '
'categories" button to use them for searching.)')}<br/>
'categories" button to add them)')}<br/>
${_('(select your Newznab categories on the right, and click the "update '
'categories" button to remove them)')}<br/>
<b>${_('Don\'t forget to save changes!')}</b>
</p>
</div>
......
10.0.46
\ No newline at end of file
10.0.47
\ No newline at end of file
......@@ -5141,6 +5141,7 @@ $(document).ready(function ($) {
if (isDefault !== 'true') {
$('#editANewznabProvider').append($("<option></option>").attr("value", id).text(name));
$('#editANewznabProvider').val(id);
SICKRAGE.config.providers.populateNewznabSection();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment