Showing with 17,577 additions and 10,465 deletions.
  1. +1 −0 .eslintignore
  2. +2 −2 .github/workflows/ci.yaml
  3. +35 −46 .github/workflows/release.yml
  4. +4 −0 .gitignore
  5. +1 −0 .prettierignore
  6. +24 −1 CHANGELOG.md
  7. +8 −5 angular.json
  8. +58 −0 e2e/basic.test.ts
  9. +8 −0 e2e/playwright.config.ts
  10. +4 −4 electron-builder.json
  11. +48 −11 { → electron}/api.ts
  12. 0 { → electron}/epg-worker.html
  13. +51 −5 { → electron}/epg-worker.ts
  14. +10 −6 { → electron}/main.ts
  15. +3 −3 { → electron}/menu.ts
  16. +7 −0 electron/package.json
  17. 0 { → electron}/preload.ts
  18. +1 −1 jest.config.js
  19. +15,441 −9,695 package-lock.json
  20. +51 −46 package.json
  21. +4 −0 shared/ipc-commands.ts
  22. +7 −25 src/app/app.component.spec.ts
  23. +18 −46 src/app/app.component.ts
  24. +0 −5 src/app/home/file-upload/file-upload.component.scss
  25. +26 −5 src/app/home/home.component.html
  26. +6 −0 src/app/home/home.component.scss
  27. +28 −38 src/app/home/home.component.ts
  28. +2 −0 src/app/home/home.module.ts
  29. +2 −2 src/app/home/recent-playlists/playlist-info/playlist-info.component.spec.ts
  30. +12 −12 src/app/home/recent-playlists/playlist-info/playlist-info.component.ts
  31. +5 −0 src/app/home/recent-playlists/playlist-item/playlist-item.component.html
  32. +14 −0 src/app/home/recent-playlists/playlist-item/playlist-item.component.scss
  33. +1 −1 src/app/home/recent-playlists/playlist-item/playlist-item.component.ts
  34. +4 −2 src/app/home/recent-playlists/recent-playlists.component.html
  35. +2 −2 src/app/home/recent-playlists/recent-playlists.component.spec.ts
  36. +31 −5 src/app/home/recent-playlists/recent-playlists.component.ts
  37. +18 −0 src/app/home/text-import/text-import.component.html
  38. +8 −0 src/app/home/text-import/text-import.component.scss
  39. +35 −0 src/app/home/text-import/text-import.component.spec.ts
  40. +15 −0 src/app/home/text-import/text-import.component.ts
  41. +3 −3 src/app/home/url-upload/url-upload.component.ts
  42. +21 −6 src/app/player/components/channel-list-container/channel-list-container.component.html
  43. +35 −17 src/app/player/components/channel-list-container/channel-list-container.component.scss
  44. +10 −10 src/app/player/components/channel-list-container/channel-list-container.component.ts
  45. +7 −7 src/app/player/components/epg-list/epg-list.component.ts
  46. +2 −3 src/app/player/components/info-overlay/info-overlay.component.html
  47. +15 −0 src/app/player/components/info-overlay/info-overlay.component.scss
  48. +142 −0 src/app/player/components/multi-epg/multi-epg-container.component.html
  49. +70 −0 src/app/player/components/multi-epg/multi-epg-container.component.scss
  50. +212 −0 src/app/player/components/multi-epg/multi-epg-container.component.ts
  51. +21 −7 src/app/player/components/video-player/video-player.component.html
  52. +13 −0 src/app/player/components/video-player/video-player.component.scss
  53. +71 −24 src/app/player/components/video-player/video-player.component.ts
  54. +16 −8 src/app/player/player.module.ts
  55. +50 −0 src/app/services/epg.service.spec.ts
  56. +69 −0 src/app/services/epg.service.ts
  57. +103 −26 src/app/services/pwa.service.ts
  58. +5 −3 src/app/services/settings.service.spec.ts
  59. +31 −3 src/app/services/settings.service.ts
  60. +53 −0 src/app/services/whats-new.service.ts
  61. +187 −157 src/app/settings/settings.component.html
  62. +0 −6 src/app/settings/settings.component.scss
  63. +5 −5 src/app/settings/settings.component.spec.ts
  64. +107 −71 src/app/settings/settings.component.ts
  65. +1 −1 src/app/settings/settings.interface.ts
  66. +29 −21 src/app/shared/components/header/header.component.html
  67. +30 −6 src/app/shared/components/header/header.component.scss
  68. +18 −13 src/app/shared/components/header/header.component.ts
  69. +16 −0 src/app/shared/playlist-meta.type.ts
  70. +2 −2 src/app/state/channel.store.ts
  71. +23 −4 src/assets/i18n/de.json
  72. +23 −4 src/assets/i18n/en.json
  73. +23 −4 src/assets/i18n/es.json
  74. +56 −37 src/assets/i18n/fr.json
  75. +23 −4 src/assets/i18n/ko.json
  76. +23 −4 src/assets/i18n/ru.json
  77. +23 −4 src/assets/i18n/zh.json
  78. BIN src/assets/updates/0110/import-playlist-as-text.png
  79. BIN src/assets/updates/0110/multi-epg-view.png
  80. BIN src/assets/updates/0110/multiple-epg-sources.png
  81. +10 −3 src/styles.scss
  82. +1 −1 src/themes/dark.scss
  83. +2 −2 src/tsconfig.app.json
  84. +3 −2 tsconfig.json
  85. +17 −28 tsconfig.serve.json
  86. +1 −1 tsconfig.spec.json
  87. +10 −0 tsconfig.worker.json
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/*.worker.ts
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
# release the app after building
release: ${{ startsWith(github.ref, 'refs/tags/v') }}
- name: Archive production artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: dev-release
path: ./release/iptvnator*
path: ./release/iptvnator/**
81 changes: 35 additions & 46 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,51 +3,9 @@ on:
create:
tags:
- v*
push:
branches:
- master
workflow_dispatch:
jobs:
build-and-test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: "16.x"
- run: git config --global url."https://${{ secrets.PAT }}@github.com/".insteadOf ssh://git@github.com/
- run: npm install
- run: npm test -- --coverage
- run: bash <(curl -s https://codecov.io/bash)
- run: npm run build:prod
env:
CI: true
release:
needs: [build-and-test]
name: Release
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: "16.x"
- name: Install dependencies
run: npm ci
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
run: npx semantic-release
package:
needs: [build-and-test, release]
runs-on: ${{ matrix.os }}

strategy:
Expand All @@ -56,12 +14,12 @@ jobs:

steps:
- name: Check out Git repository
uses: actions/checkout@v1
uses: actions/checkout@v2

- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: "16.x"
node-version: 16

- name: Install Snapcraft
uses: samuelmeuli/action-snapcraft@v1
Expand All @@ -70,9 +28,40 @@ jobs:
with:
# Log in to Snap Store
snapcraft_token: ${{ secrets.snapcraft_token }}

- name: Package Linux
if: startsWith(matrix.os, 'ubuntu')
run: |
npm ci
npm run build
npx electron-builder --linux snap --armv7l --publish always
npx electron-builder --linux snap --x64 --publish always
npx electron-builder --linux deb rpm --x64 --publish always
npx electron-builder --linux deb --ia32 --publish always
npx electron-builder --linux deb --arm64 --publish always
npx electron-builder --linux deb --armv7l --publish always
npx electron-builder --linux AppImage --x64 --publish always
npx electron-builder --linux AppImage --ia32 --publish always
npx electron-builder --linux AppImage --arm64 --publish always
npx electron-builder --linux AppImage --armv7l --publish always
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Release Electron app - MacOS
uses: samuelmeuli/action-electron-builder@v1
if: startsWith(matrix.os, 'macos')
with:
# GitHub token, automatically provided to the action
# (No need to define this secret in the repo settings)
github_token: ${{ secrets.github_token }}

# If the commit is tagged with a version (e.g. "v1.0.0"),
# release the app after building
release: ${{ startsWith(github.ref, 'refs/tags/v') }}

- name: Build/release Electron app
- name: Release Electron app - Windows
uses: samuelmeuli/action-electron-builder@v1
if: startsWith(matrix.os, 'windows')
with:
# GitHub token, automatically provided to the action
# (No need to define this secret in the repo settings)
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@

# compiled output
/dist
/build
/tmp
/out-tsc
/app-builds
/release
/e2e/tracing
/e2e/screenshots
/test-results
api.js
epg-worker.js
main.js
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.yml
dist
build
coverage
release
25 changes: 24 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
# [0.10.0](https://github.com/4gray/iptvnator/compare/v0.9.0...v0.10.0) (2022-04-24)


### Bug Fixes

* capitalize app name [#117](https://github.com/4gray/iptvnator/issues/117) ([36d3eaa](https://github.com/4gray/iptvnator/commit/36d3eaa54d546de64a9522583772cf411a2866c4))
* epg function to compare channel ids ([c7de39e](https://github.com/4gray/iptvnator/commit/c7de39e7c4fa46d9d09adb34a88a060fa9570ea6))


### Features

* add context menu with default actions ([44e76e0](https://github.com/4gray/iptvnator/commit/44e76e0e35eccc085c9b35ddd3a112b6c1aa8e09)), closes [#96](https://github.com/4gray/iptvnator/issues/96)
* add option to change aspect ratio ([b8a3f76](https://github.com/4gray/iptvnator/commit/b8a3f76c40f44416eb69b7ab0d99bf6ad3b5307b)), closes [#80](https://github.com/4gray/iptvnator/issues/80)
* add option to select stream resolution ([c23fe3a](https://github.com/4gray/iptvnator/commit/c23fe3a923ff5b60930f9968ec9cfb611b552858)), closes [#93](https://github.com/4gray/iptvnator/issues/93)
* add pwa support ([5a5085d](https://github.com/4gray/iptvnator/commit/5a5085dcf7e7ba956c02db539160bb06ebce5e80))
* auto-detect if OS is in dark mode ([ad26588](https://github.com/4gray/iptvnator/commit/ad265884e6976ad4ddc636434bf97bc3e02c7613))
* generate global playlist with all favorites ([764201a](https://github.com/4gray/iptvnator/commit/764201a0afa03b0ed3c075e3c3cfcf6fba5c105a)), closes [#97](https://github.com/4gray/iptvnator/issues/97)
* integrate french localization ([ab75a2f](https://github.com/4gray/iptvnator/commit/ab75a2f83752ccebd07ca0dd13e9ded1e58e0efc))
* **pwa:** auto-generate playlist with global favorites ([98ff7f4](https://github.com/4gray/iptvnator/commit/98ff7f4fa4576e00d3de0afd05395f673622ddd8))
* switch playlists from the sidebar ([0bc71d4](https://github.com/4gray/iptvnator/commit/0bc71d47911c9b87cbe92f20f7d024c0027349e1))



# [0.9.0](https://github.com/4gray/iptvnator/compare/v0.8.0...v0.9.0) (2021-10-14)


Expand Down Expand Up @@ -86,12 +109,12 @@

### Features

* **epg:** epg program list with date navigation ([fdbe02b](https://github.com/4gray/iptvnator/commit/fdbe02b47e400cdad0c6e0294579150590ac5c14))
* add `ctrl+f` as hotkey to focus search field ([cad162d](https://github.com/4gray/iptvnator/commit/cad162dc6700a9543571ef051b24d123d41fe9f9))
* add epg worker with new ipc commands ([418566f](https://github.com/4gray/iptvnator/commit/418566f6317960e83edff117a036b54df2eac07b))
* add moment.js based date pipe ([4881ba8](https://github.com/4gray/iptvnator/commit/4881ba8fe073fd425942773e04bbc98bb7d02aaa))
* check for available update ([68ccabb](https://github.com/4gray/iptvnator/commit/68ccabbcb110295aa46a88b1c6c70d057ffaef66))
* epg integration ([2e861b6](https://github.com/4gray/iptvnator/commit/2e861b6a1f2c0744bc1eaae632a79087d1721f41))
* **epg:** epg program list with date navigation ([fdbe02b](https://github.com/4gray/iptvnator/commit/fdbe02b47e400cdad0c6e0294579150590ac5c14))
* favorite channels list ([f02bbe3](https://github.com/4gray/iptvnator/commit/f02bbe39a66a12fd1d3b12863aa2b32048b7691f))
* integrate epg feature ([e896af0](https://github.com/4gray/iptvnator/commit/e896af037303990c95d95efac7296365e8c714ee))
* integrate epg worker & refactor app menu ([3b97d74](https://github.com/4gray/iptvnator/commit/3b97d74e0b39b20d62f4b2911fe0af1a7c70891b))
Expand Down
13 changes: 8 additions & 5 deletions angular.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"cli": {
"defaultCollection": "@angular-eslint/schematics"
"schematicCollections": [
"@angular-eslint/schematics"
]
},
"version": 1,
"newProjectRoot": "projects",
Expand All @@ -19,7 +21,7 @@
"build": {
"builder": "@angular-builders/custom-webpack:browser",
"options": {
"outputPath": "dist",
"outputPath": "build",
"index": "src/index.html",
"main": "src/main.ts",
"tsConfig": "src/tsconfig.app.json",
Expand All @@ -38,7 +40,8 @@
"replaceDuplicatePlugins": true
},
"serviceWorker": true,
"ngswConfigPath": "ngsw-config.json"
"ngswConfigPath": "ngsw-config.json",
"webWorkerTsConfig": "tsconfig.worker.json"
},
"configurations": {
"dev": {
Expand Down Expand Up @@ -131,7 +134,8 @@
"customWebpackConfig": {
"path": "./angular.webpack.js",
"replaceDuplicatePlugins": true
}
},
"webWorkerTsConfig": "tsconfig.worker.json"
}
},
"lint": {
Expand Down Expand Up @@ -160,7 +164,6 @@
}
}
},
"defaultProject": "iptvnator",
"schematics": {
"@schematics/angular:component": {
"prefix": "app",
Expand Down
58 changes: 58 additions & 0 deletions e2e/basic.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import { expect, test } from '@playwright/test';
import {
BrowserContext,
ElectronApplication,
Page,
_electron as electron,
} from 'playwright';
const PATH = require('path');

test.describe('Check Home Page', async () => {
let app: ElectronApplication;
let firstWindow: Page;
let context: BrowserContext;

test.beforeAll(async () => {
app = await electron.launch({
args: [
PATH.join(__dirname, '../electron/main.js'),
PATH.join(__dirname, '../electron/package.json'),
],
});
context = app.context();
//await context.tracing.start({ screenshots: true, snapshots: true });

firstWindow = await app.windows()[0];
const isMainWindow = (await firstWindow.title()) === 'IPTVnator';
if (!isMainWindow) {
firstWindow = await app.windows()[1];
}
await firstWindow.waitForLoadState('domcontentloaded');
});

test('Launch electron app', async () => {
const windowState = await app.evaluate(async (process) => {
let mainWindow = process.BrowserWindow.getAllWindows()[0];
const isMainWindow = mainWindow.title === 'IPTVnator';
if (!isMainWindow) {
mainWindow = process.BrowserWindow.getAllWindows()[1];
}
return {
isVisible: mainWindow.isVisible(),
isDevToolsOpened: mainWindow.webContents.isDevToolsOpened(),
isCrashed: mainWindow.webContents.isCrashed(),
};
});

expect(windowState.isVisible).toBeTruthy();
expect(windowState.isDevToolsOpened).toBeFalsy();
expect(windowState.isCrashed).toBeFalsy();
expect(app.windows()).toHaveLength(2);
});

test('Check title', async ({ page }) => {
const title = await firstWindow.title();
await firstWindow.screenshot({ path: 'e2e/screenshots/intro.png' });
expect(title).toBe('IPTVnator');
});
});
8 changes: 8 additions & 0 deletions e2e/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { PlaywrightTestConfig } from '@playwright/test';

const config: PlaywrightTestConfig = {
testDir: '.',
maxFailures: 2,
};

export default config;
8 changes: 4 additions & 4 deletions electron-builder.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"!tslint.json"
],
"win": {
"icon": "dist/assets/icons",
"icon": "build/assets/icons",
"compression": "maximum",
"target": [
{
Expand All @@ -28,14 +28,14 @@
]
},
"mac": {
"icon": "dist/assets/icons/icon-1024.png",
"icon": "build/assets/icons/icon-1024.png",
"target": {
"target": "dmg",
"arch": ["arm64", "x64"]
"arch": ["universal"]
}
},
"linux": {
"icon": "dist/assets/icons",
"icon": "build/assets/icons",
"category": "Video",
"target": [
{
Expand Down
Loading