mirror of
https://github.com/fergalmoran/Readarr.git
synced 2026-02-01 05:24:01 +00:00
Anime!
New: Anime support New: pull alternate names from thexem.de New: Search using all alternate names (if rage ID is unavailable) New: Show scene mapping information when hovering over episode number New: Full season searching for anime (searches for each episode) New: animezb.com anime indexer New: Treat BD as bluray Fixed: Parsing of 2 digit absolute episode numbers Fixed: Loading series details page for series that start with period Fixed: Return 0 results when manual search fails, instead of an error Fixed: animezb URL
This commit is contained in:
62
src/UI/Series/Details/EpisodeNumberCell.js
Normal file
62
src/UI/Series/Details/EpisodeNumberCell.js
Normal file
@@ -0,0 +1,62 @@
|
||||
'use strict';
|
||||
|
||||
define(
|
||||
[
|
||||
'marionette',
|
||||
'Cells/NzbDroneCell',
|
||||
'reqres'
|
||||
], function (Marionette, NzbDroneCell, reqres) {
|
||||
return NzbDroneCell.extend({
|
||||
|
||||
className: 'episode-number-cell',
|
||||
template : 'Series/Details/EpisodeNumberCellTemplate',
|
||||
|
||||
render: function () {
|
||||
|
||||
this.$el.empty();
|
||||
this.$el.html(this.model.get('episodeNumber'));
|
||||
|
||||
var alternateTitles = [];
|
||||
|
||||
if (reqres.hasHandler(reqres.Requests.GetAlternateNameBySeasonNumber)) {
|
||||
|
||||
if (this.model.get('sceneSeasonNumber') > 0) {
|
||||
alternateTitles = reqres.request(reqres.Requests.GetAlternateNameBySeasonNumber,
|
||||
this.model.get('seriesId'),
|
||||
this.model.get('sceneSeasonNumber'));
|
||||
}
|
||||
|
||||
if (alternateTitles.length === 0) {
|
||||
alternateTitles = reqres.request(reqres.Requests.GetAlternateNameBySeasonNumber,
|
||||
this.model.get('seriesId'),
|
||||
this.model.get('seasonNumber'));
|
||||
}
|
||||
}
|
||||
|
||||
if (this.model.get('sceneSeasonNumber') > 0 ||
|
||||
this.model.get('sceneEpisodeNumber') > 0 ||
|
||||
(this.model.has('sceneAbsoluteEpisodeNumber') && this.model.get('sceneAbsoluteEpisodeNumber') > 0) ||
|
||||
alternateTitles.length > 0)
|
||||
{
|
||||
this.templateFunction = Marionette.TemplateCache.get(this.template);
|
||||
|
||||
var json = this.model.toJSON();
|
||||
json.alternateTitles = alternateTitles;
|
||||
|
||||
var html = this.templateFunction(json);
|
||||
|
||||
this.$el.popover({
|
||||
content : html,
|
||||
html : true,
|
||||
trigger : 'hover',
|
||||
title : 'Scene Information',
|
||||
placement: 'right',
|
||||
container: this.$el
|
||||
});
|
||||
}
|
||||
|
||||
this.delegateEvents();
|
||||
return this;
|
||||
}
|
||||
});
|
||||
});
|
||||
39
src/UI/Series/Details/EpisodeNumberCellTemplate.html
Normal file
39
src/UI/Series/Details/EpisodeNumberCellTemplate.html
Normal file
@@ -0,0 +1,39 @@
|
||||
<div class="scene-info">
|
||||
{{#if sceneSeasonNumber}}
|
||||
<div class="row">
|
||||
<div class="key">Season</div>
|
||||
<div class="value">{{sceneSeasonNumber}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if sceneEpisodeNumber}}
|
||||
<div class="row">
|
||||
<div class="key">Episode</div>
|
||||
<div class="value">{{sceneEpisodeNumber}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if sceneAbsoluteEpisodeNumber}}
|
||||
<div class="row">
|
||||
<div class="key">Absolute</div>
|
||||
<div class="value">{{sceneAbsoluteEpisodeNumber}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if alternateTitles}}
|
||||
<div class="row">
|
||||
{{#if_gt alternateTitles.length compare="1"}}
|
||||
<div class="key">Titles</div>
|
||||
{{else}}
|
||||
<div class="key">Title</div>
|
||||
{{/if_gt}}
|
||||
<div class="value">
|
||||
<ul>
|
||||
{{#each alternateTitles}}
|
||||
<li>{{title}}</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
@@ -30,8 +30,10 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{{#each alternativeTitles}}
|
||||
<span class="label label-default">{{this}}</span>
|
||||
{{#each alternateTitles}}
|
||||
{{#if_eq seasonNumber compare="-1"}}
|
||||
<span class="label label-default">{{title}}</span>
|
||||
{{/if_eq}}
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
@@ -9,6 +9,7 @@ define(
|
||||
'Cells/RelativeDateCell',
|
||||
'Cells/EpisodeStatusCell',
|
||||
'Cells/EpisodeActionsCell',
|
||||
'Series/Details/EpisodeNumberCell',
|
||||
'Commands/CommandController',
|
||||
'moment',
|
||||
'underscore',
|
||||
@@ -21,6 +22,7 @@ define(
|
||||
RelativeDateCell,
|
||||
EpisodeStatusCell,
|
||||
EpisodeActionsCell,
|
||||
EpisodeNumberCell,
|
||||
CommandController,
|
||||
Moment,
|
||||
_,
|
||||
@@ -58,11 +60,9 @@ define(
|
||||
sortable : false
|
||||
},
|
||||
{
|
||||
name : 'episodeNumber',
|
||||
name : 'this',
|
||||
label: '#',
|
||||
cell : Backgrid.IntegerCell.extend({
|
||||
className: 'episode-number-cell'
|
||||
})
|
||||
cell : EpisodeNumberCell
|
||||
},
|
||||
{
|
||||
name : 'this',
|
||||
|
||||
@@ -191,6 +191,14 @@ define(
|
||||
return self.episodeFileCollection.get(episodeFileId);
|
||||
});
|
||||
|
||||
reqres.setHandler(reqres.Requests.GetAlternateNameBySeasonNumber, function (seriesId, seasonNumber) {
|
||||
if (self.model.get('id') !== seriesId) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return _.where(self.model.get('alternateTitles'), { seasonNumber: seasonNumber });
|
||||
});
|
||||
|
||||
$.when(this.episodeCollection.fetch(), this.episodeFileCollection.fetch()).done(function () {
|
||||
var seasonCollectionView = new SeasonCollectionView({
|
||||
collection : self.seasonCollection,
|
||||
|
||||
@@ -58,10 +58,10 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" for="inputQualityProfile">Quality Profile</label>
|
||||
<label class="col-sm-4 control-label">Quality Profile</label>
|
||||
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control x-quality-profile" id="inputQualityProfile" name="qualityProfileId">
|
||||
<select class="form-control x-quality-profile" name="qualityProfileId">
|
||||
{{#each qualityProfiles.models}}
|
||||
<option value="{{id}}">{{attributes.name}}</option>
|
||||
{{/each}}
|
||||
@@ -71,10 +71,17 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" for="inputPath">Path</label>
|
||||
<label class="col-sm-4 control-label">Series Type</label>
|
||||
<div class="col-sm-4">
|
||||
{{> SeriesTypeSelectionPartial}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">Path</label>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<input type="text" id="inputPath" class="form-control x-path" placeholder="Path" name="path">
|
||||
<input type="text" class="form-control x-path" placeholder="Path" name="path">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -404,4 +404,26 @@
|
||||
margin-top : 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.scene-info {
|
||||
.key, .value {
|
||||
display : inline-block;
|
||||
}
|
||||
|
||||
.key {
|
||||
width : 80px;
|
||||
margin-left : 10px;
|
||||
vertical-align : top;
|
||||
}
|
||||
|
||||
.value {
|
||||
margin-right : 10px;
|
||||
max-width : 170px;
|
||||
}
|
||||
|
||||
ul {
|
||||
padding-left : 0px;
|
||||
list-style-type : none;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user