mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-30 03:38:26 -07:00
Fix Manual Album Grab, Clean ReleaseResource
This commit is contained in:
parent
566ac1a9d3
commit
7776862359
3 changed files with 8 additions and 13 deletions
|
@ -55,8 +55,8 @@ class InteractiveEpisodeSearchConnector extends Component {
|
||||||
this.props.setReleasesSort({ sortKey, sortDirection });
|
this.props.setReleasesSort({ sortKey, sortDirection });
|
||||||
}
|
}
|
||||||
|
|
||||||
onGrabPress = (guid) => {
|
onGrabPress = (guid, indexerId) => {
|
||||||
this.props.grabRelease({ guid });
|
this.props.grabRelease({ guid, indexerId });
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -45,7 +45,7 @@ class InteractiveEpisodeSearchRow extends Component {
|
||||||
// Listeners
|
// Listeners
|
||||||
|
|
||||||
onGrabPress = () => {
|
onGrabPress = () => {
|
||||||
this.props.onGrabPress(this.props.guid);
|
this.props.onGrabPress(this.props.guid, this.props.indexerId);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -175,6 +175,7 @@ InteractiveEpisodeSearchRow.propTypes = {
|
||||||
title: PropTypes.string.isRequired,
|
title: PropTypes.string.isRequired,
|
||||||
infoUrl: PropTypes.string.isRequired,
|
infoUrl: PropTypes.string.isRequired,
|
||||||
indexer: PropTypes.string.isRequired,
|
indexer: PropTypes.string.isRequired,
|
||||||
|
indexerId: PropTypes.number.isRequired,
|
||||||
size: PropTypes.number.isRequired,
|
size: PropTypes.number.isRequired,
|
||||||
seeders: PropTypes.number,
|
seeders: PropTypes.number,
|
||||||
leechers: PropTypes.number,
|
leechers: PropTypes.number,
|
||||||
|
|
|
@ -27,12 +27,10 @@ namespace Lidarr.Api.V3.Indexers
|
||||||
public string Title { get; set; }
|
public string Title { get; set; }
|
||||||
public bool FullSeason { get; set; }
|
public bool FullSeason { get; set; }
|
||||||
public bool SceneSource { get; set; }
|
public bool SceneSource { get; set; }
|
||||||
public int SeasonNumber { get; set; }
|
|
||||||
public Language Language { get; set; }
|
public Language Language { get; set; }
|
||||||
public string AirDate { get; set; }
|
public string AirDate { get; set; }
|
||||||
public string ArtistName { get; set; }
|
public string ArtistName { get; set; }
|
||||||
public int[] EpisodeNumbers { get; set; }
|
public string AlbumTitle { get; set; }
|
||||||
public int[] AbsoluteEpisodeNumbers { get; set; }
|
|
||||||
public bool Approved { get; set; }
|
public bool Approved { get; set; }
|
||||||
public bool TemporarilyRejected { get; set; }
|
public bool TemporarilyRejected { get; set; }
|
||||||
public bool Rejected { get; set; }
|
public bool Rejected { get; set; }
|
||||||
|
@ -65,7 +63,7 @@ namespace Lidarr.Api.V3.Indexers
|
||||||
{
|
{
|
||||||
var releaseInfo = model.RemoteAlbum.Release;
|
var releaseInfo = model.RemoteAlbum.Release;
|
||||||
var parsedAlbumInfo = model.RemoteAlbum.ParsedAlbumInfo;
|
var parsedAlbumInfo = model.RemoteAlbum.ParsedAlbumInfo;
|
||||||
var remoteEpisode = model.RemoteAlbum;
|
var remoteAlbum = model.RemoteAlbum;
|
||||||
var torrentInfo = (model.RemoteAlbum.Release as TorrentInfo) ?? new TorrentInfo();
|
var torrentInfo = (model.RemoteAlbum.Release as TorrentInfo) ?? new TorrentInfo();
|
||||||
|
|
||||||
// TODO: Clean this mess up. don't mix data from multiple classes, use sub-resources instead? (Got a huge Deja Vu, didn't we talk about this already once?)
|
// TODO: Clean this mess up. don't mix data from multiple classes, use sub-resources instead? (Got a huge Deja Vu, didn't we talk about this already once?)
|
||||||
|
@ -83,14 +81,10 @@ namespace Lidarr.Api.V3.Indexers
|
||||||
ReleaseGroup = parsedAlbumInfo.ReleaseGroup,
|
ReleaseGroup = parsedAlbumInfo.ReleaseGroup,
|
||||||
ReleaseHash = parsedAlbumInfo.ReleaseHash,
|
ReleaseHash = parsedAlbumInfo.ReleaseHash,
|
||||||
Title = releaseInfo.Title,
|
Title = releaseInfo.Title,
|
||||||
//FullSeason = parsedEpisodeInfo.FullSeason,
|
|
||||||
//SeasonNumber = parsedEpisodeInfo.SeasonNumber,
|
|
||||||
Language = parsedAlbumInfo.Language,
|
Language = parsedAlbumInfo.Language,
|
||||||
//AirDate = parsedEpisodeInfo.AirDate,
|
|
||||||
ArtistName = parsedAlbumInfo.ArtistName,
|
ArtistName = parsedAlbumInfo.ArtistName,
|
||||||
|
AlbumTitle = parsedAlbumInfo.AlbumTitle,
|
||||||
|
|
||||||
//EpisodeNumbers = parsedEpisodeInfo.EpisodeNumbers,
|
|
||||||
//AbsoluteEpisodeNumbers = parsedEpisodeInfo.AbsoluteEpisodeNumbers,
|
|
||||||
Approved = model.Approved,
|
Approved = model.Approved,
|
||||||
TemporarilyRejected = model.TemporarilyRejected,
|
TemporarilyRejected = model.TemporarilyRejected,
|
||||||
Rejected = model.Rejected,
|
Rejected = model.Rejected,
|
||||||
|
@ -99,7 +93,7 @@ namespace Lidarr.Api.V3.Indexers
|
||||||
CommentUrl = releaseInfo.CommentUrl,
|
CommentUrl = releaseInfo.CommentUrl,
|
||||||
DownloadUrl = releaseInfo.DownloadUrl,
|
DownloadUrl = releaseInfo.DownloadUrl,
|
||||||
InfoUrl = releaseInfo.InfoUrl,
|
InfoUrl = releaseInfo.InfoUrl,
|
||||||
DownloadAllowed = remoteEpisode.DownloadAllowed,
|
DownloadAllowed = remoteAlbum.DownloadAllowed,
|
||||||
//ReleaseWeight
|
//ReleaseWeight
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue