diff --git a/dizquetv-nvidia.xml b/dizquetv-nvidia.xml index f55aeac..119d37c 100644 --- a/dizquetv-nvidia.xml +++ b/dizquetv-nvidia.xml @@ -1,7 +1,7 @@ dizquetv - vexorian/dizquetv:latest + vexorian/dizquetv:latest-nvidia https://hub.docker.com/r/vexorian/dizquetv host diff --git a/index.js b/index.js index 97c63ef..79d90a3 100644 --- a/index.js +++ b/index.js @@ -171,12 +171,8 @@ app.get('/version.js', (req, res) => { app.use('/images', express.static(path.join(process.env.DATABASE, 'images'))) app.use(express.static(path.join(__dirname, 'web/public'))) app.use('/images', express.static(path.join(process.env.DATABASE, 'images'))) - -app.use('/favicon-16.png', express.static( - path.join(__dirname, 'resources/favicon-16.png') -) ); -app.use('/favicon-32.png', express.static( - path.join(__dirname, 'resources/favicon-32.png') +app.use('/favicon.svg', express.static( + path.join(__dirname, 'resources/favicon.svg') ) ); app.use(api.router(db, channelDB, fillerDB, xmltvInterval, guideService )) diff --git a/resources/dizquetv.png b/resources/dizquetv.png index 1fc06a7..bac3553 100644 Binary files a/resources/dizquetv.png and b/resources/dizquetv.png differ diff --git a/resources/favicon-16.png b/resources/favicon-16.png deleted file mode 100644 index 8cb92cb..0000000 Binary files a/resources/favicon-16.png and /dev/null differ diff --git a/resources/favicon-32.png b/resources/favicon-32.png deleted file mode 100644 index 09f9c90..0000000 Binary files a/resources/favicon-32.png and /dev/null differ diff --git a/src/svg/favicon.svg b/resources/favicon.svg similarity index 54% rename from src/svg/favicon.svg rename to resources/favicon.svg index 2d33dcd..679b6ea 100644 --- a/src/svg/favicon.svg +++ b/resources/favicon.svg @@ -16,9 +16,9 @@ id="svg8" inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)" sodipodi:docname="favicon.svg" - inkscape:export-filename="/home/vx/dev/pseudotv/resources/favicon-32.png" - inkscape:export-xdpi="15.36" - inkscape:export-ydpi="15.36"> + inkscape:export-filename="/home/vx/dev/pseudotv/resources/favicon-16.png" + inkscape:export-xdpi="7.6799998" + inkscape:export-ydpi="7.6799998"> image/svg+xml - + @@ -57,10 +57,18 @@ inkscape:groupmode="layer" id="layer1" transform="translate(0,-244.08278)"> + + style="fill:#1f1f1f;fill-opacity:1;stroke-width:0.68901283" + transform="matrix(1.2119871,0,0,1.7379906,-82.577875,-167.18505)"> - - - + - + + style="opacity:1;fill:#a1a1a1;fill-opacity:0.86792453;stroke:none;stroke-width:1.46499991;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + rx="2.4216392" + ry="2.3988426" /> + + + + d + id="tspan1728" + x="16.979799" + y="286.34747" + style="fill:#e6e6e6;fill-opacity:1;stroke-width:0.264584px">dizqueTV diff --git a/src/plex-player.js b/src/plex-player.js index 73ba96f..e204476 100644 --- a/src/plex-player.js +++ b/src/plex-player.js @@ -52,6 +52,9 @@ class PlexPlayer { throw Error(`Unable to find server "${lineupItem.serverKey}" specied by program.`); } server = server[0]; + if (server.uri.endsWith("/")) { + server.uri = server.uri.slice(0, server.uri.length - 1); + } try { let plexSettings = db['plex-settings'].find()[0]; diff --git a/src/plex.js b/src/plex.js index 97e4461..41a8e16 100644 --- a/src/plex.js +++ b/src/plex.js @@ -2,8 +2,15 @@ const request = require('request') class Plex { constructor(opts) { this._accessToken = typeof opts.accessToken !== 'undefined' ? opts.accessToken : '' + let uri = "http://127.0.0.1:32400"; + if ( (typeof opts.uri) !== 'undefined' ) { + uri = opts.uri; + if (uri.endsWith("/")) { + uri = uri.slice(0, uri.length - 1); + } + } this._server = { - uri: typeof opts.uri !== 'undefined' ? opts.uri : 'http://127.0.0.1:32400', + uri: uri, host: typeof opts.host !== 'undefined' ? opts.host : '127.0.0.1', port: typeof opts.port !== 'undefined' ? opts.port : '32400', protocol: typeof opts.protocol !== 'undefined' ? opts.protocol : 'http' diff --git a/src/svg/dizquetv.svg b/src/svg/dizquetv.svg index d43ea36..4224dbe 100644 --- a/src/svg/dizquetv.svg +++ b/src/svg/dizquetv.svg @@ -15,7 +15,10 @@ version="1.1" id="svg8" inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)" - sodipodi:docname="dizquetv.svg"> + sodipodi:docname="dizquetv.svg" + inkscape:export-filename="/home/vx/dev/dizqueanimation/01.png" + inkscape:export-xdpi="245.75999" + inkscape:export-ydpi="245.75999"> - dizqueT + width="52.206699" + height="35.866219" + x="-1.3992016" + y="254.87126" + transform="matrix(0.99990505,-0.01378015,0.00643904,0.99997927,0,0)" /> + style="fill:#1f1f1f;fill-opacity:1;stroke-width:0.82573813" + transform="matrix(1.2119871,0,0,1.2100891,-82.577875,-32.337926)"> - - - + - + - + style="opacity:1;fill:#a1a1a1;fill-opacity:0.86792453;stroke:none;stroke-width:1.46499991;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + rx="2.4216392" + ry="2.3988426" /> + + + + + dizqueTV diff --git a/src/tv-guide-service.js b/src/tv-guide-service.js index 8d69b41..a252899 100644 --- a/src/tv-guide-service.js +++ b/src/tv-guide-service.js @@ -113,6 +113,7 @@ class TVGuideService let playing = {}; if ( (typeof(previousKnown) !== 'undefined') + && (previousKnown.index !== -1) && (previousKnown.program.duration == channel.programs[previousKnown.index].duration ) && (previousKnown.start + previousKnown.program.duration == t) ) { @@ -126,6 +127,17 @@ class TVGuideService } else { playing = await this.getCurrentPlayingIndex(channel, t); } + if ( (playing.program == null) || (typeof(playing) === 'undefined') ) { + console.log("There is a weird issue with the TV guide generation. A placeholder program is placed to prevent further issues. Please report this."); + playing = { + index: -1, + program: { + isOffline: true, + duration: 30*60*1000, + }, + start: t + } + } if ( playing.program.isOffline && playing.program.type === 'redirect') { let ch2 = playing.program.channel; @@ -189,13 +201,15 @@ class TVGuideService ) { y.program.duration -= melded; programs[ programs.length - 1] = y; - programs.push( { - start: y.start + y.program.duration, - program: { - isOffline : true, - duration: melded, - }, - } ); + if (y.start + y.program.duration < t1) { + programs.push( { + start: y.start + y.program.duration, + program: { + isOffline : true, + duration: melded, + }, + } ); + } melded = 0; } else { programs[ programs.length - 1] = y; @@ -216,7 +230,14 @@ class TVGuideService }; while (x.start < t1) { await push(x); - x = await this.getChannelPlaying(channel, x, x.start + x.program.duration); + let t2 = x.start + x.program.duration; + x = await this.getChannelPlaying(channel, x, t2); + if (x.start < t2) { + let d = t2 - x.start; + x.start = t2; + x.program = clone(x.program); + x.program.duration -= d; + } if (x.program.duration == 0) throw Error("D"); } result.programs = []; diff --git a/web/public/index.html b/web/public/index.html index d0c4ca4..c701ec2 100644 --- a/web/public/index.html +++ b/web/public/index.html @@ -3,8 +3,7 @@ dizqueTV - - + diff --git a/web/public/style.css b/web/public/style.css index 266cd05..518db8a 100644 --- a/web/public/style.css +++ b/web/public/style.css @@ -249,6 +249,17 @@ table.tvguide { text-align: right; } +.filler-list .list-group-item { + min-height: 1.5em; +} + +.filler-list .list-group-item .title { + margin-right: 5px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + /* Safari */ @-webkit-keyframes spin { 0% { -webkit-transform: rotate(0deg); } diff --git a/web/public/templates/filler-config.html b/web/public/templates/filler-config.html index 6e8d2e1..d4a65d3 100644 --- a/web/public/templates/filler-config.html +++ b/web/public/templates/filler-config.html @@ -62,14 +62,13 @@ - -