From 94b5e30969b37d60dddef7357955c8f63562d6bd Mon Sep 17 00:00:00 2001 From: Nick Leffler Date: Wed, 27 Sep 2017 08:11:26 -0400 Subject: [PATCH] Translated to english and added pwd as url base --- README.md | 206 ++++++++++++++++++++----------------------- app.js | 16 ++-- routes/channel.js | 2 +- routes/index.js | 2 +- routes/movie.js | 2 +- routes/show_list.js | 2 +- views/channel.jade | 12 +-- views/index.jade | 4 +- views/layout.jade | 6 +- views/movie.jade | 6 +- views/show.jade | 14 +-- views/show_list.jade | 8 +- 12 files changed, 131 insertions(+), 149 deletions(-) diff --git a/README.md b/README.md index 79f4d74..38a9b46 100644 --- a/README.md +++ b/README.md @@ -1,151 +1,133 @@ + Plex Web Downloader =============== -Ce projet permet de créer une liste de vos fichiers vidéo plex et de les partager aux travers d'une interface web. +This project allows you to create a list of your plex video files and to share them through a web interface. +************************************************************************************************************************************** +I would recomend setting up a crontab that backups the plex database every night then have this use the new file that has been created that way this doesn't lock the plex database +*************************************************************************************************************************************** - -INSTALLATION FACILE +MANUAL INSTALLATION -------------------- -Télécharger notre version pré-packagé: +If you prefer to compile the latest version of the project yourself, or if your operating system is not supported: -Pour Windows 64 bits (testé sur Seven) - [Plex Web Download pour Windows 64bits](http://dl.weberantoine.fr/download.php?file=plex_wd_win64.zip) +** On Windows ** -Pour MacOS 64 bits ( testé sur Yosemite ) - [Plex Web Download pour MacOS 64bits](http://dl.weberantoine.fr/download.php?file=plex_wd_osx64.zip) +  prerequisites, install git (https://git-scm.com/download/win) -Puis éditer le fichier de configuration pour fournir le chemin vers votre bdd plex. -(Vous pouvez aussi y parametrer un theme, et un user/mot de passe) +  prerequisites, install nodejs 0.12.x (https://nodejs.org/dist/v0.12.7/) -Ensuite ouvrez votre navigateur vers http://localhost:3000/ et enjoy :) +  open the 'cmb' command prompt, and then move to a directory where you want to install -( Vous n'avez plus qu'à rediriger les ports de votre routeur pour partager ce lien avec votre IP public) +    git clone https://github.com/12nick12/pwd.git -![Aperçu](/public/screenshot.png?raw=true) +    cd plex-web-downloader + +    npm install + +  modify the file config.js, to put the path of the database plex (attention must double the anti-slash and protect the spaces) + +  For example: C: \\ Users \\ yourUsername \\ AppData \\ Local \\ Plex \ Media \ Server \\ Plug-in \ Support \\ Databases \\ com.plexapp.plugins.library.db + +    npm start + +  then open in your browser the address http: // localhost: 3000 -INSTALLATION MANUELLE +** Under MacOS ** + +  prerequisites, nodejs + +    brew install node + +  then + +    git clone https://github.com/12nick12/pwd.git + +    cd plex-web-downloader + +    npm install + +  modify the file config.js, to put the path of the database plex + +  example: / Users / yourUsername / Library / Application Support / Plex Media Server / Plug-in Support / Databases / com.plexapp.plugins.library.db + +    npm start + +  then open in your browser the address http: // localhost: 3000 + + +** Under Ubuntu ** + +  prerequisites nodejs, or + +    apt-get install nodejs + +    ln -s / usr / bin / nodejs / usr / local / bin / node + +  then move to your directory to install and: + +    git clone https://github.com/12nick12/pwd.git + +    cd plex-web-downloader + +    npm install + +  modify the file config.js, to put the path of the database plex + +  Example: / home / yourUsername / plex-config / Plex Media Server / Plug-in Support / Databases / com.plexapp.plugins.library.db + +    npm start + +  then open in your browser the address http: // localhost: 3000 + + + +DEVELOPMENT -------------------- -Si vous préférez compiler vous-même la derniere version du projet, ou si votre système d'exploitation n'est pas supporter: +** the project was originally created with ** -**Sur Windows** +    node install express -g - pré requis, installer git ( https://git-scm.com/download/win ) +    node install express-generator -g - pré requis, installer nodejs 0.12.x ( https://nodejs.org/dist/v0.12.7/ ) +    express project_name - ouvrir l'invite de commande 'cmb', puis se deplacer dans un repertoire où vous voulez installer +    cd project_name - git clone https://github.com/TwanoO67/plex-web-downloader.git +    npm install - cd plex-web-downloader +** to install plex (from a dockerfile) ** - npm install +    mkdir ~ / plex-config - modifier le fichier config.js, pour y mettre le chemin de la base de données plex (attention il faut doubler les anti-slash et proteger les espaces ) +    sudo chown 797: 797 -R ~ / plex-config - exemple: C:\\Users\\yourUsername\\AppData\\Local\\Plex\ Media\ Server\\Plug-in\ Support\\Databases\\com.plexapp.plugins.library.db +    sudo docker -d --restart = always -v ~ / plex-config: / config -v ~ / Movies: / media / plex -p 32400: 32400 wernight / plex-media-server - npm start +    sudo chmod 777 ~ / plex-config / Plex \ Media \ Server / Plug-in / Support / Databases / * - puis ouvrir dans votre navigateur l'adresse http://localhost:3000 +    sudo chmod 777 ~ / Movies +    sudo ln -s ~ / Movies / media / plex -**Sous MacOS** - - pré requis, nodejs - - brew install node - - ensuite - - git clone https://github.com/TwanoO67/plex-web-downloader.git - - cd plex-web-downloader - - npm install - - modifier le fichier config.js, pour y mettre le chemin de la base de données plex - - exemple: /Users/yourUsername/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db - - npm start - - puis ouvrir dans votre navigateur l'adresse http://localhost:3000 - - -**Sous Ubuntu** - - pré requis nodejs, ou - - apt-get install nodejs - - ln -s /usr/bin/nodejs /usr/local/bin/node - - puis, se déplacer dans votre repertoire pour l'install et : - - git clone https://github.com/TwanoO67/plex-web-downloader.git - - cd plex-web-downloader - - npm install - - modifier le fichier config.js, pour y mettre le chemin de la base de données plex - - exemple: /home/yourUsername/plex-config/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db - - npm start - - puis ouvrir dans votre navigateur l'adresse http://localhost:3000 - - - -DEVELOPPEMENT --------------------- - -**le projet a été créée initialement avec** - - node install express -g - - node install express-generator -g - - express nom_du_projet - - cd nom_du_projet - - npm install - -**pour installer plex (depuis un dockerfile)** - - mkdir ~/plex-config - - sudo chown 797:797 -R ~/plex-config - - sudo docker run -d --restart=always -v ~/plex-config:/config -v ~/Movies:/media/plex -p 32400:32400 wernight/plex-media-server - - sudo chmod 777 ~/plex-config/Plex\ Media\ Server/Plug-in\ Support/Databases/* - - sudo chmod 777 ~/Movies - - sudo ln -s ~/Movies /media/plex - -puis configurer vos chaines sur: http://localhost:32400/web/index.html +then configure your channels on: http: // localhost: 32400 / web / index.html COMPILATION -------------------- - npm install enclose -g +    npm install enclose -g - enclose -o bin/mac_bin --loglevel info -c enclose_config.js -v 0.12.7 ./bin/www +      enclose -o bin / mac_bin --loglevel info -c enclose_config.js -v 0.12.7 ./bin/www -TODO Liste +TODO List -------------------- -* Gérer les images des vignettes -* Gérer les téléchargements multi-source en proposant un lien aria2 (voir aria2.sourceforge.net) -* Intégré web ui: http://ziahamza.github.io/webui-aria2/ -* Mettre en place une limite d'upload activable à la demande +* Manage thumbnail images +* Manage multi-source downloads by offering a link aria2 (see aria2.sourceforge.net) +* Integrated web ui: http://ziahamza.github.io/webui-aria2/ +* Set up an upload limit that can be activated on demand diff --git a/app.js b/app.js index 9a71faf..fb6b53b 100644 --- a/app.js +++ b/app.js @@ -45,14 +45,14 @@ app.use(cookieParser()); app.use(express.static(path.join(__dirname, 'public'))); -app.use('/', require('./routes/index')); -app.use('/users', require('./routes/users')); -app.use('/file', require('./routes/file')); -app.use('/channel', require('./routes/channel')); -app.use('/movie', require('./routes/movie')); -app.use('/show_list', require('./routes/show_list')); -app.use('/show', require('./routes/show')); -app.use('/divers', require('./routes/divers')); +app.use('/pwd/', require('./routes/index')); +app.use('/pwd/users', require('./routes/users')); +app.use('/pwd/file', require('./routes/file')); +app.use('/pwd/channel', require('./routes/channel')); +app.use('/pwd/movie', require('./routes/movie')); +app.use('/pwd/show_list', require('./routes/show_list')); +app.use('/pwd/show', require('./routes/show')); +app.use('/pwd/divers', require('./routes/divers')); // catch 404 and forward to error handler app.use(function(req, res, next) { diff --git a/routes/channel.js b/routes/channel.js index dd8675c..cb58695 100644 --- a/routes/channel.js +++ b/routes/channel.js @@ -49,7 +49,7 @@ router.get('/:id', function(req, res, next) { }, //aprés toute les opération de la base function() { - res.render('channel', { title: 'Liste des vidéos',videos: data, channel: channel_info }); + res.render('channel', { title: 'List of videos',videos: data, channel: channel_info }); }); }); diff --git a/routes/index.js b/routes/index.js index c815b37..5e529d9 100644 --- a/routes/index.js +++ b/routes/index.js @@ -24,7 +24,7 @@ router.get('/', function(req, res, next) { }, //aprés toute les opération de la base function() { - res.render('index', { title: 'Liste des channel',channels: data, presentation: config.presentation }); + res.render('index', { title: 'List of videos',channels: data, presentation: config.presentation }); }); }); diff --git a/routes/movie.js b/routes/movie.js index 368a512..d040f27 100644 --- a/routes/movie.js +++ b/routes/movie.js @@ -41,7 +41,7 @@ router.get('/:id', function(req, res, next) { row.file.push(ligne); },function(){ - res.render('movie', { title: 'Détail vidéo',movie: row }); + res.render('movie', { title: 'Video Detail',movie: row }); }); }); diff --git a/routes/show_list.js b/routes/show_list.js index 8dc7c49..0b8a70e 100644 --- a/routes/show_list.js +++ b/routes/show_list.js @@ -20,7 +20,7 @@ router.get('/:id', function(req, res, next) { //aprés toute les opération de la base function(){ console.log(shows); - res.render('show_list', { title: 'Liste des séries',shows: shows, channel_id: req.params.id }); + res.render('show_list', { title: 'List of series',shows: shows, channel_id: req.params.id }); }); }); diff --git a/views/channel.jade b/views/channel.jade index a8016f9..b84cc59 100644 --- a/views/channel.jade +++ b/views/channel.jade @@ -6,21 +6,21 @@ block content table(id="example", class="table table-striped table-bordered", cellspacing="0", width="100%") thead tr - th Nom - th Durée - th Année + th Name + th duration + th Year tbody each video, i in videos tr td - a(href="/movie/#{video.id}") #{video.title}  - td= video.duree + a(href="/pwd/movie/#{video.id}") #{video.title}  + td= video.duration td= video.year script. $(document).ready(function() { $('#example').DataTable({ "language": { - "url": "//cdn.datatables.net/plug-ins/1.10.8/i18n/French.json" + "url": "//cdn.datatables.net/plug-ins/1.10.8/i18n/English.json" } }); }); diff --git a/views/index.jade b/views/index.jade index e225744..3f41b8c 100644 --- a/views/index.jade +++ b/views/index.jade @@ -11,6 +11,6 @@ block content each channel, i in channels li if(channel.type == 2) - a(href="/show_list/#{channel.id}")= channel.name + a(href="/pwd/show_list/#{channel.id}")= channel.name else - a(href="/channel/#{channel.id}")= channel.name + a(href="/pwd/channel/#{channel.id}")= channel.name diff --git a/views/layout.jade b/views/layout.jade index f88550e..1994348 100644 --- a/views/layout.jade +++ b/views/layout.jade @@ -16,16 +16,16 @@ html button.navbar-toggle(type="button",data-toggle="collapse",data-target="#collapse-menu") span.sr-only Toggle navigation i.fa.fa-bars - a.navbar-brand(href="/") + a.navbar-brand(href="/pwd/") b Plex  | Web Downloader div#collapse-menu.collapse.navbar-collapse ul.nav.navbar-nav.navbar-right li.active - a(href="/") Accueil + a(href="/pwd/") Home li - a(href="/divers") Divers + a(href="/pwd/divers") Divers div.wrapper div.container diff --git a/views/movie.jade b/views/movie.jade index 16f50c2..b53ba50 100644 --- a/views/movie.jade +++ b/views/movie.jade @@ -3,17 +3,17 @@ extends layout block content h1= movie.title - a(href="#",onclick="window.history.back();") Retour à la liste + a(href="#",onclick="window.history.back();") back to the list br br label Note p= movie.rating - label Télécharger + label Download br each file, i in movie.file - a(href="/file/#{file.id}/#{file.filename}") #{file.size} #{file.filename} + a(href="/pwd/file/#{file.id}/#{file.filename}") #{file.size} #{file.filename} br br label Résumé diff --git a/views/show.jade b/views/show.jade index 7e9d6d8..431d4d2 100644 --- a/views/show.jade +++ b/views/show.jade @@ -3,28 +3,28 @@ extends layout block content h1= title - a(href="/show_list/#{channel_id}") Retour à la liste des séries + a(href="/pwd/show_list/#{channel_id}") Back to the list of series br br table(id="example", class="table table-striped table-bordered", cellspacing="0", width="100%") thead tr - th Nom - th Saison & Episode - th Durée + th Name + th Season & Episode + th duration tbody each video, i in videos tr td - a(href="/movie/#{video.id}") #{video.titre}  + a(href="/pwd/movie/#{video.id}") #{video.titre}  td= video.season_episode - td= video.duree + td= video.duration script. $(document).ready(function() { $('#example').DataTable({ "language": { - "url": "//cdn.datatables.net/plug-ins/1.10.8/i18n/French.json" + "url": "//cdn.datatables.net/plug-ins/1.10.8/i18n/English.json" } }); }); diff --git a/views/show_list.jade b/views/show_list.jade index e3fd721..4f67a15 100644 --- a/views/show_list.jade +++ b/views/show_list.jade @@ -6,19 +6,19 @@ block content table(id="example", class="table table-striped table-bordered", cellspacing="0", width="100%") thead tr - th Série - th Année + th Series + th Year tbody each show, i in shows tr td - a(href="/show/#{show.id}/#{channel_id}")= show.title + a(href="/pwd/show/#{show.id}/#{channel_id}")= show.title td= show.year script. $(document).ready(function() { $('#example').DataTable({ "language": { - "url": "//cdn.datatables.net/plug-ins/1.10.8/i18n/French.json" + "url": "//cdn.datatables.net/plug-ins/1.10.8/i18n/English.json" } }); });