diff --git a/README.md b/README.md index 338c165..79bcf1b 100644 --- a/README.md +++ b/README.md @@ -74,4 +74,5 @@ npm run dev-server * Original pseudotv-Plex code was released under [MIT license (c) 2020 Dan Ferguson](https://github.com/DEFENDORe/pseudotv/blob/665e71e24ee5e93d9c9c90545addb53fdc235ff6/LICENSE) * dizqueTV's improvements are released under zlib license (c) 2020 Victor Hugo Soliz Kuncar - * FontAwesome: [https://fontawesome.com/license/free](https://archive.fo/PRqis) \ No newline at end of file + * FontAwesome: [https://fontawesome.com/license/free](https://archive.fo/PRqis) + * Bootstrap: https://github.com/twbs/bootstrap/blob/v4.4.1/LICENSE \ No newline at end of file diff --git a/index.js b/index.js index a776215..cb8f60b 100644 --- a/index.js +++ b/index.js @@ -93,6 +93,7 @@ channelDB = new ChannelDB( path.join(process.env.DATABASE, 'channels') ); db.connect(process.env.DATABASE, ['channels', 'plex-servers', 'ffmpeg-settings', 'plex-settings', 'xmltv-settings', 'hdhr-settings', 'db-version', 'client-id', 'cache-images', 'settings']) let fontAwesome = "fontawesome-free-5.15.4-web"; +let bootstrap = "bootstrap-4.4.1-dist"; initDB(db, channelDB) channelService = new ChannelService(channelDB); @@ -286,6 +287,7 @@ app.use('/custom.css', express.static(path.join(process.env.DATABASE, 'custom.cs app.use(api.router(db, channelService, fillerDB, customShowDB, xmltvInterval, guideService, m3uService, eventService )) app.use('/api/cache/images', cacheImageService.apiRouters()) app.use('/' + fontAwesome, express.static(path.join(process.env.DATABASE, fontAwesome))) +app.use('/' + bootstrap, express.static(path.join(process.env.DATABASE, bootstrap))) app.use(video.router( channelService, fillerDB, db, programmingService, activeChannelService, programPlayTimeDB )) app.use(hdhr.router) @@ -344,6 +346,15 @@ function initDB(db, channelDB) { .pipe(unzip.Extract({ path: destinationPath })); } + if (!fs.existsSync( path.join(process.env.DATABASE, bootstrap) )) { + + let sourceZip = path.resolve(__dirname, 'resources', bootstrap) + ".zip"; + let destinationPath = path.resolve(process.env.DATABASE); + + fs.createReadStream(sourceZip) + .pipe(unzip.Extract({ path: destinationPath })); + + } } diff --git a/resources/bootstrap-4.4.1-dist.zip b/resources/bootstrap-4.4.1-dist.zip new file mode 100644 index 0000000..9117d20 Binary files /dev/null and b/resources/bootstrap-4.4.1-dist.zip differ diff --git a/web/public/index.html b/web/public/index.html index 78b1b7b..0524b25 100644 --- a/web/public/index.html +++ b/web/public/index.html @@ -4,7 +4,7 @@