Translated to english and added pwd as url base

This commit is contained in:
Nick Leffler 2017-09-27 08:11:26 -04:00
parent b2f849e738
commit 94b5e30969
12 changed files with 131 additions and 149 deletions

206
README.md
View File

@ -1,151 +1,133 @@
Plex Web Downloader 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
***************************************************************************************************************************************
MANUAL INSTALLATION
INSTALLATION FACILE
-------------------- --------------------
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) ** On Windows **
[Plex Web Download pour Windows 64bits](http://dl.weberantoine.fr/download.php?file=plex_wd_win64.zip)
Pour MacOS 64 bits ( testé sur Yosemite )   prerequisites, install git (https://git-scm.com/download/win)
[Plex Web Download pour MacOS 64bits](http://dl.weberantoine.fr/download.php?file=plex_wd_osx64.zip)
Puis éditer le fichier de configuration pour fournir le chemin vers votre bdd plex.   prerequisites, install nodejs 0.12.x (https://nodejs.org/dist/v0.12.7/)
(Vous pouvez aussi y parametrer un theme, et un user/mot de passe)
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** then configure your channels on: http: // localhost: 32400 / web / index.html
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
COMPILATION 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 * Manage thumbnail images
* Gérer les téléchargements multi-source en proposant un lien aria2 (voir aria2.sourceforge.net) * Manage multi-source downloads by offering a link aria2 (see aria2.sourceforge.net)
* Intégré web ui: http://ziahamza.github.io/webui-aria2/ * Integrated web ui: http://ziahamza.github.io/webui-aria2/
* Mettre en place une limite d'upload activable à la demande * Set up an upload limit that can be activated on demand

16
app.js
View File

@ -45,14 +45,14 @@ app.use(cookieParser());
app.use(express.static(path.join(__dirname, 'public'))); app.use(express.static(path.join(__dirname, 'public')));
app.use('/', require('./routes/index')); app.use('/pwd/', require('./routes/index'));
app.use('/users', require('./routes/users')); app.use('/pwd/users', require('./routes/users'));
app.use('/file', require('./routes/file')); app.use('/pwd/file', require('./routes/file'));
app.use('/channel', require('./routes/channel')); app.use('/pwd/channel', require('./routes/channel'));
app.use('/movie', require('./routes/movie')); app.use('/pwd/movie', require('./routes/movie'));
app.use('/show_list', require('./routes/show_list')); app.use('/pwd/show_list', require('./routes/show_list'));
app.use('/show', require('./routes/show')); app.use('/pwd/show', require('./routes/show'));
app.use('/divers', require('./routes/divers')); app.use('/pwd/divers', require('./routes/divers'));
// catch 404 and forward to error handler // catch 404 and forward to error handler
app.use(function(req, res, next) { app.use(function(req, res, next) {

View File

@ -49,7 +49,7 @@ router.get('/:id', function(req, res, next) {
}, },
//aprés toute les opération de la base //aprés toute les opération de la base
function() { 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 });
}); });
}); });

View File

@ -24,7 +24,7 @@ router.get('/', function(req, res, next) {
}, },
//aprés toute les opération de la base //aprés toute les opération de la base
function() { 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 });
}); });
}); });

View File

@ -41,7 +41,7 @@ router.get('/:id', function(req, res, next) {
row.file.push(ligne); row.file.push(ligne);
},function(){ },function(){
res.render('movie', { title: 'Détail vidéo',movie: row }); res.render('movie', { title: 'Video Detail',movie: row });
}); });
}); });

View File

@ -20,7 +20,7 @@ router.get('/:id', function(req, res, next) {
//aprés toute les opération de la base //aprés toute les opération de la base
function(){ function(){
console.log(shows); 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 });
}); });
}); });

View File

@ -6,21 +6,21 @@ block content
table(id="example", class="table table-striped table-bordered", cellspacing="0", width="100%") table(id="example", class="table table-striped table-bordered", cellspacing="0", width="100%")
thead thead
tr tr
th Nom th Name
th Durée th duration
th Année th Year
tbody tbody
each video, i in videos each video, i in videos
tr tr
td td
a(href="/movie/#{video.id}") #{video.title}  a(href="/pwd/movie/#{video.id}") #{video.title} 
td= video.duree td= video.duration
td= video.year td= video.year
script. script.
$(document).ready(function() { $(document).ready(function() {
$('#example').DataTable({ $('#example').DataTable({
"language": { "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"
} }
}); });
}); });

View File

@ -11,6 +11,6 @@ block content
each channel, i in channels each channel, i in channels
li li
if(channel.type == 2) if(channel.type == 2)
a(href="/show_list/#{channel.id}")= channel.name a(href="/pwd/show_list/#{channel.id}")= channel.name
else else
a(href="/channel/#{channel.id}")= channel.name a(href="/pwd/channel/#{channel.id}")= channel.name

View File

@ -16,16 +16,16 @@ html
button.navbar-toggle(type="button",data-toggle="collapse",data-target="#collapse-menu") button.navbar-toggle(type="button",data-toggle="collapse",data-target="#collapse-menu")
span.sr-only Toggle navigation span.sr-only Toggle navigation
i.fa.fa-bars i.fa.fa-bars
a.navbar-brand(href="/") a.navbar-brand(href="/pwd/")
b Plex  b Plex 
| Web Downloader | Web Downloader
div#collapse-menu.collapse.navbar-collapse div#collapse-menu.collapse.navbar-collapse
ul.nav.navbar-nav.navbar-right ul.nav.navbar-nav.navbar-right
li.active li.active
a(href="/") Accueil a(href="/pwd/") Home
li li
a(href="/divers") Divers a(href="/pwd/divers") Divers
div.wrapper div.wrapper
div.container div.container

View File

@ -3,17 +3,17 @@ extends layout
block content block content
h1= movie.title h1= movie.title
a(href="#",onclick="window.history.back();") Retour à la liste a(href="#",onclick="window.history.back();") back to the list
br br
br br
label Note label Note
p= movie.rating p= movie.rating
label Télécharger label Download
br br
each file, i in movie.file 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
br br
label Résumé label Résumé

View File

@ -3,28 +3,28 @@ extends layout
block content block content
h1= title 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
br br
table(id="example", class="table table-striped table-bordered", cellspacing="0", width="100%") table(id="example", class="table table-striped table-bordered", cellspacing="0", width="100%")
thead thead
tr tr
th Nom th Name
th Saison & Episode th Season & Episode
th Durée th duration
tbody tbody
each video, i in videos each video, i in videos
tr tr
td td
a(href="/movie/#{video.id}") #{video.titre}  a(href="/pwd/movie/#{video.id}") #{video.titre} 
td= video.season_episode td= video.season_episode
td= video.duree td= video.duration
script. script.
$(document).ready(function() { $(document).ready(function() {
$('#example').DataTable({ $('#example').DataTable({
"language": { "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"
} }
}); });
}); });

View File

@ -6,19 +6,19 @@ block content
table(id="example", class="table table-striped table-bordered", cellspacing="0", width="100%") table(id="example", class="table table-striped table-bordered", cellspacing="0", width="100%")
thead thead
tr tr
th Série th Series
th Année th Year
tbody tbody
each show, i in shows each show, i in shows
tr tr
td td
a(href="/show/#{show.id}/#{channel_id}")= show.title a(href="/pwd/show/#{show.id}/#{channel_id}")= show.title
td= show.year td= show.year
script. script.
$(document).ready(function() { $(document).ready(function() {
$('#example').DataTable({ $('#example').DataTable({
"language": { "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"
} }
}); });
}); });