Bootstrap is now bundled as part of dizqueTV, so that the web UI can be used offline.

This commit is contained in:
vexorian 2023-11-27 23:21:15 -04:00
parent a66ade1a8d
commit a72967e575
4 changed files with 14 additions and 2 deletions

View File

@ -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) * 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 * dizqueTV's improvements are released under zlib license (c) 2020 Victor Hugo Soliz Kuncar
* FontAwesome: [https://fontawesome.com/license/free](https://archive.fo/PRqis) * FontAwesome: [https://fontawesome.com/license/free](https://archive.fo/PRqis)
* Bootstrap: https://github.com/twbs/bootstrap/blob/v4.4.1/LICENSE

View File

@ -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']) 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 fontAwesome = "fontawesome-free-5.15.4-web";
let bootstrap = "bootstrap-4.4.1-dist";
initDB(db, channelDB) initDB(db, channelDB)
channelService = new ChannelService(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.router(db, channelService, fillerDB, customShowDB, xmltvInterval, guideService, m3uService, eventService ))
app.use('/api/cache/images', cacheImageService.apiRouters()) app.use('/api/cache/images', cacheImageService.apiRouters())
app.use('/' + fontAwesome, express.static(path.join(process.env.DATABASE, fontAwesome))) 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(video.router( channelService, fillerDB, db, programmingService, activeChannelService, programPlayTimeDB ))
app.use(hdhr.router) app.use(hdhr.router)
@ -344,6 +346,15 @@ function initDB(db, channelDB) {
.pipe(unzip.Extract({ path: destinationPath })); .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 }));
}
} }

Binary file not shown.

View File

@ -4,7 +4,7 @@
<title>dizqueTV</title> <title>dizqueTV</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/png" href="/favicon.svg" ></link> <link rel="icon" type="image/png" href="/favicon.svg" ></link>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"> <link rel="stylesheet" href="bootstrap-4.4.1-dist/css/bootstrap.min.css">
<link rel="stylesheet" href="fontawesome-free-5.15.4-web/css/all.css"> <link rel="stylesheet" href="fontawesome-free-5.15.4-web/css/all.css">
<link href="style.css" rel="stylesheet"> <link href="style.css" rel="stylesheet">
<link href="custom.css" rel="stylesheet"> <link href="custom.css" rel="stylesheet">