From 7e4d6b171fa87ffb7084344a10d653dd2cb30ea2 Mon Sep 17 00:00:00 2001 From: 4gray Date: Sat, 11 Mar 2023 18:27:16 +0100 Subject: [PATCH] feat: export playlist as m3u --- angular.json | 330 +++++++++--------- .../playlist-info.component.html | 4 + .../playlist-info.component.spec.ts | 5 +- .../playlist-info/playlist-info.component.ts | 24 +- src/app/services/playlists.service.ts | 11 +- src/assets/i18n/de.json | 3 +- src/assets/i18n/en.json | 3 +- src/assets/i18n/ru.json | 3 +- 8 files changed, 204 insertions(+), 179 deletions(-) diff --git a/angular.json b/angular.json index 4ad1b8370..1c5bbc925 100644 --- a/angular.json +++ b/angular.json @@ -1,177 +1,165 @@ { - "$schema": "./node_modules/@angular/cli/lib/config/schema.json", - "cli": { - "schematicCollections": [ - "@angular-eslint/schematics" - ] - }, - "version": 1, - "newProjectRoot": "projects", - "projects": { - "iptvnator": { - "root": "", - "sourceRoot": "src", - "projectType": "application", - "schematics": { - "@schematics/angular:application": { - "strict": true, - "style": "scss" - } - }, - "architect": { - "build": { - "builder": "@angular-builders/custom-webpack:browser", - "options": { - "outputPath": "dist", - "index": "src/index.html", - "main": "src/main.ts", - "tsConfig": "src/tsconfig.app.json", - "polyfills": "src/polyfills.ts", - "assets": [ - "src/favicon.ico", - "src/assets", - "src/manifest.webmanifest" - ], - "styles": [ - "src/styles.scss" - ], - "scripts": [], - "customWebpackConfig": { - "path": "./angular.webpack.js", - "replaceDuplicatePlugins": true - }, - "serviceWorker": true, - "ngswConfigPath": "ngsw-config.json", - "webWorkerTsConfig": "tsconfig.worker.json" - }, - "configurations": { - "dev": { - "optimization": false, - "outputHashing": "none", - "sourceMap": true, - "namedChunks": false, - "aot": false, - "extractLicenses": true, - "vendorChunk": false, - "buildOptimizer": false, - "fileReplacements": [ - { - "replace": "src/environments/environment.ts", - "with": "src/environments/environment.dev.ts" - } - ] - }, - "web": { - "optimization": true, - "outputHashing": "all", - "sourceMap": false, - "namedChunks": false, - "aot": true, - "extractLicenses": true, - "vendorChunk": false, - "buildOptimizer": true, - "fileReplacements": [ - { - "replace": "src/environments/environment.ts", - "with": "src/environments/environment.web.ts" - } - ] - }, - "production": { - "optimization": true, - "outputHashing": "all", - "sourceMap": false, - "namedChunks": false, - "aot": true, - "extractLicenses": true, - "vendorChunk": false, - "buildOptimizer": true, - "fileReplacements": [ - { - "replace": "src/environments/environment.ts", - "with": "src/environments/environment.prod.ts" - } - ] - } - } - }, - "serve": { - "builder": "@angular-builders/custom-webpack:dev-server", - "options": { - "browserTarget": "iptvnator:build" - }, - "configurations": { - "dev": { - "browserTarget": "iptvnator:build:dev" - }, - "web": { - "browserTarget": "iptvnator:build:web" - }, - "production": { - "browserTarget": "iptvnator:build:production" - } - } - }, - "extract-i18n": { - "builder": "@angular-devkit/build-angular:extract-i18n", - "options": { - "browserTarget": "iptvnator:build" - } - }, - "test": { - "builder": "@angular-builders/custom-webpack:karma", - "options": { - "main": "src/test.ts", - "polyfills": "src/polyfills-test.ts", - "tsConfig": "src/tsconfig.spec.json", - "karmaConfig": "src/karma.conf.js", - "scripts": [], - "styles": [ - "src/styles.scss" - ], - "assets": [ - "src/assets" - ], - "customWebpackConfig": { - "path": "./angular.webpack.js", - "replaceDuplicatePlugins": true - }, - "webWorkerTsConfig": "tsconfig.worker.json" - } - }, - "lint": { - "builder": "@angular-eslint/builder:lint", - "options": { - "lintFilePatterns": [ - "src/**/*.ts", - "src/**/*.html" - ] - } - } - } + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "cli": { + "schematicCollections": ["@angular-eslint/schematics"], + "analytics": false }, - "iptvnator-e2e": { - "root": "e2e", - "projectType": "application", - "architect": { - "lint": { - "builder": "@angular-eslint/builder:lint", - "options": { - "lintFilePatterns": [ - "e2e/**/*.ts" - ] - } + "version": 1, + "newProjectRoot": "projects", + "projects": { + "iptvnator": { + "root": "", + "sourceRoot": "src", + "projectType": "application", + "schematics": { + "@schematics/angular:application": { + "strict": true, + "style": "scss" + } + }, + "architect": { + "build": { + "builder": "@angular-builders/custom-webpack:browser", + "options": { + "outputPath": "dist", + "index": "src/index.html", + "main": "src/main.ts", + "tsConfig": "src/tsconfig.app.json", + "polyfills": "src/polyfills.ts", + "assets": [ + "src/favicon.ico", + "src/assets", + "src/manifest.webmanifest" + ], + "styles": ["src/styles.scss"], + "scripts": [], + "customWebpackConfig": { + "path": "./angular.webpack.js", + "replaceDuplicatePlugins": true + }, + "serviceWorker": true, + "ngswConfigPath": "ngsw-config.json", + "webWorkerTsConfig": "tsconfig.worker.json" + }, + "configurations": { + "dev": { + "optimization": false, + "outputHashing": "none", + "sourceMap": true, + "namedChunks": false, + "aot": false, + "extractLicenses": true, + "vendorChunk": false, + "buildOptimizer": false, + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.dev.ts" + } + ] + }, + "web": { + "optimization": true, + "outputHashing": "all", + "sourceMap": false, + "namedChunks": false, + "aot": true, + "extractLicenses": true, + "vendorChunk": false, + "buildOptimizer": true, + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.web.ts" + } + ] + }, + "production": { + "optimization": true, + "outputHashing": "all", + "sourceMap": false, + "namedChunks": false, + "aot": true, + "extractLicenses": true, + "vendorChunk": false, + "buildOptimizer": true, + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.prod.ts" + } + ] + } + } + }, + "serve": { + "builder": "@angular-builders/custom-webpack:dev-server", + "options": { + "browserTarget": "iptvnator:build" + }, + "configurations": { + "dev": { + "browserTarget": "iptvnator:build:dev" + }, + "web": { + "browserTarget": "iptvnator:build:web" + }, + "production": { + "browserTarget": "iptvnator:build:production" + } + } + }, + "extract-i18n": { + "builder": "@angular-devkit/build-angular:extract-i18n", + "options": { + "browserTarget": "iptvnator:build" + } + }, + "test": { + "builder": "@angular-builders/custom-webpack:karma", + "options": { + "main": "src/test.ts", + "polyfills": "src/polyfills-test.ts", + "tsConfig": "src/tsconfig.spec.json", + "karmaConfig": "src/karma.conf.js", + "scripts": [], + "styles": ["src/styles.scss"], + "assets": ["src/assets"], + "customWebpackConfig": { + "path": "./angular.webpack.js", + "replaceDuplicatePlugins": true + }, + "webWorkerTsConfig": "tsconfig.worker.json" + } + }, + "lint": { + "builder": "@angular-eslint/builder:lint", + "options": { + "lintFilePatterns": ["src/**/*.ts", "src/**/*.html"] + } + } + } + }, + "iptvnator-e2e": { + "root": "e2e", + "projectType": "application", + "architect": { + "lint": { + "builder": "@angular-eslint/builder:lint", + "options": { + "lintFilePatterns": ["e2e/**/*.ts"] + } + } + } } - } - } - }, - "schematics": { - "@schematics/angular:component": { - "prefix": "app", - "style": "scss" }, - "@schematics/angular:directive": { - "prefix": "app" + "schematics": { + "@schematics/angular:component": { + "prefix": "app", + "style": "scss" + }, + "@schematics/angular:directive": { + "prefix": "app" + } } - } } diff --git a/src/app/home/recent-playlists/playlist-info/playlist-info.component.html b/src/app/home/recent-playlists/playlist-info/playlist-info.component.html index 778ac7892..066dc6726 100644 --- a/src/app/home/recent-playlists/playlist-info/playlist-info.component.html +++ b/src/app/home/recent-playlists/playlist-info/playlist-info.component.html @@ -67,6 +67,10 @@ + +