Fix problem with quality while resolving videos, do not allow direct links to video

This commit is contained in:
Maksym Pavlenko
2017-01-05 12:22:50 -08:00
parent 11003f4744
commit b44691e631
2 changed files with 7 additions and 2 deletions
@@ -46,6 +46,11 @@ namespace Podsync.Controllers
{
var linkInfo = _linkService.Parse(new Uri(request.Url));
if (linkInfo.LinkType == LinkType.Video)
{
throw new ArgumentException("Direct links are not supported, you should provide group, channel or user link");
}
var feed = new FeedMetadata
{
Provider = linkInfo.Provider,
+2 -2
View File
@@ -50,9 +50,9 @@ namespace Podsync.Services.Resolver
switch (resolveType)
{
case ResolveType.VideoHigh:
return "best[ext=mp4]/low[ext=mp4]";
return "bestvideo";
case ResolveType.VideoLow:
return "low[ext=mp4]/best[ext=mp4]";
return "worstvideo";
case ResolveType.AudioHigh:
return "bestaudio[ext=m4a]/worstaudio[ext=m4a]";
case ResolveType.AudioLow: