mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
morethantv: try to provide default quality #5334
This commit is contained in:
@@ -158,10 +158,23 @@ namespace Jackett.Common.Indexers
|
||||
// Parse required data
|
||||
var downloadAnchor = groupItem.QuerySelectorAll("td a").Last();
|
||||
var qualityData = downloadAnchor.InnerHtml.Split('/');
|
||||
|
||||
if (qualityData.Length < 2)
|
||||
throw new Exception($"We expected 2 or more quality datas, instead we have {qualityData.Length} for {season}.");
|
||||
|
||||
switch (qualityData.Length)
|
||||
{
|
||||
case 0:
|
||||
Array.Resize(ref qualityData, 2);
|
||||
qualityData[0] = " ";
|
||||
qualityData[1] = " ";
|
||||
break;
|
||||
case 1:
|
||||
Array.Resize(ref qualityData, 2);
|
||||
qualityData[1] = " ";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
// Build title
|
||||
var title = string.Join(".", new List<string>
|
||||
{
|
||||
|
Reference in New Issue
Block a user