diff --git a/.dockerignore b/.dockerignore index 3265e19..d926ae0 100644 --- a/.dockerignore +++ b/.dockerignore @@ -6,4 +6,5 @@ Dockerfile .gitignore bin dist -.pseudotv \ No newline at end of file +.pseudotv +.dizquetv \ No newline at end of file diff --git a/.gitignore b/.gitignore index 270e780..5255da1 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ node_modules/ dist/ bin/ .pseudotv/ +.dizquetv/ web/public/bundle.js \ No newline at end of file diff --git a/README.md b/README.md index b765739..cfc464b 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,24 @@ -# pseudotv-plex -![Discord](https://img.shields.io/discord/711313431457693727?logo=discord&logoColor=fff&style=flat-square) ![GitHub top language](https://img.shields.io/github/languages/top/DEFENDORe/pseudotv?logo=github&style=flat-square) ![Docker Pulls](https://img.shields.io/docker/pulls/defendore/pseudotv?logo=docker&logoColor=fff&style=flat-square) +# dizqueTV +![Discord](https://img.shields.io/discord/711313431457693727?logo=discord&logoColor=fff&style=flat-square) ![GitHub top language](https://img.shields.io/github/languages/top/vexorian/dizquetv?logo=github&style=flat-square) ![Docker Pulls](https://img.shields.io/docker/pulls/vexorian/dizquetv?logo=docker&logoColor=fff&style=flat-square) Create live TV channel streams from media on your Plex servers. -Project recently migrated from [gitlab](https://gitlab.com/DEFENDORe/pseudotv-plex) to github to improve development flow (docker builds and binary releases). +dizqueTV is a fork of the project previously-known as [pseudotv-plex](https://gitlab.com/DEFENDORe/pseudotv-plex) or [pseudotv](https://github.com/DEFENDORe/pseudotv). New repository because of lack of activity from the main repository and the name change is because projects with the old name already existed and were created long before this approach and it was causing confusion. You can migrate from pseudoTV 0.0.51 to dizqueTV by renaming the .pseudotv folder to .dizquetv and running the new executable (or doing a similar trick with the volumes used by the docker containers). - + -Configure your channels, programs, commercials and settings using the PseudoTV web UI. +Configure your channels, programs, commercials and settings using the dizqueTV web UI. -Access your channels by adding the spoofed PseudoTV HDHomerun tuner to Plex, or utilize the M3U Url with any 3rd party app. +Access your channels by adding the spoofed dizqueTV HDHomerun tuner to Plex, or utilize the M3U Url with any 3rd party app. -EPG (Guide Information) data is stored to `.pseudotv/xmltv.xml` +EPG (Guide Information) data is stored to `.dizquetv/xmltv.xml` ## Features +- TV Channels are made available as an IPTV stream. There's a lot of IPTV clients and software that supports it. +- Ease of setup for xteve and Plex playback by mocking a HDHR server. +- Centralized server instance so that you need only configure your channels once. +- Customize your TV channels' programming including the specific air times. +- Supports multiple channels all available through a XMLTV tv guide. - Docker image and prepackage binaries for Windows, Linux and Mac - Web UI for channel configuration and app settings - Select media (desired programs and commercials) across multiple Plex servers @@ -21,8 +26,6 @@ EPG (Guide Information) data is stored to `.pseudotv/xmltv.xml` - Ability to auto update Plex DVR guide data and channel mappings - Auto update the xmltv.xml file at a set interval (in hours). You can also set the amount EPG cache (in hours). - Continuous playback support -- Ability to add breaks or padding between episodes and use Commercials, Trailers, Bumpers or other filler. -- Commercial support. 5 commercial slots for a program (BEFORE, 1/4, 1/2, 3/4, AFTER). Place as many commercials as desired per slot to chain commercials. - Media track selection (video, audio, subtitle). (subtitles disabled by default) - Subtitle support. - Ability to overlay channel icon over stream @@ -30,83 +33,96 @@ EPG (Guide Information) data is stored to `.pseudotv/xmltv.xml` - Can be configured to completely force Direct play. - Can normalize video formats to prevent stream breaking. +## Limitations + +- Plex Pass is required to unlock Plex Live TV/DVR feature +- Only one EPG source can be used with Plex server. This may cause an issue if you are adding the dizquetv tuner to a Plex server with Live TV/DVR already enabled/configured. + + * There are projects like xteve that allow you to unify multiple EPG sources into a single list which Plex can use. + +- dizqueTV does not currently watch your Plex server for media updates/changes. You must manually remove and readd your programs for any changes to take effect. Same goes for Plex server changes (changing IP, port, etc).. all media will fail.. +- Many IPTV players (including Plex) will break after switching episodes if video / audio format is too different between. dizqueTV can be configured to use ffmpeg transcoding to prevent htis, but that costs resources. This is an intrinsic issue with the IPTV approach. +- Plex's IPTV player will be always recording the stream's playback for the purposes of allowing you to pause or rewind the stream. This is not necessarily an issue with other IPTV players. + + ## Useful Tips/Info -- Internal and External SRT/ASS subtitles may cause a delay when starting stream (only when subtitles are activated). For internal SRT/ASS subtitles, FFMPEG needs to perform a subtitle track extraction from the original media before the requested stream can be started. External SRT/ASS subtitle files still need to be sliced to the correct start time and duration so even they may cause a delay when starting a stream. Image based subs (PGS) should have little to no impact. -- Utilize your hardware accelerated encoders, or use mpeg2 instead of h264 by changing the default video encoder in FFMPEG settings. *Note that some encoders may not be capable of handling every transcoding scenario, libx264 and mpeg2video seem to be the most stable.* +- dizqueTV can use both Plex and ffmpeg transcoding. Plex transcoding is advantageous in that there's access for many more features and formats than would be available. +- Audio track and subtitle choice depends on Plex configuraiton for that video/episode and user. +- Subtitles are transcoded by Plex before being delivered to dizqueTV. +- Can be configured to force a direct stream both from Plex and dizqueTV's side. +- Playing many different kinds of formats and resolutions in the same stream does ntpossible without transcoding them. So unless you are certain that all formats used in the same channel will be identical, your life will be easier if you let ffmpeg be used for normalization. +- If normalization is too heavy, try utilizing your hardware's transcoding features by picking the correct encoder in FFMPEG settings. *Note that some encoders may not be capable of handling every transcoding scenario, libx264 and mpeg2video seem to be the most stable.* - Intel Quick Sync: `h264_qsv`, `mpeg2_qsv` - NVIDIA GPU: `h264_nvenc` - MPEG2 `mpeg2video` - H264 `libx264` (default) - MacOS `h264_videotoolbox` - - **Enable the option to log ffmpeg's stderr output directly to the pseudotv app console, for detecting issues** -- Host your own images for channel icons, program icons, etc.. Simply add your image to `.pseudotv/images` and reference them via `http://pseudotv-ip:8000/images/myImage.png` + - **Enable the option to log ffmpeg's stderr output directly to the dizquetv app console, for detecting issues** +- Host your own images for channel icons, program icons, etc.. Simply add your image to `.dizquetv/images` and reference them via `http://dizquetv-ip:8000/images/myImage.png` - Use the Block Shuffle feature to play a specified number of TV episodes before advancing to the next available TV show in the channel. You can also specify to randomize the TV Show order. Any movies added to the channel will be pushed to the end of the program lineup, this is also applicable the "Sort TV Shows" option. - Plex is smart enough not to open another stream if it currently is being viewed by another user. This allows only one transcode session for mulitple viewers if they are watching the same channel. -- Even if your Plex server is running on the same machine as the PseudoTV app, use your network address (not a loopback) when configuring your Plex Server(s) in the web UI. - -## Limitations - -- Plex Pass is required to unlock Plex Live TV/DVR feature -- Only one EPG source can be used with Plex server. This may cause an issue if you are adding the pseudotv tuner to a Plex server with Live TV/DVR already enabled/configured. - - * There are projects like xteve that allow you to unify multiple EPG sources into a single list which Plex can use. - -- PseudoTV does not watch your Plex server for media updates/changes. You must manually remove and readd your programs for any changes to take effect. Same goes for Plex server changes (changing IP, port, etc).. all media will fail.. -- Many IPTV players (including Plex) will break after switching episodes if video / audio format is too different between. PseudoTV can be configured to use ffmpeg transcoding to prevent htis, but that costs resources. +- Use the tools menu in the channel editor to access a lot of features to process your channel's programming, such as shuffling. +- Flex time is a useful feature that allows you to configure breaks between TV shows that play random content. This is useful if you want to simulate "commercials". A frequent use case is to use this filler to pad the starting times of TV shows (so that all TV shows start at :00 or :30 times, for example. +- Even if your Plex server is running on the same machine as the dizqueTV app, use your network address (not a loopback) when configuring your Plex Server(s) in the web UI. ## Installation -*Please delete your old `.pseudotv` directory before using the new build. I'm sorry but it'd take more effort than its worth to convert the old databases..* +* *If you were a pseudotv user, please rename your old `.pseudotv` to `.dizquetv` before running. dizque tv will attempt to migrate your settings and channels to the new features.* -Unless your are using Docker/Unraid, you must download and install **ffmpeg** to your system and set the correct path in the PseudoTV Web UI. +Unless your are using Docker/Unraid, you must download and install **ffmpeg** to your system and set the correct path in the dizqueTV Web UI. -By default, pseudotv will create the directory `.pseudotv` wherever pseudotv is launched from. Your `xmltv.xml` file and config databases are stored here. +By default, dizquetv will create the directory `.dizquetv` wherever dizquetv is launched from. Your `xmltv.xml` file and config databases are stored here. #### Binary Release -[Download](https://github.com/DEFENDORe/pseudotv/releases) and run the PseudoTV executable (argument defaults below) +[Download](https://github.com/vexorian/dizquetv/releases) and run the dizqueTV executable (argument defaults below) ``` -./pseudotv-win-x64.exe --port 8000 --database ./pseudotv +./dizquetv-win-x64.exe --port 8000 --database ./dizquetv ``` #### Docker -The Docker repository can be viewed [here](https://hub.docker.com/r/defendore/pseudotv). +The Docker repository can be viewed [here](https://hub.docker.com/r/vexorian/dizquetv). -Use Docker to fetch PseudoTV, then run the container.. (replace `C:\.pseudotv` with your desired config directory location) +Use Docker to fetch dizqueTV, then run the container.. (replace `C:\.dizquetv` with your desired config directory location) ``` -docker pull defendore/pseudotv -docker run --name pseudotv -p 8000:8000 -v C:\.pseudotv:/home/node/app/.pseudotv defendore/pseudotv +docker pull vexorian/dizquetv +docker run --name dizquetv -p 8000:8000 -v C:\.dizquetv:/home/node/app/.dizquetv defendore/dizquetv ``` +If you were a pseudotv user, make sure to stop the pseudotv container and use the same folder you used for configuration in pseudotv as configuration for dizquetv. + #### Building Docker image from source -Build docker image from source and run the container. (replace `C:\.pseudotv` with your desired config directory location) +Build docker image from source and run the container. (replace `C:\.dizquetv` with your desired config directory location) ``` -git clone https://github.com/DEFENDORe/pseudotv -cd pseudotv-plex -docker build -t pseudotv . -docker run --name pseudotv -p 8000:8000 -v C:\.pseudotv:/home/node/app/.pseudotv pseudotv +git clone https://github.com/vexorian/dizquetv +cd dizquetv +git checkout version +#replace version with the version you want + +docker build -t dizquetv . +docker run --name dizquetv -p 8000:8000 -v C:\.dizquetv:/home/node/app/.dizquetv dizquetv ``` #### Unraid Install Add ``` -https://github.com/DEFENDORe/pseudotv +https://github.com/vexorian/dizquetv ``` to your "Template repositories" in the Docker tab. Click the "Add Container" button -Select either the pseudotv template or the pseudotv-nvidia template if you want nvidia hardware accelerated transcoding. -Make sure you have the Unraid Nvidia plugin installed and change your video encoder to h264_nvenc in the pseudotv ffmpeg settings. +Select either the dizquetv template or the dizquetv-nvidia template if you want nvidia hardware accelerated transcoding. +Make sure you have the Unraid Nvidia plugin installed and change your video encoder to h264_nvenc in the dizquetv ffmpeg settings. #### From Source Install NodeJS and FFMPEG ``` -git clone https://github.com/DEFENDORe/pseudotv -cd pseudotv-plex +git clone https://github.com/vexorian/dizquetv +cd dizquetv npm install npm run build npm run start @@ -114,21 +130,21 @@ npm run start ## Plex Setup -Add the PseudoTV spoofed HDHomerun tuner to Plex via Plex Settings. +Add the dizqueTV spoofed HDHomerun tuner to Plex via Plex Settings. -If the tuner isn't automatically listed, manually enter the network address of pseudotv. Example: +If the tuner isn't automatically listed, manually enter the network address of dizquetv. Example: ``` 127.0.0.1:8000 ``` When prompted for a Postal/Zip code, click the `"Have an XMLTV guide on your server? Click here to use that instead."` link. -Enter the location of the `.pseudotv/xmltv.xml` file. Example (Windows): +Enter the location of the `.dizquetv/xmltv.xml` file. Example (Windows): ``` -C:\.pseudotv\xmltv.xml +C:\.dizquetv\xmltv.xml ``` -**Do not use the Web UI XMLTV URL when feeding Plex the xmltv.xml file. Plex fails to update it's EPG from a URL for some reason (at least on Windows). Use the local file path to `.pseudotv/xmltv.xml`** +**Do not use the Web UI XMLTV URL when feeding Plex the xmltv.xml file. Plex fails to update it's EPG from a URL for some reason (at least on Windows). Use the local file path to `.dizquetv/xmltv.xml`** ## App Preview diff --git a/index.js b/index.js index 58a0157..f7dae1d 100644 --- a/index.js +++ b/index.js @@ -15,7 +15,7 @@ const Plex = require('./src/plex'); const channelCache = require('./src/channel-cache'); const constants = require('./src/constants') -console.log("PseudoTV Version: " + constants.VERSION_NAME) +console.log("dizqueTV Version: " + constants.VERSION_NAME) for (let i = 0, l = process.argv.length; i < l; i++) { if ((process.argv[i] === "-p" || process.argv[i] === "--port") && i + 1 !== l) @@ -24,11 +24,15 @@ for (let i = 0, l = process.argv.length; i < l; i++) { process.env.DATABASE = process.argv[i + 1] } -process.env.DATABASE = process.env.DATABASE || './.pseudotv' +process.env.DATABASE = process.env.DATABASE || './.dizquetv' process.env.PORT = process.env.PORT || 8000 -if (!fs.existsSync(process.env.DATABASE)) +if (!fs.existsSync(process.env.DATABASE)) { + if (fs.existsSync("./.pseudotv")) { + throw Error(process.env.DATABASE + " folder not found but ./.pseudotv has been found. Please rename this folder or create an empty " + process.env.DATABASE + " folder so that the program is not confused about."); + } fs.mkdirSync(process.env.DATABASE) +} if(!fs.existsSync(path.join(process.env.DATABASE, 'images'))) fs.mkdirSync(path.join(process.env.DATABASE, 'images')) @@ -61,7 +65,7 @@ let xmltvInterval = { if (plexServers[i].arChannels && channels.length !== 0) plex.RefreshChannels(channels, dvrs).then(() => { }, (err) => { console.error(err, i) }) }).catch( (err) => { - console.error("There was an error when fetching Plex DVRs. This means pseudoTV couldn't trigger Plex to update its TV guide." + err); + console.error("There was an error when fetching Plex DVRs. This means dizqueTV couldn't trigger Plex to update its TV guide." + err); }); } }, (err) => { @@ -107,9 +111,9 @@ function initDB(db) { let data = fs.readFileSync(path.resolve(path.join(__dirname, 'resources/font.ttf'))) fs.writeFileSync(process.env.DATABASE + '/font.ttf', data) } - if (!fs.existsSync(process.env.DATABASE + '/images/pseudotv.png')) { - let data = fs.readFileSync(path.resolve(path.join(__dirname, 'resources/pseudotv.png'))) - fs.writeFileSync(process.env.DATABASE + '/images/pseudotv.png', data) + if (!fs.existsSync(process.env.DATABASE + '/images/dizquetv.png')) { + let data = fs.readFileSync(path.resolve(path.join(__dirname, 'resources/dizquetv.png'))) + fs.writeFileSync(process.env.DATABASE + '/images/dizquetv.png', data) } if (!fs.existsSync(process.env.DATABASE + '/images/generic-error-screen.png')) { let data = fs.readFileSync(path.resolve(path.join(__dirname, 'resources/generic-error-screen.png'))) diff --git a/make_dist.sh b/make_dist.sh index c3dd6a7..3210017 100644 --- a/make_dist.sh +++ b/make_dist.sh @@ -1,8 +1,8 @@ #!/bin/sh -WIN64=pseudotv-win-x64.exe -WIN32=pseudotv-win-x86.exe -MACOSX=pseudotv-macos-x64 -LINUX64=pseudotv-linux-x64 +WIN64=dizquetv-win-x64.exe +WIN32=dizquetv-win-x86.exe +MACOSX=dizquetv-macos-x64 +LINUX64=dizquetv-linux-x64 rm -R ./dist/* npm run build diff --git a/package-lock.json b/package-lock.json index 2b2e50d..1c71da7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "pseudotv", + "name": "dizquetv", "version": "1.0.0", "lockfileVersion": 1, "requires": true, diff --git a/package.json b/package.json index dbff88e..4372b69 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "pseudotv", + "name": "dizquetv", "version": "1.0.0", "description": "Create LiveTV channels from your Plex media", "main": "index.js", @@ -11,7 +11,7 @@ "dev-server": "nodemon index.js --ignore ./web/ --ignore ./db/ --ignore ./xmltv.xml", "compile": "babel index.js -d dist && babel src -d dist/src", "package": "sh ./make_dist.sh", - "clean": "del-cli --force ./bin ./dist ./.pseudotv ./web/public/bundle.js" + "clean": "del-cli --force ./bin ./dist ./.dizquetv ./web/public/bundle.js" }, "author": "Dan Ferguson", "license": "ISC", diff --git a/pseudotv-nvidia.xml b/pseudotv-nvidia.xml index 98358f1..c446f7e 100644 --- a/pseudotv-nvidia.xml +++ b/pseudotv-nvidia.xml @@ -1,30 +1,30 @@ - pseudotv - defendore/pseudotv:latest - https://hub.docker.com/r/defendore/pseudotv + dizquetv + vexorian/dizque:latest + https://hub.docker.com/r/vexorian/dizquetv host bash false - PseudoTV is a Plex DVR plugin. It allows you to host your own fake live tv service by dynamically streaming media from your Plex servers(s). Your channels and settings are all manged throught the PseudoTV Web UI. + dizqueTV is a Plex DVR plugin. It allows you to host your own fake live tv service by dynamically streaming media from your Plex servers(s). Your channels and settings are all managed through the dizqueTV Web UI. -PseudoTV will show up as a HDHomeRun device within Plex. When configuring your Plex Tuner, simply use the generatered ./.pseudotv/xmltv.xml file for EPG data. PseudoTV will automatically refresh your Plex server's EPG data and channel mappings (if specified to do so in settings) when configuring channels via the Web UI. Ensure your FFMPEG path is set correctly via the Web UI, and enjoy! +dizqueTV will show up as a HDHomeRun device within Plex. When configuring your Plex Tuner, simply use the generatered ./.dizquetv/xmltv.xml file for EPG data. dizqueTV will automatically refresh your Plex server's EPG data and channel mappings (if specified to do so in settings) when configuring channels via the Web UI. Ensure your FFMPEG path is set correctly via the Web UI, and enjoy! http://[IP]:[PORT:8000] - https://raw.githubusercontent.com/DEFENDORe/pseudotv/master/resources/pseudotv.png + https://raw.githubusercontent.com/vexorian/dizquetv/master/resources/dizquetv.png --runtime=nvidia 1589436589 - PseudoTV is a Plex DVR plugin. It allows you to host your own fake live tv service by dynamically streaming media from your Plex servers(s). Your channels and settings are all manged throught the PseudoTV Web UI. + dizqueTV is a Plex DVR plugin. It allows you to host your own fake live tv service by dynamically streaming media from your Plex servers(s). Your channels and settings are all manged throught the dizqueTV Web UI. -PseudoTV will show up as a HDHomeRun device within Plex. When configuring your Plex Tuner, simply use the generatered ./.pseudotv/xmltv.xml file for EPG data. PseudoTV will automatically refresh your Plex server's EPG data and channel mappings (if specified to do so in settings) when configuring channels via the Web UI. Ensure your FFMPEG path is set correctly via the Web UI, and enjoy! +dizqueTV will show up as a HDHomeRun device within Plex. When configuring your Plex Tuner, simply use the generatered ./.dizque/xmltv.xml file for EPG data. dizqueTV will automatically refresh your Plex server's EPG data and channel mappings (if specified to do so in settings) when configuring channels via the Web UI. Ensure your FFMPEG path is set correctly via the Web UI, and enjoy! host @@ -37,8 +37,8 @@ PseudoTV will show up as a HDHomeRun device within Plex. When configuring your P - /mnt/user/appdata/pseudotv/ - /home/node/app/.pseudotv + /mnt/user/appdata/dizquetv/ + /home/node/app/.dizquetv rw @@ -58,5 +58,5 @@ PseudoTV will show up as a HDHomeRun device within Plex. When configuring your P 8000 all all - /mnt/user/appdata/pseudotv/ + /mnt/user/appdata/dizquetv/ diff --git a/pseudotv.xml b/pseudotv.xml index 054884d..da9178b 100644 --- a/pseudotv.xml +++ b/pseudotv.xml @@ -1,8 +1,8 @@ - pseudotv - defendore/pseudotv:latest - https://hub.docker.com/r/defendore/pseudotv + dizquetv + vexorian/dizquetv:latest + https://hub.docker.com/r/vexorian/dizquetv host bash @@ -13,7 +13,7 @@ http://[IP]:[PORT:8000] - https://raw.githubusercontent.com/DEFENDORe/pseudotv/master/resources/pseudotv.png + https://raw.githubusercontent.com/vexorian/dizquetv/master/resources/dizquetv.png @@ -33,8 +33,8 @@ - /mnt/user/appdata/pseudotv/ - /home/node/app/.pseudotv + /mnt/user/appdata/dizquetv/ + /home/node/app/.dizquetv rw @@ -42,5 +42,5 @@ 8000 - /mnt/user/appdata/pseudotv/ + /mnt/user/appdata/dizquetv/ diff --git a/resources/dizquetv.png b/resources/dizquetv.png new file mode 100644 index 0000000..1fc06a7 Binary files /dev/null and b/resources/dizquetv.png differ diff --git a/resources/generic-error-screen.png b/resources/generic-error-screen.png index fbd261f..d0ffd0c 100644 Binary files a/resources/generic-error-screen.png and b/resources/generic-error-screen.png differ diff --git a/resources/generic-offline-screen.png b/resources/generic-offline-screen.png index 593b226..73b778d 100644 Binary files a/resources/generic-offline-screen.png and b/resources/generic-offline-screen.png differ diff --git a/resources/pseudotv.png b/resources/pseudotv.png deleted file mode 100644 index 7687cae..0000000 Binary files a/resources/pseudotv.png and /dev/null differ diff --git a/src/api.js b/src/api.js index 36f8958..5f0fe39 100644 --- a/src/api.js +++ b/src/api.js @@ -10,7 +10,7 @@ function api(db, xmltvInterval) { let router = express.Router() router.get('/api/version', (req, res) => { - res.send( { "pseudotv" : constants.VERSION_NAME } ) + res.send( { "dizquetv" : constants.VERSION_NAME } ) }) // Plex Servers @@ -179,11 +179,11 @@ function api(db, xmltvInterval) { let channels = db['channels'].find() var data = "#EXTM3U\n" for (var i = 0; i < channels.length; i++) { - data += `#EXTINF:0 tvg-id="${channels[i].number}" tvg-name="${channels[i].name}" tvg-logo="${channels[i].icon}" group-title="PseudoTV",${channels[i].name}\n` + data += `#EXTINF:0 tvg-id="${channels[i].number}" tvg-name="${channels[i].name}" tvg-logo="${channels[i].icon}" group-title="dizqueTV",${channels[i].name}\n` data += `${req.protocol}://${req.get('host')}/video?channel=${channels[i].number}\n` } if (channels.length === 0) { - data += `#EXTINF:0 tvg-id="1" tvg-name="PseudoTV" tvg-logo="https://raw.githubusercontent.com/DEFENDORe/pseudotv/master/resources/pseudotv.png" group-title="PseudoTV",PseudoTV\n` + data += `#EXTINF:0 tvg-id="1" tvg-name="dizqueTV" tvg-logo="https://raw.githubusercontent.com/vexorian/dizquetv/master/resources/dizquetv.png" group-title="dizqueTV",dizqueTV\n` data += `${req.protocol}://${req.get('host')}/setup\n` } res.send(data) diff --git a/src/database-migration.js b/src/database-migration.js index 6a0ba6f..ce85c81 100644 --- a/src/database-migration.js +++ b/src/database-migration.js @@ -17,15 +17,27 @@ * but with time it will be worth it, really. * ***/ -const TARGET_VERSION = 200; +const TARGET_VERSION = 300; const STEPS = [ // [v, v2, x] : if the current version is v, call x(db), and version becomes v2 [ 0, 100, (db) => basicDB(db) ], [ 100, 200, (db) => commercialsRemover(db) ], + [ 200, 300, (db) => appNameChange(db) ], ] +function appNameChange(db) { + let xmltv = db['xmltv-settings'].find() + if (xmltv.length > 0) { + xmltv = xmltv[0]; + if (typeof(xmltv.file) !== 'undefined') { + xmltv.file = xmltv.file.replace(/\.pseudotv/, ".dizquetv"); + db['xmltv-settings'].update( { "_id" : xmltv._id} , xmltv ); + } + } +} + function basicDB(db) { //this one should either try recovering the db from a very old version //or buildl a completely empty db at version 0 @@ -319,7 +331,7 @@ function initDB(db) { console.log("Done migrating db to version : " + dbVersion.version); } catch (e) { - console.log("Error during migration. Sorry, we can't continue. Wiping out your .pseudotv folder might be a workaround, but that means you lose all your settings.", e); + console.log("Error during migration. Sorry, we can't continue. Wiping out your .dizquetv folder might be a workaround, but that means you lose all your settings.", e); throw Error("Migration error, step=" + dbVersion.version); } } else { diff --git a/src/ffmpeg.js b/src/ffmpeg.js index 6446ee3..25a4245 100644 --- a/src/ffmpeg.js +++ b/src/ffmpeg.js @@ -1,7 +1,7 @@ const spawn = require('child_process').spawn const events = require('events') -//they can customize this by modifying the picture in .pseudotv folder +//they can customize this by modifying the picture in .dizquetv folder const MAXIMUM_ERROR_DURATION_MS = 60000; @@ -319,7 +319,7 @@ class FFMPEG extends events.EventEmitter { } ffmpegArgs.push(`-metadata`, - `service_provider="PseudoTV"`, + `service_provider="dizqueTV"`, `-metadata`, `service_name="${this.channel.name}`, `-f`, `mpegts`); diff --git a/src/hdhr.js b/src/hdhr.js index 8ef4cfe..8f3d775 100644 --- a/src/hdhr.js +++ b/src/hdhr.js @@ -50,7 +50,7 @@ function hdhr(db) { for (let i = 0, l = channels.length; i < l; i++) lineup.push({ GuideNumber: channels[i].number.toString(), GuideName: channels[i].name, URL: `${req.protocol}://${req.get('host')}/video?channel=${channels[i].number}` }) if (lineup.length === 0) - lineup.push({ GuideNumber: '1', GuideName: 'PseudoTV', URL: `${req.protocol}://${req.get('host')}/setup` }) + lineup.push({ GuideNumber: '1', GuideName: 'dizqueTV', URL: `${req.protocol}://${req.get('host')}/setup` }) res.send(JSON.stringify(lineup)) }) @@ -60,14 +60,14 @@ function hdhr(db) { function getDevice(db, host) { let hdhrSettings = db['hdhr-settings'].find()[0] var device = { - FriendlyName: "PseudoTV", - Manufacturer: "PseudoTV - Silicondust", - ManufacturerURL: "https://gitlab.org/DEFENDORe/pseudotv-plex", + FriendlyName: "dizqueTV", + Manufacturer: "dizqueTV - Silicondust", + ManufacturerURL: "https://github.com/vexorian/dizquetv", ModelNumber: "HDTC-2US", FirmwareName: "hdhomeruntc_atsc", TunerCount: hdhrSettings.tunerCount, FirmwareVersion: "20170930", - DeviceID: 'PseudoTV', + DeviceID: 'dizqueTV', DeviceAuth: "", BaseURL: `${host}`, LineupURL: `${host}/lineup.json` @@ -82,7 +82,7 @@ function getDevice(db, host) { urn:schemas-upnp-org:device:MediaServer:1 - PseudoTV + dizqueTV Silicondust HDTC-2US HDTC-2US diff --git a/src/plex.js b/src/plex.js index de00333..0364b7b 100644 --- a/src/plex.js +++ b/src/plex.js @@ -10,9 +10,9 @@ class Plex { } this._headers = { 'Accept': 'application/json', - 'X-Plex-Device': 'PseudoTV', - 'X-Plex-Device-Name': 'PseudoTV', - 'X-Plex-Product': 'PseudoTV', + 'X-Plex-Device': 'dizqueTV', + 'X-Plex-Device-Name': 'dizqueTV', + 'X-Plex-Product': 'dizqueTV', 'X-Plex-Version': '0.1', 'X-Plex-Client-Identifier': 'rg14zekk3pa5zp4safjwaa8z', 'X-Plex-Platform': 'Chrome', diff --git a/src/plexTranscoder.js b/src/plexTranscoder.js index 800d1f9..a945404 100644 --- a/src/plexTranscoder.js +++ b/src/plexTranscoder.js @@ -7,8 +7,8 @@ class PlexTranscoder { this.device = "channel-" + channel.number; this.deviceName = this.device; - this.clientIdentifier = this.session.replace(/-/g,"").slice(0,16) + "-org-pseudotv-" + process.platform; - this.product = "PseudoTV"; + this.clientIdentifier = this.session.replace(/-/g,"").slice(0,16) + "-org-dizquetv-" + process.platform; + this.product = "dizqueTV"; this.settings = settings diff --git a/src/svg/dizquetv.svg b/src/svg/dizquetv.svg new file mode 100644 index 0000000..d43ea36 --- /dev/null +++ b/src/svg/dizquetv.svg @@ -0,0 +1,133 @@ + + + + + + + + + + image/svg+xml + + + + + + + + dizqueT + + + + + + + + + + + diff --git a/src/svg/generic-error-screen.svg b/src/svg/generic-error-screen.svg index 192ef64..484f2ca 100644 --- a/src/svg/generic-error-screen.svg +++ b/src/svg/generic-error-screen.svg @@ -7,7 +7,6 @@ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" - xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="1920" @@ -15,7 +14,7 @@ viewBox="0 0 507.99999 285.75001" version="1.1" id="svg8" - inkscape:version="0.92.4 (5da689c313, 2019-01-14)" + inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)" sodipodi:docname="generic-error-screen.svg" inkscape:export-filename="/home/vx/dev/pseudotv/resources/generic-error-screen.png" inkscape:export-xdpi="96" @@ -30,8 +29,8 @@ inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="0.43386034" - inkscape:cx="1327.3621" - inkscape:cy="796.69727" + inkscape:cx="1055.6646" + inkscape:cy="492.08878" inkscape:document-units="mm" inkscape:current-layer="layer1" showgrid="false" @@ -49,7 +48,7 @@ image/svg+xml - + @@ -65,646 +64,6 @@ height="285.75" x="0" y="11.24997" /> - Try again later. + + + + + diff --git a/src/svg/generic-offline.screen.svg b/src/svg/generic-offline.screen.svg index 889bc70..a6f613d 100644 --- a/src/svg/generic-offline.screen.svg +++ b/src/svg/generic-offline.screen.svg @@ -7,7 +7,6 @@ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" - xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="1920" @@ -15,9 +14,9 @@ viewBox="0 0 507.99999 285.75001" version="1.1" id="svg8" - inkscape:version="0.92.4 (5da689c313, 2019-01-14)" + inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)" sodipodi:docname="generic-offline.screen.svg" - inkscape:export-filename="/home/vx/dev/pseudotv/resources/generic-error-screen.png" + inkscape:export-filename="/home/vx/dev/pseudotv/resources/generic-offline-screen.png" inkscape:export-xdpi="96" inkscape:export-ydpi="96"> - + y="11.249983" /> + + + + + diff --git a/src/video.js b/src/video.js index 0a39e16..e8a331c 100644 --- a/src/video.js +++ b/src/video.js @@ -21,9 +21,9 @@ function video(db) { return } - console.log(`\r\nStream starting. Channel: 1 (PseudoTV)`) + console.log(`\r\nStream starting. Channel: 1 (dizqueTV)`) - let ffmpeg = new FFMPEG_TEXT(ffmpegSettings, 'PseudoTV (No Channels Configured)', 'Configure your channels using the PseudoTV Web UI') + let ffmpeg = new FFMPEG_TEXT(ffmpegSettings, 'dizqueTV (No Channels Configured)', 'Configure your channels using the dizqueTV Web UI') ffmpeg.on('data', (data) => { res.write(data) }) @@ -38,7 +38,7 @@ function video(db) { res.on('close', () => { // on HTTP close, kill ffmpeg ffmpeg.kill() - console.log(`\r\nStream ended. Channel: 1 (PseudoTV)`) + console.log(`\r\nStream ended. Channel: 1 (dizqueTV)`) }) }) // Continuously stream video to client. Leverage ffmpeg concat for piecing together videos diff --git a/src/xmltv.js b/src/xmltv.js index 4c14b24..df8cffb 100644 --- a/src/xmltv.js +++ b/src/xmltv.js @@ -14,13 +14,13 @@ function WriteXMLTV(channels, xmlSettings) { ws.on('error', (err) => { reject(err) }) _writeDocStart(xw) async function middle() { - if (channels.length === 0) { // Write Dummy PseudoTV Channel if no channel exists - _writeChannels(xw, [{ number: 1, name: "PseudoTV", icon: "https://raw.githubusercontent.com/DEFENDORe/pseudotv/master/resources/pseudotv.png" }]) + if (channels.length === 0) { // Write Dummy dizqueTV Channel if no channel exists + _writeChannels(xw, [{ number: 1, name: "dizqueTV", icon: "https://raw.githubusercontent.com/vexorain/dizquetv/master/resources/dizquetv.png" }]) let program = { program: { type: 'movie', title: 'No Channels Configured', - summary: 'Configure your channels using the PseudoTV Web UI.' + summary: 'Configure your channels using the dizqueTV Web UI.' }, channel: '1', start: date, diff --git a/web/app.js b/web/app.js index 21e2d81..564d820 100644 --- a/web/app.js +++ b/web/app.js @@ -7,7 +7,7 @@ require('./ext/angularjs-scroll-glue') var app = angular.module('myApp', ['ngRoute', 'angularLazyImg', 'dndLists', 'luegg.directives']) app.service('plex', require('./services/plex')) -app.service('pseudotv', require('./services/pseudotv')) +app.service('dizquetv', require('./services/dizquetv')) app.directive('plexSettings', require('./directives/plex-settings')) app.directive('ffmpegSettings', require('./directives/ffmpeg-settings')) diff --git a/web/controllers/channels.js b/web/controllers/channels.js index 2c4f41c..03dee69 100644 --- a/web/controllers/channels.js +++ b/web/controllers/channels.js @@ -1,15 +1,15 @@ -module.exports = function ($scope, pseudotv) { +module.exports = function ($scope, dizquetv) { $scope.channels = [] $scope.showChannelConfig = false $scope.selectedChannel = null $scope.selectedChannelIndex = -1 - pseudotv.getChannels().then((channels) => { + dizquetv.getChannels().then((channels) => { $scope.channels = channels }) $scope.removeChannel = (channel) => { if (confirm("Are you sure to delete channel: " + channel.name + "?")) { - pseudotv.removeChannel(channel).then((channels) => { + dizquetv.removeChannel(channel).then((channels) => { $scope.channels = channels }) } @@ -17,11 +17,11 @@ module.exports = function ($scope, pseudotv) { $scope.onChannelConfigDone = (channel) => { if (typeof channel !== 'undefined') { if ($scope.selectedChannelIndex == -1) { // add new channel - pseudotv.addChannel(channel).then((channels) => { + dizquetv.addChannel(channel).then((channels) => { $scope.channels = channels }) } else { // update existing channel - pseudotv.updateChannel(channel).then((channels) => { + dizquetv.updateChannel(channel).then((channels) => { $scope.channels = channels }) } diff --git a/web/controllers/version.js b/web/controllers/version.js index 0979029..cd11aac 100644 --- a/web/controllers/version.js +++ b/web/controllers/version.js @@ -1,7 +1,7 @@ -module.exports = function ($scope, pseudotv) { - $scope.version = "Getting PseudoTV version..." - pseudotv.getVersion().then((version) => { - $scope.version = version.pseudotv +module.exports = function ($scope, dizquetv) { + $scope.version = "Getting dizqueTV version..." + dizquetv.getVersion().then((version) => { + $scope.version = version.dizquetv }) diff --git a/web/directives/channel-config.js b/web/directives/channel-config.js index 3dc25fe..41adfbe 100644 --- a/web/directives/channel-config.js +++ b/web/directives/channel-config.js @@ -22,7 +22,7 @@ module.exports = function ($timeout, $location) { scope.channel.fillerRepeatCooldown = 30 * 60 * 1000; scope.channel.fallback = []; scope.isNewChannel = true - scope.channel.icon = `${$location.protocol()}://${location.host}/images/pseudotv.png` + scope.channel.icon = `${$location.protocol()}://${location.host}/images/dizquetv.png` scope.channel.disableFillerOverlay = true; scope.channel.iconWidth = 120 scope.channel.iconDuration = 60 diff --git a/web/directives/ffmpeg-settings.js b/web/directives/ffmpeg-settings.js index a1f766d..761b135 100644 --- a/web/directives/ffmpeg-settings.js +++ b/web/directives/ffmpeg-settings.js @@ -1,4 +1,4 @@ - module.exports = function (pseudotv) { + module.exports = function (dizquetv) { return { restrict: 'E', templateUrl: 'templates/ffmpeg-settings.html', @@ -6,16 +6,16 @@ scope: { }, link: function (scope, element, attrs) { - pseudotv.getFfmpegSettings().then((settings) => { + dizquetv.getFfmpegSettings().then((settings) => { scope.settings = settings }) scope.updateSettings = (settings) => { - pseudotv.updateFfmpegSettings(settings).then((_settings) => { + dizquetv.updateFfmpegSettings(settings).then((_settings) => { scope.settings = _settings }) } scope.resetSettings = (settings) => { - pseudotv.resetFfmpegSettings(settings).then((_settings) => { + dizquetv.resetFfmpegSettings(settings).then((_settings) => { scope.settings = _settings }) } diff --git a/web/directives/hdhr-settings.js b/web/directives/hdhr-settings.js index 6c29e16..80535fa 100644 --- a/web/directives/hdhr-settings.js +++ b/web/directives/hdhr-settings.js @@ -1,4 +1,4 @@ -module.exports = function (pseudotv, $timeout) { +module.exports = function (dizquetv, $timeout) { return { restrict: 'E', templateUrl: 'templates/hdhr-settings.html', @@ -6,7 +6,7 @@ module.exports = function (pseudotv, $timeout) { scope: { }, link: function (scope, element, attrs) { - pseudotv.getHdhrSettings().then((settings) => { + dizquetv.getHdhrSettings().then((settings) => { scope.settings = settings }) scope.updateSettings = (settings) => { @@ -19,12 +19,12 @@ module.exports = function (pseudotv, $timeout) { $timeout(() => { scope.error = null }, 3500) - pseudotv.updateHdhrSettings(settings).then((_settings) => { + dizquetv.updateHdhrSettings(settings).then((_settings) => { scope.settings = _settings }) } scope.resetSettings = (settings) => { - pseudotv.resetHdhrSettings(settings).then((_settings) => { + dizquetv.resetHdhrSettings(settings).then((_settings) => { scope.settings = _settings }) } diff --git a/web/directives/plex-library.js b/web/directives/plex-library.js index ec0c605..c906a62 100644 --- a/web/directives/plex-library.js +++ b/web/directives/plex-library.js @@ -1,4 +1,4 @@ -module.exports = function (plex, pseudotv, $timeout) { +module.exports = function (plex, dizquetv, $timeout) { return { restrict: 'E', templateUrl: 'templates/plex-library.html', @@ -41,7 +41,7 @@ module.exports = function (plex, pseudotv, $timeout) { }, 0) }) } - pseudotv.getPlexServers().then((servers) => { + dizquetv.getPlexServers().then((servers) => { if (servers.length === 0) { scope.noServers = true return diff --git a/web/directives/plex-settings.js b/web/directives/plex-settings.js index a02b5d5..24785df 100644 --- a/web/directives/plex-settings.js +++ b/web/directives/plex-settings.js @@ -1,11 +1,11 @@ -module.exports = function (plex, pseudotv, $timeout) { +module.exports = function (plex, dizquetv, $timeout) { return { restrict: 'E', templateUrl: 'templates/plex-settings.html', replace: true, scope: {}, link: function (scope, element, attrs) { - pseudotv.getPlexServers().then((servers) => { + dizquetv.getPlexServers().then((servers) => { scope.servers = servers }) scope.addPlexServer = function () { @@ -15,10 +15,10 @@ module.exports = function (plex, pseudotv, $timeout) { result.servers.forEach((server) => { // add in additional settings server.arGuide = true - server.arChannels = false // should not be enabled unless PseudoTV tuner already added to plex - pseudotv.addPlexServer(server) + server.arChannels = false // should not be enabled unless dizqueTV tuner already added to plex + dizquetv.addPlexServer(server) }); - return pseudotv.getPlexServers() + return dizquetv.getPlexServers() }).then((servers) => { scope.$apply(() => { scope.servers = servers @@ -35,21 +35,21 @@ module.exports = function (plex, pseudotv, $timeout) { }) } scope.deletePlexServer = (x) => { - pseudotv.removePlexServer(x) + dizquetv.removePlexServer(x) .then((servers) => { scope.servers = servers }) } - pseudotv.getPlexSettings().then((settings) => { + dizquetv.getPlexSettings().then((settings) => { scope.settings = settings }) scope.updateSettings = (settings) => { - pseudotv.updatePlexSettings(settings).then((_settings) => { + dizquetv.updatePlexSettings(settings).then((_settings) => { scope.settings = _settings }) } scope.resetSettings = (settings) => { - pseudotv.resetPlexSettings(settings).then((_settings) => { + dizquetv.resetPlexSettings(settings).then((_settings) => { scope.settings = _settings }) } diff --git a/web/directives/xmltv-settings.js b/web/directives/xmltv-settings.js index fc1f5bf..03297b1 100644 --- a/web/directives/xmltv-settings.js +++ b/web/directives/xmltv-settings.js @@ -1,4 +1,4 @@ -module.exports = function (pseudotv) { +module.exports = function (dizquetv) { return { restrict: 'E', templateUrl: 'templates/xmltv-settings.html', @@ -6,16 +6,16 @@ module.exports = function (pseudotv) { scope: { }, link: function (scope, element, attrs) { - pseudotv.getXmltvSettings().then((settings) => { + dizquetv.getXmltvSettings().then((settings) => { scope.settings = settings }) scope.updateSettings = (settings) => { - pseudotv.updateXmltvSettings(settings).then((_settings) => { + dizquetv.updateXmltvSettings(settings).then((_settings) => { scope.settings = _settings }) } scope.resetSettings = (settings) => { - pseudotv.resetXmltvSettings(settings).then((_settings) => { + dizquetv.resetXmltvSettings(settings).then((_settings) => { scope.settings = _settings }) } diff --git a/web/public/index.html b/web/public/index.html index 7195b3b..6cea21f 100644 --- a/web/public/index.html +++ b/web/public/index.html @@ -1,7 +1,7 @@ - PseudoTV + dizqueTV @@ -11,9 +11,9 @@
-

PseudoTV +

dizqueTV - + diff --git a/web/public/templates/ffmpeg-settings.html b/web/public/templates/ffmpeg-settings.html index c3e4b6c..6fa279f 100644 --- a/web/public/templates/ffmpeg-settings.html +++ b/web/public/templates/ffmpeg-settings.html @@ -121,7 +121,7 @@ ng-options="o.value as o.description for o in errorAudios" />

- If there are issues playing a video, pseudoTV will try to use an error screen as a placeholder while retrying loading the video every 60 seconds. + If there are issues playing a video, dizqueTV will try to use an error screen as a placeholder while retrying loading the video every 60 seconds. @@ -130,7 +130,7 @@
- Some clients experience issues when the video stream changes resolution. This option will make pseudoTV convert all videos to the preferred resolution selected above. + Some clients experience issues when the video stream changes resolution. This option will make dizqueTV convert all videos to the preferred resolution selected above.
diff --git a/web/public/views/version.html b/web/public/views/version.html index ee87ad0..9f29b91 100644 --- a/web/public/views/version.html +++ b/web/public/views/version.html @@ -9,7 +9,7 @@ Version - PseudoTV + dizqueTV {{version}} diff --git a/web/services/pseudotv.js b/web/services/dizquetv.js similarity index 100% rename from web/services/pseudotv.js rename to web/services/dizquetv.js diff --git a/web/services/plex.js b/web/services/plex.js index a4dc096..7dec1b5 100644 --- a/web/services/plex.js +++ b/web/services/plex.js @@ -5,7 +5,7 @@ module.exports = function ($http, $window, $interval) { login: async () => { const headers = { 'Accept': 'application/json', - 'X-Plex-Product': 'PseudoTV', + 'X-Plex-Product': 'dizqueTV', 'X-Plex-Version': 'Plex OAuth', 'X-Plex-Client-Identifier': 'rg14zekk3pa5zp4safjwaa8z', 'X-Plex-Model': 'Plex OAuth'