From 0daf7184e15e5b0b5b83d2273adfe7b145ea2a0c Mon Sep 17 00:00:00 2001 From: sergiotarxz Date: Tue, 29 Dec 2020 07:27:16 +0100 Subject: [PATCH] Making the webpage system installed also. --- MANIFEST | 7 ++++--- bin/peertube-dl-web | 11 +++++++++-- {public => lib/Peertube/DL/public}/css/index.css | 0 {public => lib/Peertube/DL/public}/index.html | 0 .../Peertube/DL/public}/js/peertube-dl-web.js | 0 5 files changed, 13 insertions(+), 5 deletions(-) rename {public => lib/Peertube/DL/public}/css/index.css (100%) rename {public => lib/Peertube/DL/public}/index.html (100%) rename {public => lib/Peertube/DL/public}/js/peertube-dl-web.js (100%) diff --git a/MANIFEST b/MANIFEST index bace6a7..4d35a46 100644 --- a/MANIFEST +++ b/MANIFEST @@ -3,16 +3,17 @@ AUTHORS bin/peertube-dl bin/peertube-dl-web cpanfile +lib/Peertube/DL.pm lib/Peertube/DL/Downloaders.pm +lib/Peertube/DL/public/css/index.css +lib/Peertube/DL/public/index.html +lib/Peertube/DL/public/js/peertube-dl-web.js lib/Peertube/DL/URLHandler.pm lib/Peertube/DL/UserAgent.pm lib/Peertube/DL/Utils.pm LICENSE Makefile.PL MANIFEST This list of files -public/css/index.css -public/index.html -public/js/peertube-dl-web.js README.md t/00-use_ok.t t/downloaders/animeflv_example_response.html diff --git a/bin/peertube-dl-web b/bin/peertube-dl-web index e7457bd..ec32280 100755 --- a/bin/peertube-dl-web +++ b/bin/peertube-dl-web @@ -1,6 +1,13 @@ #!/usr/bin/env perl use Mojolicious::Lite -signatures; + +use strict; +use warnings; + +use feature 'say'; + use Peertube::DL::URLHandler; +use Peertube::DL; get '/' => sub { my $c = shift; @@ -31,7 +38,7 @@ post '/proxy_to_get' => sub { ); }; -push @{ app->renderer->paths }, ('./templates'); -push @{ app->static->paths }, ('./public'); +push @{ app->renderer->paths }, ( Peertube::DL::getDir() . '/Peertube/DL/templates' ); +push @{ app->static->paths }, ( Peertube::DL::getDir() . '/Peertube/DL/public' ); app->start; diff --git a/public/css/index.css b/lib/Peertube/DL/public/css/index.css similarity index 100% rename from public/css/index.css rename to lib/Peertube/DL/public/css/index.css diff --git a/public/index.html b/lib/Peertube/DL/public/index.html similarity index 100% rename from public/index.html rename to lib/Peertube/DL/public/index.html diff --git a/public/js/peertube-dl-web.js b/lib/Peertube/DL/public/js/peertube-dl-web.js similarity index 100% rename from public/js/peertube-dl-web.js rename to lib/Peertube/DL/public/js/peertube-dl-web.js