random changes

This commit is contained in:
X4Lo committed 2024-08-29 19:03:12 +01:00
1 parent 92aedb65d0
commit 6a5ce2cc5e
8 files changed
+117 -13

No files matched your search

+4
View File
@@ -0,0 +1,4 @@
.angular
.git
node_modules
.editorconfig
+11
View File
@@ -0,0 +1,11 @@
FROM node:18.17.1-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm install
RUN npx ngcc --properties es2023 browser module main --first-only --create-ivy-entry-points
COPY . .
RUN npm run build-and-copy
FROM nginx:stable
COPY --from=build /app/dist/showy/ /usr/share/nginx/html
EXPOSE 80
+15
View File
@@ -0,0 +1,15 @@
services:
showy:
container_name: showycontainer
build: .
image: showy:latest
ports:
- 80:80
expose:
- 80
networks:
- internalnet
networks:
internalnet:
driver: bridge
+6 -4
View File
@@ -13,13 +13,15 @@ const routes: Routes = [
{ path: 'search', component: SearchPageComponent },
{ path: 'popular', component: PopularComponent },
{ path: 'trending', component: TrendingComponent },
{
path: 'discover',
loadChildren: () =>
import('./features/discover/discover.module').then((m) => m.DiscoverModule),
},
{
path: 'library',
loadChildren: () =>
import('./features/library/library.module').then(
(m) => m.LibraryModule
),
import('./features/library/library.module').then((m) => m.LibraryModule),
},
{ path: 'favorit', component: FavoritComponent },
{ path: 'watchlist', component: WatchlistComponent },
+2 -2
View File
@@ -15,11 +15,11 @@ import { EpisodeSeenService } from './services/episode-seen.service';
import { ThemeService } from './services/theme.service';
import { SeasonService } from './services/season.service';
import { SearchPopupComponent } from './components/search-popup/search-popup.component';
import { FormsModule } from '@angular/forms';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
@NgModule({
declarations: [SidebarComponent, NavbarComponent, SearchPopupComponent],
imports: [CommonModule, RouterModule, FormsModule],
imports: [CommonModule, RouterModule, FormsModule, ReactiveFormsModule],
providers: [
TmdbService,
LibraryService,
+31 -6
View File
@@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable, from, map, of, switchMap, toArray } from 'rxjs';
import { Observable, filter, from, map, of, switchMap, toArray } from 'rxjs';
import { Entry } from '../../shared/models/entry.model';
import { EntryId } from '../../shared/models/entryId.model';
import { EntryRating } from '../../shared/models/entryRating.model';
@@ -75,13 +75,37 @@ export class TmdbService {
var endPoint = `${this.tmdb_apiUrl}/search/${type}?query=${keyword}&page=${page}&api_key=${this.tmdb_apiKey}&language=en-US`;
return this.fetchdataNoCach(endPoint).pipe(
switchMap((response) => from(response.results.map((movie: any) => this.adaptMovieToEntry(movie)))
.pipe(
switchMap((response) =>
from(
response.results.map((movie: any) => this.adaptMovieToEntry(movie))
).pipe(
toArray(),
map(entries => ({
map((entries) => ({
entries: entries,
total_pages: response.total_pages,
total_results: response.total_results
total_results: response.total_results,
}))
)
)
);
}
getByKeywordMulti(keyword: string, page: number) {
var endPoint = `${this.tmdb_apiUrl}/search/multi?query=${keyword}&page=${page}&api_key=${this.tmdb_apiKey}&language=en-US`;
return this.fetchdataNoCach(endPoint).pipe(
switchMap((response) =>
from(response.results).pipe(
filter(
(entry: any) =>
entry.media_type === 'tv' || entry.media_type === 'movie'
),
map((entry: any) => this.adaptMovieToEntry(entry)),
toArray(),
map((entries) => ({
entries: entries,
total_pages: response.total_pages,
total_results: response.total_results,
}))
)
)
@@ -99,7 +123,7 @@ export class TmdbService {
var title = movie.title || movie.name;
var original_title = movie.original_title || movie.original_name;
var is_tvseries = movie.release_date == null ? true : false;
var is_tvseries = movie.media_type == 'tv' ? true : false;
var release_date = movie.release_date || movie.first_air_date;
return {
@@ -120,6 +144,7 @@ export class TmdbService {
status: movie.status,
poster_path: movie.poster_path,
banner_path: movie.backdrop_path,
} as Entry;
}
}
+45
View File
@@ -25,6 +25,7 @@
"date-fns": "^3.6.0",
"express": "^4.19.2",
"flatpickr": "^4.6.13",
"html2canvas": "^1.4.1",
"multer": "^1.4.5-lts.1",
"mysql2": "^3.9.3",
"ngx-bootstrap": "^12.0.0",
@@ -6278,6 +6279,14 @@
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
"dev": true
},
"node_modules/base64-arraybuffer": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz",
"integrity": "sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ==",
"engines": {
"node": ">= 0.6.0"
}
},
"node_modules/base64-js": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
@@ -8462,6 +8471,14 @@
"node": ">= 8"
}
},
"node_modules/css-line-break": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/css-line-break/-/css-line-break-2.1.0.tgz",
"integrity": "sha512-FHcKFCZcAha3LwfVBhCQbW2nCNbkZXn7KVUJcsT5/P8YmfsVja0FMPJr0B903j/E69HUphKiV9iQArX8SDYA4w==",
"dependencies": {
"utrie": "^1.0.2"
}
},
"node_modules/css-loader": {
"version": "6.8.1",
"resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.8.1.tgz",
@@ -10721,6 +10738,18 @@
"integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==",
"dev": true
},
"node_modules/html2canvas": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/html2canvas/-/html2canvas-1.4.1.tgz",
"integrity": "sha512-fPU6BHNpsyIhr8yyMpTLLxAbkaK8ArIBcmZIRiBLiDhjeqvXolaEmDGmELFuX9I4xDcaKKcJl+TKZLqruBbmWA==",
"dependencies": {
"css-line-break": "^2.1.0",
"text-segmentation": "^1.0.3"
},
"engines": {
"node": ">=8.0.0"
}
},
"node_modules/htmlparser2": {
"version": "8.0.2",
"resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.2.tgz",
@@ -16648,6 +16677,14 @@
"node": ">=8"
}
},
"node_modules/text-segmentation": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/text-segmentation/-/text-segmentation-1.0.3.tgz",
"integrity": "sha512-iOiPUo/BGnZ6+54OsWxZidGCsdU8YbE4PSpdPinp7DeMtUJNJBoJ/ouUSTJjHkh1KntHaltHl/gDs2FC4i5+Nw==",
"dependencies": {
"utrie": "^1.0.2"
}
},
"node_modules/text-table": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
@@ -17070,6 +17107,14 @@
"node": ">= 0.4.0"
}
},
"node_modules/utrie": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/utrie/-/utrie-1.0.2.tgz",
"integrity": "sha512-1MLa5ouZiOmQzUbjbu9VmjLzn1QLXBhwpUa7kdLUQK+KQ5KA9I1vk5U4YHe/X2Ch7PYnJfWuWT+VbuxbGwljhw==",
"dependencies": {
"base64-arraybuffer": "^1.0.2"
}
},
"node_modules/uuid": {
"version": "8.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
+3 -1
View File
@@ -14,7 +14,8 @@
"electron-build:copy": "copyfiles backend/**/* dist/showy",
"electron-build:electron": "electron .",
"electron-build:exe": "electron-builder",
"electron-copy-be": "copyfiles backend/**/* dist_electron/win-unpacked"
"prod-cp-BE": "copyfiles backend/**/* dist_electron/win-unpacked",
"prod-cp-settings": "copyfiles settings.json dist_electron/win-unpacked/settings.json"
},
"build": {
"appId": "xalo.showy",
@@ -48,6 +49,7 @@
"date-fns": "^3.6.0",
"express": "^4.19.2",
"flatpickr": "^4.6.13",
"html2canvas": "^1.4.1",
"multer": "^1.4.5-lts.1",
"mysql2": "^3.9.3",
"ngx-bootstrap": "^12.0.0",