diff --git a/PlaylistDownloader.exe b/PlaylistDownloader.exe
index 0d04e6e..1b529f1 100644
Binary files a/PlaylistDownloader.exe and b/PlaylistDownloader.exe differ
diff --git a/PlaylistDownloader.zip b/PlaylistDownloader.zip
index b4382f1..d9a5282 100644
Binary files a/PlaylistDownloader.zip and b/PlaylistDownloader.zip differ
diff --git a/PlaylistDownloader/PlaylistDownloader.UnitTests/PlaylistDownloader.UnitTests.csproj b/PlaylistDownloader/PlaylistDownloader.UnitTests/PlaylistDownloader.UnitTests.csproj
index 6ed77cd..9d082b9 100644
--- a/PlaylistDownloader/PlaylistDownloader.UnitTests/PlaylistDownloader.UnitTests.csproj
+++ b/PlaylistDownloader/PlaylistDownloader.UnitTests/PlaylistDownloader.UnitTests.csproj
@@ -50,12 +50,6 @@
-
-
- {e6f3673a-5982-4cf3-a751-8d004415b369}
- PlaylistDownloader
-
-
diff --git a/PlaylistDownloader/PlaylistDownloader.sln b/PlaylistDownloader/PlaylistDownloader.sln
index e36c3f7..8d702e6 100644
--- a/PlaylistDownloader/PlaylistDownloader.sln
+++ b/PlaylistDownloader/PlaylistDownloader.sln
@@ -1,24 +1,20 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26430.16
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.30406.217
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlaylistDownloader", "PlaylistDownloader\PlaylistDownloader.csproj", "{E6F3673A-5982-4CF3-A751-8D004415B369}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SilentUpdater", "SilentUpdater\SilentUpdater.csproj", "{95EE76E5-8C7B-4BE4-8127-9515C3EF6B72}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlaylistDownloader.UnitTests", "PlaylistDownloader.UnitTests\PlaylistDownloader.UnitTests.csproj", "{CE2ACA8E-01B2-483E-9D86-C06ACA0EEE65}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlaylistDownloader", "PlaylistDownloader\PlaylistDownloader.csproj", "{7DAE846A-611D-4985-9E7B-2CBDAE6FE8DC}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {E6F3673A-5982-4CF3-A751-8D004415B369}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {E6F3673A-5982-4CF3-A751-8D004415B369}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {E6F3673A-5982-4CF3-A751-8D004415B369}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {E6F3673A-5982-4CF3-A751-8D004415B369}.Release|Any CPU.Build.0 = Release|Any CPU
{95EE76E5-8C7B-4BE4-8127-9515C3EF6B72}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{95EE76E5-8C7B-4BE4-8127-9515C3EF6B72}.Debug|Any CPU.Build.0 = Debug|Any CPU
{95EE76E5-8C7B-4BE4-8127-9515C3EF6B72}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -27,8 +23,15 @@ Global
{CE2ACA8E-01B2-483E-9D86-C06ACA0EEE65}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CE2ACA8E-01B2-483E-9D86-C06ACA0EEE65}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CE2ACA8E-01B2-483E-9D86-C06ACA0EEE65}.Release|Any CPU.Build.0 = Release|Any CPU
+ {7DAE846A-611D-4985-9E7B-2CBDAE6FE8DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7DAE846A-611D-4985-9E7B-2CBDAE6FE8DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7DAE846A-611D-4985-9E7B-2CBDAE6FE8DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {7DAE846A-611D-4985-9E7B-2CBDAE6FE8DC}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {AC4BD620-6517-4766-B771-E6141A254A31}
+ EndGlobalSection
EndGlobal
diff --git a/PlaylistDownloader/PlaylistDownloader/App.config b/PlaylistDownloader/PlaylistDownloader/App.config
index 464acbb..af077df 100644
--- a/PlaylistDownloader/PlaylistDownloader/App.config
+++ b/PlaylistDownloader/PlaylistDownloader/App.config
@@ -1,23 +1,28 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -35,4 +40,16 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/PlaylistDownloader/PlaylistDownloader/Downloader.cs b/PlaylistDownloader/PlaylistDownloader/Downloader.cs
index c75a80b..5e36971 100644
--- a/PlaylistDownloader/PlaylistDownloader/Downloader.cs
+++ b/PlaylistDownloader/PlaylistDownloader/Downloader.cs
@@ -55,7 +55,6 @@ protected override void OnDoWork(DoWorkEventArgs args)
{
po.CancellationToken.ThrowIfCancellationRequested();
await DownloadPlaylistItem(item);
- //ConvertPlaylistItem(item, po);
}
catch (InvalidOperationException) { } //ignore exceptions when aborting download
catch (Win32Exception) { } //ignore process exception if killed during process exiting
diff --git a/PlaylistDownloader/PlaylistDownloader/MainWindow.xaml b/PlaylistDownloader/PlaylistDownloader/MainWindow.xaml
new file mode 100644
index 0000000..b2fb3fa
--- /dev/null
+++ b/PlaylistDownloader/PlaylistDownloader/MainWindow.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/PlaylistDownloader/PlaylistDownloader/MainWindow.xaml.cs b/PlaylistDownloader/PlaylistDownloader/MainWindow.xaml.cs
new file mode 100644
index 0000000..7e8a558
--- /dev/null
+++ b/PlaylistDownloader/PlaylistDownloader/MainWindow.xaml.cs
@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace PlaylistDownloader1 {
+ ///
+ /// Interaction logic for MainWindow.xaml
+ ///
+ public partial class MainWindow : Window {
+ public MainWindow() {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/PlaylistDownloader/PlaylistDownloader/PlaylistDownloader.csproj b/PlaylistDownloader/PlaylistDownloader/PlaylistDownloader.csproj
index 8ee9b3c..e5150e0 100644
--- a/PlaylistDownloader/PlaylistDownloader/PlaylistDownloader.csproj
+++ b/PlaylistDownloader/PlaylistDownloader/PlaylistDownloader.csproj
@@ -1,21 +1,34 @@
-
+
Debug
AnyCPU
- {E6F3673A-5982-4CF3-A751-8D004415B369}
+ {7DAE846A-611D-4985-9E7B-2CBDAE6FE8DC}
WinExe
- Properties
PlaylistDownloader
PlaylistDownloader
- v4.5
+ v4.7.2
512
{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
4
true
-
-
+ true
+ publish\
+ true
+ Disk
+ false
+ Foreground
+ 7
+ Days
+ false
+ false
+ true
+ 0
+ 1.0.0.%2a
+ false
+ false
+ true
AnyCPU
@@ -26,7 +39,6 @@
DEBUG;TRACE
prompt
4
- false
AnyCPU
@@ -36,7 +48,6 @@
TRACE
prompt
4
- false
icon.ico
@@ -44,37 +55,80 @@
PlaylistDownloader.App
-
-
- lib\Fizzler.dll
+
+ ..\packages\Manatee.Json.13.0.3\lib\netstandard2.0\Manatee.Json.dll
-
- lib\Fizzler.Systems.HtmlAgilityPack.dll
+
+ ..\packages\LevenshteinMinimumEditDistance.1.2.0\lib\MinimumEditDistance.dll
-
- lib\Fizzler.Systems.XmlNodeQuery.dll
+
+ ..\packages\morelinq.3.3.2\lib\net451\MoreLinq.dll
-
- lib\Fizzler.Tests.dll
-
-
- lib\HtmlAgilityPack.dll
-
-
-
- ..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll
+
+ ..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll
- ..\packages\NLog.4.4.11\lib\net45\NLog.dll
+ ..\packages\NLog.4.7.5\lib\net45\NLog.dll
-
- ..\..\lib\Ookii.Dialogs.Wpf.dll
+
+ ..\packages\Ookii.Dialogs.Wpf.1.1.0\lib\net45\Ookii.Dialogs.Wpf.dll
+
+ ..\packages\System.ComponentModel.Annotations.4.7.0\lib\net461\System.ComponentModel.Annotations.dll
+
+
+
+
+
+
+ ..\packages\System.IO.4.3.0\lib\net462\System.IO.dll
+ True
+ True
+
+
+
+ ..\packages\System.Net.Http.4.3.4\lib\net46\System.Net.Http.dll
+ True
+ True
+
+
+ ..\packages\System.Runtime.4.3.1\lib\net462\System.Runtime.dll
+ True
+ True
+
+
+
+
+ ..\packages\System.Security.Cryptography.Algorithms.4.3.1\lib\net463\System.Security.Cryptography.Algorithms.dll
+ True
+ True
+
+
+ ..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll
+ True
+ True
+
+
+ ..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll
+ True
+ True
+
+
+ ..\packages\System.Security.Cryptography.X509Certificates.4.3.2\lib\net461\System.Security.Cryptography.X509Certificates.dll
+ True
+ True
+
+
+
+
+ ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll
+
+
@@ -92,16 +146,25 @@
MSBuild:Compile
Designer
+
+ Component
+
+
+ DownloadWindow.xaml
+
+
+
SettingsWindow.xaml
+
-
+
MSBuild:Compile
Designer
-
+
MSBuild:Compile
Designer
@@ -109,17 +172,16 @@
App.xaml
Code
-
- Component
-
-
- DownloadWindow.xaml
+
+ MainWindow.xaml
Code
+
+ MSBuild:Compile
+ Designer
+
-
-
Code
@@ -137,73 +199,78 @@
ResXFileCodeGenerator
Resources.Designer.cs
-
- PreserveNewest
- Designer
-
+
SettingsSingleFileGenerator
Settings.Designer.cs
-
-
- Designer
-
+
-
-
+
+ PreserveNewest
+
+
+ PreserveNewest
+
-
+
+
+
+
- PreserveNewest
+ Always
- PreserveNewest
+ Always
- PreserveNewest
+ Always
- PreserveNewest
+ Always
- PreserveNewest
+ Always
- PreserveNewest
+ Always
- PreserveNewest
+ Always
- PreserveNewest
+ Always
- PreserveNewest
+ Always
- PreserveNewest
+ Always
- PreserveNewest
+ Always
-
- PreserveNewest
+ Always
+
+
+ False
+ Microsoft .NET Framework 4.7.2 %28x86 and x64%29
+ true
+
+
+ False
+ .NET Framework 3.5 SP1
+ false
+
+
-
\ No newline at end of file
diff --git a/PlaylistDownloader/PlaylistDownloader/PlaylistDownloader.csproj.user b/PlaylistDownloader/PlaylistDownloader/PlaylistDownloader.csproj.user
index 6cbe588..23c860d 100644
--- a/PlaylistDownloader/PlaylistDownloader/PlaylistDownloader.csproj.user
+++ b/PlaylistDownloader/PlaylistDownloader/PlaylistDownloader.csproj.user
@@ -1,6 +1,14 @@
-
+
ProjectFiles
+ publish\
+
+
+
+
+
+ en-US
+ false
\ No newline at end of file
diff --git a/PlaylistDownloader/PlaylistDownloader/Properties/AssemblyInfo.cs b/PlaylistDownloader/PlaylistDownloader/Properties/AssemblyInfo.cs
index 66f6374..c447279 100644
--- a/PlaylistDownloader/PlaylistDownloader/Properties/AssemblyInfo.cs
+++ b/PlaylistDownloader/PlaylistDownloader/Properties/AssemblyInfo.cs
@@ -11,7 +11,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("PlaylistDownloader")]
-[assembly: AssemblyCopyright("Copyright © Microsoft 2014")]
+[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@@ -50,7 +50,7 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyVersion("1.10.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: NeutralResourcesLanguage("en")]
diff --git a/PlaylistDownloader/PlaylistDownloader/Properties/Resources.Designer.cs b/PlaylistDownloader/PlaylistDownloader/Properties/Resources.Designer.cs
index 686a11a..cfbd6e8 100644
--- a/PlaylistDownloader/PlaylistDownloader/Properties/Resources.Designer.cs
+++ b/PlaylistDownloader/PlaylistDownloader/Properties/Resources.Designer.cs
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
-// Runtime Version:4.0.30319.18444
+// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -19,7 +19,7 @@ namespace PlaylistDownloader.Properties {
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
diff --git a/PlaylistDownloader/PlaylistDownloader/Properties/Settings.Designer.cs b/PlaylistDownloader/PlaylistDownloader/Properties/Settings.Designer.cs
index ce17bc6..7b4b991 100644
--- a/PlaylistDownloader/PlaylistDownloader/Properties/Settings.Designer.cs
+++ b/PlaylistDownloader/PlaylistDownloader/Properties/Settings.Designer.cs
@@ -12,7 +12,7 @@ namespace PlaylistDownloader.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.7.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
diff --git a/PlaylistDownloader/PlaylistDownloader/YoutubeSearcher.cs b/PlaylistDownloader/PlaylistDownloader/YoutubeSearcher.cs
index eda1909..6299b57 100644
--- a/PlaylistDownloader/PlaylistDownloader/YoutubeSearcher.cs
+++ b/PlaylistDownloader/PlaylistDownloader/YoutubeSearcher.cs
@@ -1,97 +1,134 @@
+using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
-using Fizzler.Systems.HtmlAgilityPack;
-using HtmlAgilityPack;
+using System.Web.UI.WebControls;
+using Manatee.Json;
+using Manatee.Json.Path;
+using Manatee.Json.Pointer;
+using MinimumEditDistance;
using NLog;
+using MoreLinq;
-namespace PlaylistDownloader
-{
- public static class YoutubeSearcher
- {
- private const string URL = "http://www.youtube.com/results?search_query={0}&page={1}";
+namespace PlaylistDownloader {
+ public class Person {
+ public string name;
+ public string email;
+ }
+
+ public static class YoutubeSearcher {
+ private const string URL = "http://www.youtube.com/results?search_query={0}&page={1}";
private static Logger logger = LogManager.GetCurrentClassLogger();
- public static IEnumerable GetYoutubeLinks(string query, int numberOfResults = 1)
- {
- List links = new List();
-
- if (query.StartsWith("http"))
- {
- // Get title
- HtmlDocument doc = new HtmlDocument();
- doc.LoadHtml(GetWebPageCode(query));
- HtmlNode node = doc.DocumentNode.QuerySelector(".watch-title-container .watch-title");
-
+ public static IEnumerable GetYoutubeLinks(string query, int numberOfResults = 1) {
+ List links = null;
- links.Add(new YoutubeLink { Url = query, Label = node.InnerText });
- }
- else
- {
+ if (query.StartsWith("http")) {
+ // Get title
+ links = GetLinksFromUrl(query);
+ } else {
int page = 1;
- while (page < 20 && links.Count < numberOfResults)
- {
+ while (page < 20 && (links == null || links.Count < numberOfResults)) {
string requestUrl = string.Format(URL, HttpUtility.UrlEncode(query)?.Replace("%20", "+"), page);
- HtmlDocument doc = new HtmlDocument();
- doc.LoadHtml(GetWebPageCode(requestUrl));
- IEnumerable nodes = doc.DocumentNode.QuerySelectorAll("#results h3 > a");
- // TODO expand youtube playlist into seperate songs
- links.AddRange(nodes.Where(n => !n.Attributes["href"].Value.Contains("&list=")).Select(n => new YoutubeLink { Url = "http://www.youtube.com" + n.Attributes["href"].Value, Label = n.Attributes["title"].Value }));
+ links = GetLinksFromUrl(query);
+
page++;
}
}
- return links;
-
- // TODO 040 make sure program correctly stops if page is not existent => message to user
- }
-
- private static string GetWebPageCode(string url)
- {
- HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
- HttpWebResponse response = (HttpWebResponse)request.GetResponse();
- if (response.StatusCode == HttpStatusCode.OK)
- {
- Stream receiveStream = response.GetResponseStream();
- if (receiveStream != null)
- {
- StreamReader readStream;
- if (response.CharacterSet == null)
- {
- readStream = new StreamReader(receiveStream);
- }
- else
- {
- readStream = new StreamReader(receiveStream, Encoding.GetEncoding(response.CharacterSet));
- }
- string data = readStream.ReadToEnd();
- response.Close();
- readStream.Close();
- return data;
- }
- else
- {
- logger.Warn("No response from " + url);
- }
+
+ List uniqueLinks = links.DistinctBy((link) => link.Label).DistinctBy((link) => link.Url).ToList();
+ Dictionary distances = uniqueLinks.Select(link => new KeyValuePair(link.Label, Levenshtein.CalculateDistance(link.Label, query, 1))).ToDictionary(x => x.Key, x => x.Value);
+ return uniqueLinks.OrderBy(link => distances[link.Label]);
+
+ // TODO 040 make sure program correctly stops if page is not existent => message to user
+ }
+
+ private static List GetLinksFromUrl(string url) {
+ List links = new List();
+ string html = GetWebPageCode(url);
+ string initialDataLine = html.Split('\n').FirstOrDefault((line) => line.Contains("window[\"ytInitialData\"] = ") || line.Contains("var ytInitialData = "));
+ if (initialDataLine == null) {
+ return links;
+ }
+ string jsonData = initialDataLine
+ .Split(new[] { "window[\"ytInitialData\"] = " }, StringSplitOptions.None)
+ .Last()
+ .Split(new[] { "var ytInitialData = " }, StringSplitOptions.None)
+ .Last()
+ .Trim(' ')
+ .Trim(';');
+
+ JsonValue jsonObject = JsonValue.Parse(jsonData);
+
+ if (jsonObject == null) {
+ return links;
+ }
+
+ List videos = new List(){
+ JsonPath.Parse("$..videoPrimaryInfoRenderer").Evaluate(jsonObject),
+ JsonPath.Parse("$..childVideoRenderer").Evaluate(jsonObject),
+ JsonPath.Parse("$..videoRenderer").Evaluate(jsonObject)
+ };
+
+ JsonPointer videoIdPointer = new JsonPointer { "videoId" };
+ JsonPointer videoTitlePointer = new JsonPointer { "title", "simpleText" };
+ JsonPointer videoTitlePointer2 = new JsonPointer { "title", "runs", "0", "text" };
+ videos.ToList().ForEach((videoArray, videoArrayIndex) => {
+ videoArray.ToList().ForEach((videoInfo) => {
+ string json = videoInfo.ToString();
+ PointerEvaluationResults videoIdResults = videoIdPointer.Evaluate(videoInfo);
+ PointerEvaluationResults videoTitleResults = videoTitlePointer.Evaluate(videoInfo);
+ PointerEvaluationResults videoTitleResults2 = videoTitlePointer2.Evaluate(videoInfo);
+
+ string videoId = videoIdResults?.Result?.String;
+ string videoTitle = videoTitleResults?.Result?.String ?? videoTitleResults2?.Result?.String;
+ if ((videoId != null || videoArrayIndex == 0) && videoTitle != null) {
+ string videoUrl = videoId == null ? url : ("https://www.youtube.com/watch?v=" + videoId);
+ links.Add(new YoutubeLink { Url = videoUrl, Label = videoTitle });
+ }
+ });
+ });
+
+ return links;
+ }
+
+ private static string GetWebPageCode(string url) {
+ HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
+ HttpWebResponse response = (HttpWebResponse)request.GetResponse();
+ if (response.StatusCode == HttpStatusCode.OK) {
+ Stream receiveStream = response.GetResponseStream();
+ if (receiveStream != null) {
+ StreamReader readStream;
+ if (response.CharacterSet == null) {
+ readStream = new StreamReader(receiveStream);
+ } else {
+ readStream = new StreamReader(receiveStream, Encoding.GetEncoding(response.CharacterSet));
+ }
+ string data = readStream.ReadToEnd();
+ response.Close();
+ readStream.Close();
+ return data;
+ } else {
+ logger.Warn("No response from " + url);
+ }
return null;
- }
- return null;
- }
- }
-
- public class YoutubeLink
- {
- private string _label;
-
- public string Label
- {
- get { return _label; }
- set { _label =HttpUtility.HtmlDecode(value); }
- }
-
- public string Url { get; set; }
- }
+ }
+ return null;
+ }
+ }
+
+ public class YoutubeLink {
+ private string _label;
+
+ public string Label {
+ get { return _label; }
+ set { _label = HttpUtility.HtmlDecode(value); }
+ }
+
+ public string Url { get; set; }
+ }
}
\ No newline at end of file
diff --git a/PlaylistDownloader/PlaylistDownloader/lib/Fizzler.Systems.HtmlAgilityPack.dll b/PlaylistDownloader/PlaylistDownloader/lib/Fizzler.Systems.HtmlAgilityPack.dll
deleted file mode 100644
index e168a10..0000000
Binary files a/PlaylistDownloader/PlaylistDownloader/lib/Fizzler.Systems.HtmlAgilityPack.dll and /dev/null differ
diff --git a/PlaylistDownloader/PlaylistDownloader/lib/Fizzler.Systems.XmlNodeQuery.dll b/PlaylistDownloader/PlaylistDownloader/lib/Fizzler.Systems.XmlNodeQuery.dll
deleted file mode 100644
index e0f79be..0000000
Binary files a/PlaylistDownloader/PlaylistDownloader/lib/Fizzler.Systems.XmlNodeQuery.dll and /dev/null differ
diff --git a/PlaylistDownloader/PlaylistDownloader/lib/Fizzler.Tests.dll b/PlaylistDownloader/PlaylistDownloader/lib/Fizzler.Tests.dll
deleted file mode 100644
index 2063722..0000000
Binary files a/PlaylistDownloader/PlaylistDownloader/lib/Fizzler.Tests.dll and /dev/null differ
diff --git a/PlaylistDownloader/PlaylistDownloader/lib/Fizzler.dll b/PlaylistDownloader/PlaylistDownloader/lib/Fizzler.dll
deleted file mode 100644
index d01d8bd..0000000
Binary files a/PlaylistDownloader/PlaylistDownloader/lib/Fizzler.dll and /dev/null differ
diff --git a/PlaylistDownloader/PlaylistDownloader/lib/HtmlAgilityPack.dll b/PlaylistDownloader/PlaylistDownloader/lib/HtmlAgilityPack.dll
deleted file mode 100644
index 227af83..0000000
Binary files a/PlaylistDownloader/PlaylistDownloader/lib/HtmlAgilityPack.dll and /dev/null differ
diff --git a/PlaylistDownloader/PlaylistDownloader/packages.config b/PlaylistDownloader/PlaylistDownloader/packages.config
index 733a7f1..e203174 100644
--- a/PlaylistDownloader/PlaylistDownloader/packages.config
+++ b/PlaylistDownloader/PlaylistDownloader/packages.config
@@ -1,6 +1,19 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/PlaylistDownloader/PlaylistDownloader/utils/Utils.cs b/PlaylistDownloader/PlaylistDownloader/utils/Utils.cs
new file mode 100644
index 0000000..76112fd
--- /dev/null
+++ b/PlaylistDownloader/PlaylistDownloader/utils/Utils.cs
@@ -0,0 +1,10 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PlaylistDownloader1.utils {
+ class Utils {
+ }
+}
diff --git a/README.md b/README.md
index c9fe727..dc8448f 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
-PlaylistDownloader 1.9.3
-========================
+PlaylistDownloader 1.10.0
+=========================
Download your whole playlist with one click of a button
@@ -21,7 +21,7 @@ Features
Development
===========
-This program is written using visual studio 2017
+This program is written using visual studio 2019
Tests