diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..1aa7335 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "server/NYoutubeDL"] + path = server/NYoutubeDL + url = https://github.com/BrianAllred/NYoutubeDL.git diff --git a/server/NYoutubeDL b/server/NYoutubeDL new file mode 160000 index 0000000..bdeadcd --- /dev/null +++ b/server/NYoutubeDL @@ -0,0 +1 @@ +Subproject commit bdeadcda768ec2b6b6b08cb7b8833f23250779c8 diff --git a/server/PodNoms.Api.csproj b/server/PodNoms.Api.csproj index 3e0f9de..202b1c8 100644 --- a/server/PodNoms.Api.csproj +++ b/server/PodNoms.Api.csproj @@ -16,10 +16,9 @@ - - + diff --git a/server/Services/Downloader/AudioDownloader.cs b/server/Services/Downloader/AudioDownloader.cs index b0e96c0..370f5ed 100644 --- a/server/Services/Downloader/AudioDownloader.cs +++ b/server/Services/Downloader/AudioDownloader.cs @@ -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; } diff --git a/server/Services/Processor/AudioUploadProcessService.cs b/server/Services/Processor/AudioUploadProcessService.cs index db230f8..ef131ed 100644 --- a/server/Services/Processor/AudioUploadProcessService.cs +++ b/server/Services/Processor/AudioUploadProcessService.cs @@ -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;