Removed some redundant processor calls

This commit is contained in:
Fergal Moran
2018-03-08 19:08:36 +00:00
parent 3c6d37dd37
commit 34a5e070da
5 changed files with 8 additions and 5 deletions

3
.gitmodules vendored Normal file
View File

@@ -0,0 +1,3 @@
[submodule "server/NYoutubeDL"]
path = server/NYoutubeDL
url = https://github.com/BrianAllred/NYoutubeDL.git

1
server/NYoutubeDL Submodule

Submodule server/NYoutubeDL added at bdeadcda76

View File

@@ -16,10 +16,9 @@
<PackageReference Include="AutoMapper" Version="6.2.2" />
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="3.2.0" />
<PackageReference Include="Handlebars.NetStandard" Version="1.8.1" />
<PackageReference Include="NYoutubeDl" Version="0.6.3" />
<PackageReference Include="Polly" Version="5.2.0" />
<PackageReference Include="ImageSharp" Version="1.0.0-*" />
<PackageReference Include="RestSharp" Version="106.1.0" />
<PackageReference Include="ImageSharp" Version="1.0.0-*" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.5.0-preview1-26216-02" />
<PackageReference Include="WindowsAzure.Storage" Version="8.2.1" />
</ItemGroup>

View File

@@ -54,12 +54,12 @@ namespace PodNoms.Api.Services.Downloader {
await Task.Run(() => {
var youtubeDl = new YoutubeDL();
youtubeDl.VideoUrl = this._url;
this.Properties = youtubeDl.GetDownloadInfo() as VideoDownloadInfo;
var info = youtubeDl.GetDownloadInfo();
var info = youtubeDl.GetDownloadInfo() as VideoDownloadInfo;
ret = (
info != null &&
info is VideoDownloadInfo && //make sure it's not a playlist
(info.Errors.Count == 0 || info.VideoSize != null));
if (ret) this.Properties = info;
});
return ret;
}

View File

@@ -36,7 +36,7 @@ namespace PodNoms.Api.Services.Processor {
entry.ProcessingStatus = ProcessingStatus.Uploading;
await _unitOfWork.CompleteAsync ();
try {
// bit messy but can't figure how to p ass youtube-dl job result to this job
// bit messy but can't figure how to pass youtube-dl job result to this job
// so using AudioUrl as a proxy
if (string.IsNullOrEmpty (localFile))
localFile = entry.AudioUrl;