mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-11 12:02:35 +02:00
Added: Ability to force download movies that could not be mapped correctly. This also shares these mappings with other users, so everyone can profit :)
This commit is contained in:
parent
efe49ef3c4
commit
09d51dca0f
@ -23,6 +23,7 @@ public string Generate()
|
||||
_innerQuery.BuildSelectClause(sql);
|
||||
_innerQuery.BuildFromClause(sql);
|
||||
_innerQuery.BuildJoinClauses(sql);
|
||||
_innerQuery.BuildWhereClause(sql);
|
||||
_innerQuery.BuildGroupBy(sql);
|
||||
sql.Append(") ");
|
||||
|
||||
|
@ -253,12 +253,6 @@ public virtual PagingSpec<TModel> GetPaged(PagingSpec<TModel> pagingSpec)
|
||||
.Take(pagingSpec.PageSize).ToList();
|
||||
pagingSpec.TotalRecords = GetPagedQuery(Query, pagingSpec).GetRowCount();
|
||||
|
||||
var queryStr = GetPagedQuery(Query, pagingSpec).BuildQuery();
|
||||
var beforeQuery = Query.BuildQuery();
|
||||
|
||||
pagingSpec.SortKey = beforeQuery;
|
||||
pagingSpec.SortKey = queryStr;
|
||||
|
||||
return pagingSpec;
|
||||
}
|
||||
|
||||
|
@ -104,7 +104,7 @@ public PagingSpec<Movie> MoviesWithoutFiles(PagingSpec<Movie> pagingSpec)
|
||||
|
||||
public override PagingSpec<Movie> GetPaged(PagingSpec<Movie> pagingSpec)
|
||||
{
|
||||
/*if (pagingSpec.SortKey == "downloadedQuality")
|
||||
if (pagingSpec.SortKey == "downloadedQuality")
|
||||
{
|
||||
var mapper = _database.GetDataMapper();
|
||||
var offset = pagingSpec.PagingOffset();
|
||||
@ -114,7 +114,7 @@ public override PagingSpec<Movie> GetPaged(PagingSpec<Movie> pagingSpec)
|
||||
{
|
||||
direction = "DESC";
|
||||
}
|
||||
var q = Query.Select($"SELECT * from \"Movies\" , \"MovieFiles\", \"QualityDefinitions\" WHERE Movies.MovieFileId=MovieFiles.Id AND instr(MovieFiles.Quality, ('quality\": ' || QualityDefinitions.Quality || \",\")) > 0 ORDER BY QualityDefinitions.Title {direction} LIMIT {offset},{limit};");
|
||||
var q = mapper.Query<Movie>($"SELECT * from \"Movies\" , \"MovieFiles\", \"QualityDefinitions\" WHERE Movies.MovieFileId=MovieFiles.Id AND instr(MovieFiles.Quality, ('quality\": ' || QualityDefinitions.Quality || \",\")) > 0 ORDER BY QualityDefinitions.Title {direction} LIMIT {offset},{limit};");
|
||||
var q2 = mapper.Query<Movie>("SELECT * from \"Movies\" , \"MovieFiles\", \"QualityDefinitions\" WHERE Movies.MovieFileId=MovieFiles.Id AND instr(MovieFiles.Quality, ('quality\": ' || QualityDefinitions.Quality || \",\")) > 0 ORDER BY QualityDefinitions.Title ASC;");
|
||||
|
||||
//var ok = q.BuildQuery();
|
||||
@ -123,7 +123,7 @@ public override PagingSpec<Movie> GetPaged(PagingSpec<Movie> pagingSpec)
|
||||
pagingSpec.TotalRecords = q2.Count();
|
||||
|
||||
}
|
||||
else*/
|
||||
else
|
||||
{
|
||||
pagingSpec = base.GetPaged(pagingSpec);
|
||||
//pagingSpec.Records = GetPagedQuery(Query, pagingSpec).ToList();
|
||||
@ -220,7 +220,7 @@ private string BuildQualityCutoffWhereClause(List<QualitiesBelowCutoff> qualitie
|
||||
{
|
||||
foreach (var belowCutoff in profile.QualityIds)
|
||||
{
|
||||
clauses.Add(string.Format("([t0].[ProfileId] = {0} AND [t1].[Quality] LIKE '%_quality_: {1},%')", profile.ProfileId, belowCutoff));
|
||||
clauses.Add(string.Format("([t0].[ProfileId] = {0} AND [t2].[Quality] LIKE '%_quality_: {1},%')", profile.ProfileId, belowCutoff));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user