Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/Readarr/commit/2a89897a99a1bdaea8b207692448f0837c3eb1fb
You should set ROOT_URL correctly, otherwise the web may not work correctly.
6 changed files with
40 additions and
9 deletions
@ -1,12 +1,14 @@
using System. Threading ;
using System. Collections.Generic ;
using Nancy ;
using NzbDrone.Api.Extensions ;
using NzbDrone.Core.MediaCover ;
using NzbDrone.Core.MetadataSource ;
using System.Linq ;
using NzbDrone.Api.Mapping ;
namespace NzbDrone.Api.Series
{
public class SeriesLookupModule : NzbDrone ApiModule
public class SeriesLookupModule : NzbDrone RestModule< SeriesResource >
{
private readonly ISearchForNewSeries _searchProxy ;
@ -14,14 +16,30 @@ namespace NzbDrone.Api.Series
: base ( "/Series/lookup" )
{
_searchProxy = searchProxy ;
Get [ "/" ] = x = > GetQualityType ( ) ;
Get [ "/" ] = x = > Search ( ) ;
}
private Response GetQualityType ( )
private Response Search ( )
{
var tvDbResults = _searchProxy . SearchForNewSeries ( ( string ) Request . Query . term ) ;
return tvDbResults . FirstOrDefault ( ) . AsResponse ( ) ;
return MapToResource ( tvDbResults ) . FirstOrDefault ( ) . AsResponse ( ) ;
}
private static IEnumerable < SeriesResource > MapToResource ( IEnumerable < Core . Tv . Series > series )
{
foreach ( var currentSeries in series )
{
var resource = currentSeries . InjectTo < SeriesResource > ( ) ;
var poster = currentSeries . Images . FirstOrDefault ( c = > c . CoverType = = MediaCoverTypes . Poster ) ;
if ( poster ! = null )
{
resource . RemotePoster = poster . Url ;
}
yield return resource ;
}
}
}
}
@ -26,6 +26,9 @@ namespace NzbDrone.Api.Series
public Int32 UtcOffset { get ; set ; }
public List < Core . MediaCover . MediaCover > Images { get ; set ; }
public String RemotePoster { get ; set ; }
//View & Edit
public String Path { get ; set ; }
public Int32 QualityProfileId { get ; set ; }
@ -5,7 +5,9 @@ define(['app', 'Series/SeriesModel'], function () {
model : NzbDrone . Series . SeriesModel ,
parse : function ( response ) {
response . id = undefined ;
if ( response ) {
response . id = undefined ;
}
return response ;
}
} ) ;
@ -18,6 +18,10 @@ define([
'click .x-add' : 'addSeries'
} ,
initialize : function ( ) {
this . model . set ( 'isExisting' , true ) ;
} ,
addSeries : function ( ) {
var icon = this . ui . addButton . find ( 'icon' ) ;
icon . removeClass ( 'icon-plus' ) . addClass ( 'icon-spin icon-spinner disabled' ) ;
@ -1,5 +1,8 @@
< div class = "unmapped-folder-view" >
< div class = "row" >
< div class = "x-folder-name-match-results folder-name-matches" / >
< / div >
< div class = "row" style = "visibility: collapse;" >
< div class = "folder-header span11" >
< div class = "input-prepend" >
< i class = "add-on icon-search" > < / i >
@ -11,7 +14,8 @@
< / div >
< / div >
< / div >
< div class = "row ">
< div c lass= "x-f older-n ame-match-results f olde r-nam e-matches"/ >
< div class = "row text-center ">
load more
< / div >
< / div >
@ -2,7 +2,7 @@
< div class = "row" >
< div class = "span2" >
< a href = "{{traktUrl}}" target = "_blank" >
< img class = "series-poster img-polaroid" src = "{{ p oster}}">
< img class = "series-poster img-polaroid" src = "{{ remoteP oster}}">
< / a >
< / div >
< div class = "span9" >