And back to videolib.
This commit is contained in:
parent
b2f43f4f72
commit
baaba53a06
@ -12,7 +12,7 @@ using System.Diagnostics;
|
|||||||
using NadekoBot.Extensions;
|
using NadekoBot.Extensions;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using Timer = System.Timers.Timer;
|
using Timer = System.Timers.Timer;
|
||||||
using YoutubeExtractor;
|
using VideoLibrary;
|
||||||
|
|
||||||
namespace NadekoBot.Classes.Music {
|
namespace NadekoBot.Classes.Music {
|
||||||
public enum StreamState {
|
public enum StreamState {
|
||||||
@ -51,14 +51,14 @@ namespace NadekoBot.Classes.Music {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void ResolveStreamLink() {
|
private void ResolveStreamLink() {
|
||||||
VideoInfo video = null;
|
Video video = null;
|
||||||
try {
|
try {
|
||||||
if (OnResolving != null)
|
if (OnResolving != null)
|
||||||
OnResolving();
|
OnResolving();
|
||||||
Console.WriteLine("Resolving video link");
|
Console.WriteLine("Resolving video link");
|
||||||
|
|
||||||
video = DownloadUrlResolver.GetDownloadUrls(Searches.FindYoutubeUrlByKeywords(Query))
|
video = YouTube.Default.GetAllVideos(Searches.FindYoutubeUrlByKeywords(Query))
|
||||||
.Where(v => v.AdaptiveType == AdaptiveType.Audio)
|
.Where(v => v.AdaptiveKind == AdaptiveKind.Audio)
|
||||||
.OrderByDescending(v => v.AudioBitrate)
|
.OrderByDescending(v => v.AudioBitrate)
|
||||||
.FirstOrDefault();
|
.FirstOrDefault();
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ namespace NadekoBot.Classes.Music {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
musicStreamer = new MusicStreamer(this, video.DownloadUrl);
|
musicStreamer = new MusicStreamer(this, video.Uri);
|
||||||
if (OnQueued != null)
|
if (OnQueued != null)
|
||||||
OnQueued();
|
OnQueued();
|
||||||
return;
|
return;
|
||||||
|
@ -73,6 +73,10 @@
|
|||||||
<Prefer32Bit>true</Prefer32Bit>
|
<Prefer32Bit>true</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Reference Include="libvideo, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\VideoLibrary.1.3.3\lib\portable-net45+win+wpa81+MonoAndroid10+xamarinios10+MonoTouch10\libvideo.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
<Reference Include="Manatee.Json, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c267f67a39449c62, processorArchitecture=MSIL">
|
<Reference Include="Manatee.Json, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c267f67a39449c62, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Manatee.Json.3.2.1\lib\net45\Manatee.Json.dll</HintPath>
|
<HintPath>..\packages\Manatee.Json.3.2.1\lib\net45\Manatee.Json.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
@ -128,10 +132,6 @@
|
|||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
<Reference Include="System.Net.Http" />
|
<Reference Include="System.Net.Http" />
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
<Reference Include="YoutubeExtractor, Version=0.10.10.0, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\YoutubeExtractor.0.10.10\lib\net35\YoutubeExtractor.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Classes\Music\MusicControls.cs" />
|
<Compile Include="Classes\Music\MusicControls.cs" />
|
||||||
|
@ -11,5 +11,5 @@
|
|||||||
<package id="Parse" version="1.6.2" targetFramework="net452" />
|
<package id="Parse" version="1.6.2" targetFramework="net452" />
|
||||||
<package id="RestSharp" version="105.2.3" targetFramework="net452" />
|
<package id="RestSharp" version="105.2.3" targetFramework="net452" />
|
||||||
<package id="taglib" version="2.1.0.0" targetFramework="net452" />
|
<package id="taglib" version="2.1.0.0" targetFramework="net452" />
|
||||||
<package id="YoutubeExtractor" version="0.10.10" targetFramework="net452" />
|
<package id="VideoLibrary" version="1.3.3" targetFramework="net452" />
|
||||||
</packages>
|
</packages>
|
Loading…
Reference in New Issue
Block a user