Skip to content

Commit e73d247

Browse files
author
Meyn
committed
Disable YouTube
1 parent b7254eb commit e73d247

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

Tubifarry/Indexers/Spotify/SpotifyRequestGenerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public void StartTokenRequest()
118118
return false;
119119
}
120120
return true;
121-
}, new() { NumberOfAttempts = 1 });
121+
}, new() { NumberOfAttempts = 1, AutoStart = false });
122122
}
123123
}
124124
}

Tubifarry/Indexers/Youtube/YoutubeIndexerSettings.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ public YoutubeIndexerSettingsValidator()
2222
.Length(32, 64)
2323
.When(x => !string.IsNullOrEmpty(x.PoToken))
2424
.WithMessage("Proof of Origin (poToken) must be between 32 and 64 characters if provided.");
25+
26+
// Validate Unavailable
27+
RuleFor(x => x.Unavailable)
28+
.Must(unavailable => !unavailable)
29+
.WithMessage("This version of Tubifarry does not support YouTube as indexer. If you need YouTube support you need to switch to develop!");
2530
}
2631
}
2732

@@ -37,6 +42,7 @@ public class YoutubeIndexerSettings : IIndexerSettings
3742

3843
[FieldDefinition(2, Label = "PoToken", Type = FieldType.Textbox, HelpText = "A unique token to verify the origin of the request.", Advanced = true)]
3944
public string PoToken { get; set; } = string.Empty;
45+
public bool Unavailable { get; set; } = true;
4046

4147
public string BaseUrl { get; set; } = string.Empty;
4248

0 commit comments

Comments
 (0)