mirror of
https://github.com/Radarr/Radarr
synced 2024-12-29 11:25:26 +00:00
Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
a460e89a8d
6 changed files with 29 additions and 11 deletions
|
@ -5,7 +5,7 @@ var postcss = require('gulp-postcss');
|
||||||
var sourcemaps = require('gulp-sourcemaps');
|
var sourcemaps = require('gulp-sourcemaps');
|
||||||
var autoprefixer = require('autoprefixer-core');
|
var autoprefixer = require('autoprefixer-core');
|
||||||
var livereload = require('gulp-livereload');
|
var livereload = require('gulp-livereload');
|
||||||
|
var cleancss = require('gulp-clean-css');
|
||||||
var print = require('gulp-print');
|
var print = require('gulp-print');
|
||||||
var paths = require('./paths');
|
var paths = require('./paths');
|
||||||
var errorHandler = require('./errorHandler');
|
var errorHandler = require('./errorHandler');
|
||||||
|
@ -36,12 +36,13 @@ gulp.task('less', function() {
|
||||||
.pipe(sourcemaps.init())
|
.pipe(sourcemaps.init())
|
||||||
.pipe(less({
|
.pipe(less({
|
||||||
dumpLineNumbers : 'false',
|
dumpLineNumbers : 'false',
|
||||||
compress : true,
|
compress : false,
|
||||||
yuicompress : true,
|
yuicompress : false,
|
||||||
ieCompat : true,
|
ieCompat : true,
|
||||||
strictImports : true
|
strictImports : true
|
||||||
}))
|
}))
|
||||||
.pipe(postcss([ autoprefixer({ browsers: ['last 2 versions'] }) ]))
|
.pipe(postcss([ autoprefixer({ browsers: ['last 2 versions'] }) ]))
|
||||||
|
.pipe(cleancss())
|
||||||
.on('error', errorHandler.onError)
|
.on('error', errorHandler.onError)
|
||||||
.pipe(sourcemaps.write(paths.dest.content))
|
.pipe(sourcemaps.write(paths.dest.content))
|
||||||
.pipe(gulp.dest(paths.dest.content))
|
.pipe(gulp.dest(paths.dest.content))
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
"del": "1.2.0",
|
"del": "1.2.0",
|
||||||
"gulp": "3.9.0",
|
"gulp": "3.9.0",
|
||||||
"gulp-cached": "1.1.0",
|
"gulp-cached": "1.1.0",
|
||||||
|
"gulp-clean-css": "^3.0.4",
|
||||||
"gulp-concat": "2.6.0",
|
"gulp-concat": "2.6.0",
|
||||||
"gulp-declare": "0.3.0",
|
"gulp-declare": "0.3.0",
|
||||||
"gulp-handlebars": "3.0.1",
|
"gulp-handlebars": "3.0.1",
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
@ -141,7 +141,21 @@ public string BindAddress
|
||||||
|
|
||||||
public bool LaunchBrowser => GetValueBoolean("LaunchBrowser", true);
|
public bool LaunchBrowser => GetValueBoolean("LaunchBrowser", true);
|
||||||
|
|
||||||
public string ApiKey => GetValue("ApiKey", GenerateApiKey());
|
public string ApiKey
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var apiKey = GetValue("ApiKey", GenerateApiKey());
|
||||||
|
|
||||||
|
if (apiKey.IsNullOrWhiteSpace())
|
||||||
|
{
|
||||||
|
apiKey = GenerateApiKey();
|
||||||
|
SetValue("ApiKey", apiKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
return apiKey;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public AuthenticationType AuthenticationMethod
|
public AuthenticationType AuthenticationMethod
|
||||||
{
|
{
|
||||||
|
|
|
@ -33,7 +33,7 @@ protected TorrentClientBase(ITorrentFileInfoReader torrentFileInfoReader,
|
||||||
_httpClient = httpClient;
|
_httpClient = httpClient;
|
||||||
_torrentFileInfoReader = torrentFileInfoReader;
|
_torrentFileInfoReader = torrentFileInfoReader;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override DownloadProtocol Protocol => DownloadProtocol.Torrent;
|
public override DownloadProtocol Protocol => DownloadProtocol.Torrent;
|
||||||
|
|
||||||
public virtual bool PreferTorrentFile => false;
|
public virtual bool PreferTorrentFile => false;
|
||||||
|
@ -149,7 +149,7 @@ public override string Download(RemoteEpisode remoteMovie)
|
||||||
{
|
{
|
||||||
magnetUrl = torrentInfo.MagnetUrl;
|
magnetUrl = torrentInfo.MagnetUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PreferTorrentFile)
|
if (PreferTorrentFile)
|
||||||
{
|
{
|
||||||
if (torrentUrl.IsNotNullOrWhiteSpace())
|
if (torrentUrl.IsNotNullOrWhiteSpace())
|
||||||
|
@ -221,7 +221,9 @@ private string DownloadFromWebUrl(RemoteMovie remoteEpisode, string torrentUrl)
|
||||||
|
|
||||||
var response = _httpClient.Get(request);
|
var response = _httpClient.Get(request);
|
||||||
|
|
||||||
if (response.StatusCode == HttpStatusCode.SeeOther || response.StatusCode == HttpStatusCode.Found)
|
if (response.StatusCode == HttpStatusCode.MovedPermanently ||
|
||||||
|
response.StatusCode == HttpStatusCode.Found ||
|
||||||
|
response.StatusCode == HttpStatusCode.SeeOther)
|
||||||
{
|
{
|
||||||
var locationHeader = response.Headers.GetSingleValue("Location");
|
var locationHeader = response.Headers.GetSingleValue("Location");
|
||||||
|
|
||||||
|
@ -321,7 +323,9 @@ private string DownloadFromWebUrl(RemoteEpisode remoteEpisode, string torrentUrl
|
||||||
|
|
||||||
var response = _httpClient.Get(request);
|
var response = _httpClient.Get(request);
|
||||||
|
|
||||||
if (response.StatusCode == HttpStatusCode.SeeOther || response.StatusCode == HttpStatusCode.Found)
|
if (response.StatusCode == HttpStatusCode.MovedPermanently ||
|
||||||
|
response.StatusCode == HttpStatusCode.Found ||
|
||||||
|
response.StatusCode == HttpStatusCode.SeeOther)
|
||||||
{
|
{
|
||||||
var locationHeader = response.Headers.GetSingleValue("Location");
|
var locationHeader = response.Headers.GetSingleValue("Location");
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Radarr</title>
|
<title>Radarr</title>
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
<meta name="mobile-web-app-capable" content="yes"/>
|
<meta name="mobile-web-app-capable" content="yes"/>
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes"/>
|
<meta name="apple-mobile-web-app-capable" content="yes"/>
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Radarr - Login</title>
|
<title>Radarr - Login</title>
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<meta name="mobile-web-app-capable" content="yes">
|
<meta name="mobile-web-app-capable" content="yes">
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
|
|
Loading…
Reference in a new issue