Put external dependencies into dedicated directories
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
[youtube] eJsTaFRsa_k: Downloading webpage
|
||||
[youtube] Downloading just video eJsTaFRsa_k because of --no-playlist
|
||||
[youtube] eJsTaFRsa_k: Downloading js player 12237e3d
|
||||
[youtube] eJsTaFRsa_k: Downloading js player 12237e3d
|
||||
[download] Destination: dlcache\download\1KmyoJ.webm
|
||||
[download] 0.0% of 6.60MiB at 249.94KiB/s ETA 00:27
|
||||
[download] 0.0% of 6.60MiB at 749.83KiB/s ETA 00:09
|
||||
[download] 0.1% of 6.60MiB at 1.71MiB/s ETA 00:03
|
||||
[download] 0.2% of 6.60MiB at 3.66MiB/s ETA 00:01
|
||||
[download] 0.5% of 6.60MiB at 1.59MiB/s ETA 00:04
|
||||
[download] 0.9% of 6.60MiB at 1.71MiB/s ETA 00:03
|
||||
[download] 1.9% of 6.60MiB at 2.48MiB/s ETA 00:02
|
||||
[download] 3.8% of 6.60MiB at 3.61MiB/s ETA 00:01
|
||||
[download] 7.6% of 6.60MiB at 5.73MiB/s ETA 00:01
|
||||
[download] 15.1% of 6.60MiB at 8.32MiB/s ETA 00:00
|
||||
[download] 30.3% of 6.60MiB at 14.17MiB/s ETA 00:00
|
||||
[download] 60.6% of 6.60MiB at 17.77MiB/s ETA 00:00
|
||||
[download] 100.0% of 6.60MiB at 28.45MiB/s ETA 00:00
|
||||
[download] 100% of 6.60MiB in 00:00
|
||||
[ffmpeg] Destination: dlcache\download\1KmyoJ.mp3
|
||||
Deleting original file dlcache\download\1KmyoJ.webm (pass -k to keep)
|
@@ -90,7 +90,7 @@ void HttpServer::EventHandler(mg_connection* pNc, int ev, void* p)
|
||||
}
|
||||
else if (requestedUri.substr(0, 9) == "/download")
|
||||
{
|
||||
ServeDownloadedResource(pNc, ev, p, requestedUri);
|
||||
ServeDownloadeableResource(pNc, ev, p, requestedUri);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -151,7 +151,7 @@ void HttpServer::ProcessAPIRequest(mg_connection* pNc, int ev, void* p)
|
||||
return;
|
||||
}
|
||||
|
||||
void HttpServer::ServeDownloadedResource(mg_connection* pNc, int ev, void* p, std::string uri)
|
||||
void HttpServer::ServeDownloadeableResource(mg_connection* pNc, int ev, void* p, std::string uri)
|
||||
{
|
||||
std::string fileId = uri.substr(10, uri.length() - 10);
|
||||
|
||||
@@ -165,7 +165,6 @@ void HttpServer::ServeDownloadedResource(mg_connection* pNc, int ev, void* p, st
|
||||
std::string downloadedFilename = entry.title + (entry.mode == Downloader::DOWNLOAD_MODE::AUDIO ? ".mp3" : ".mp4");
|
||||
|
||||
ss << "Access-Control-Allow-Origin: *\nContent-Disposition: attachment; filename=\"" << downloadedFilename << "\"\nPragma: public\nCache-Control: must-revalidate, post-check=0, pre-check=0";
|
||||
|
||||
mg_http_serve_file(pNc, (http_message*)p, entry.downloaded_filename.c_str(), mg_mk_str("application/octet-stream"), mg_mk_str(ss.str().c_str()));
|
||||
}
|
||||
else
|
||||
|
@@ -2,7 +2,7 @@
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include "mongoose.h"
|
||||
#include "external_dependencies/casenta/mongoose/mongoose.h"
|
||||
#include "Logger.h"
|
||||
#include "RestResponseTemplates.h"
|
||||
#include "RestQueryHandler.h"
|
||||
@@ -23,7 +23,7 @@ namespace Rest
|
||||
private:
|
||||
bool InitWebServer();
|
||||
static void ProcessAPIRequest(struct mg_connection* pNc, int ev, void* p);
|
||||
static void ServeDownloadedResource(struct mg_connection* pNc, int ev, void* p, std::string uri);
|
||||
static void ServeDownloadeableResource(struct mg_connection* pNc, int ev, void* p, std::string uri);
|
||||
|
||||
static void EventHandler(struct mg_connection* pNc, int ev, void* p);
|
||||
static void ServeStringToConnection(struct mg_connection* c, std::string str, int httpStatusCode = 200);
|
||||
|
@@ -6,7 +6,7 @@
|
||||
#include <fstream>
|
||||
#include "LogTypes.h"
|
||||
#include "XGConfig.h"
|
||||
#include "JasonPP.hpp"
|
||||
#include "external_dependencies/leonetienne/JasonPP/JasonPP.hpp"
|
||||
|
||||
namespace Logging
|
||||
{
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include "JasonPP.hpp"
|
||||
#include "external_dependencies/leonetienne/JasonPP/JasonPP.hpp"
|
||||
#include "RestResponseTemplates.h"
|
||||
#include "XGControl.h"
|
||||
#include "Logger.h"
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include "JasonPP.hpp"
|
||||
#include "external_dependencies/leonetienne/JasonPP/JasonPP.hpp"
|
||||
|
||||
namespace Rest
|
||||
{
|
||||
|
@@ -145,13 +145,13 @@
|
||||
<ItemGroup>
|
||||
<ClCompile Include="ConsoleManager.cpp" />
|
||||
<ClCompile Include="DownloadManager.cpp" />
|
||||
<ClCompile Include="external_dependencies\casenta\mongoose\mongoose.c" />
|
||||
<ClCompile Include="external_dependencies\leonetienne\JasonPP\JasonPP.cpp" />
|
||||
<ClCompile Include="FileSystem.cpp" />
|
||||
<ClCompile Include="Framework.cpp" />
|
||||
<ClCompile Include="JasonPP.cpp" />
|
||||
<ClCompile Include="Logger.cpp" />
|
||||
<ClCompile Include="LogHistory.cpp" />
|
||||
<ClCompile Include="main.cpp" />
|
||||
<ClCompile Include="mongoose.c" />
|
||||
<ClCompile Include="RestQueryHandler.cpp" />
|
||||
<ClCompile Include="RestResponseTemplates.cpp" />
|
||||
<ClCompile Include="HttpServer.cpp" />
|
||||
@@ -161,13 +161,13 @@
|
||||
<ItemGroup>
|
||||
<ClInclude Include="ConsoleManager.h" />
|
||||
<ClInclude Include="DownloadManager.h" />
|
||||
<ClInclude Include="external_dependencies\casenta\mongoose\mongoose.h" />
|
||||
<ClInclude Include="external_dependencies\leonetienne\JasonPP\JasonPP.hpp" />
|
||||
<ClInclude Include="FileSystem.h" />
|
||||
<ClInclude Include="Framework.h" />
|
||||
<ClInclude Include="JasonPP.hpp" />
|
||||
<ClInclude Include="Logger.h" />
|
||||
<ClInclude Include="LogHistory.h" />
|
||||
<ClInclude Include="LogTypes.h" />
|
||||
<ClInclude Include="mongoose.h" />
|
||||
<ClInclude Include="RestQueryHandler.h" />
|
||||
<ClInclude Include="RestResponseTemplates.h" />
|
||||
<ClInclude Include="HttpServer.h" />
|
||||
|
@@ -21,12 +21,6 @@
|
||||
<ClCompile Include="main.cpp">
|
||||
<Filter>Quelldateien</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="JasonPP.cpp">
|
||||
<Filter>_external_dependencies</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="mongoose.c">
|
||||
<Filter>_external_dependencies</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Logger.cpp">
|
||||
<Filter>Quelldateien</Filter>
|
||||
</ClCompile>
|
||||
@@ -60,14 +54,14 @@
|
||||
<ClCompile Include="ConsoleManager.cpp">
|
||||
<Filter>Quelldateien</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="external_dependencies\casenta\mongoose\mongoose.c">
|
||||
<Filter>_external_dependencies</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="external_dependencies\leonetienne\JasonPP\JasonPP.cpp">
|
||||
<Filter>_external_dependencies</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="JasonPP.hpp">
|
||||
<Filter>_external_dependencies</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="mongoose.h">
|
||||
<Filter>_external_dependencies</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Logger.h">
|
||||
<Filter>Headerdateien</Filter>
|
||||
</ClInclude>
|
||||
@@ -104,5 +98,11 @@
|
||||
<ClInclude Include="ConsoleManager.h">
|
||||
<Filter>Headerdateien</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="external_dependencies\casenta\mongoose\mongoose.h">
|
||||
<Filter>_external_dependencies</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="external_dependencies\leonetienne\JasonPP\JasonPP.hpp">
|
||||
<Filter>_external_dependencies</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include "Filesystem.h"
|
||||
#include "JasonPP.hpp"
|
||||
#include "external_dependencies/leonetienne/JasonPP/JasonPP.hpp"
|
||||
#include "Logger.h"
|
||||
|
||||
#define XGCONFIG_FILE "config.json"
|
||||
|
Reference in New Issue
Block a user