summaryrefslogtreecommitdiff
path: root/src/web
diff options
context:
space:
mode:
Diffstat (limited to 'src/web')
-rw-r--r--src/web/src/app/film/film.component.html30
-rw-r--r--src/web/src/app/film/film.component.ts44
-rw-r--r--src/web/src/app/search-bar/search-bar.component.css3
-rw-r--r--src/web/src/app/search-bar/search-bar.component.ts8
-rw-r--r--src/web/src/styles.css3
5 files changed, 71 insertions, 17 deletions
diff --git a/src/web/src/app/film/film.component.html b/src/web/src/app/film/film.component.html
index 0619f72..4331ebb 100644
--- a/src/web/src/app/film/film.component.html
+++ b/src/web/src/app/film/film.component.html
@@ -37,22 +37,24 @@
</h1>
<div class="cards-list pt-4">
<div
- class="card"
+ class=""
*ngFor="let item of providers; let i = index"
>
- <div class="card-img">
- <img
- class="p-3"
- [src]="
- '../../assets/img/platforms/' +
- getProviderImage(i) +
- '.png'
- "
- />
- </div>
- <div class="card_title title-white">
- {{ getPrice(i) }}
- </div>
+ <a [href]="getLink(i)">
+ <div class="card-img card">
+ <img
+ class="p-3"
+ [src]="
+ '../../assets/img/platforms/' +
+ getProviderImage(i) +
+ '.png'
+ "
+ />
+ </div>
+ <div class="card_title title-white">
+ {{ getPrice(i) }}
+ </div>
+ </a>
</div>
</div>
</div>
diff --git a/src/web/src/app/film/film.component.ts b/src/web/src/app/film/film.component.ts
index 26dd507..4e64a34 100644
--- a/src/web/src/app/film/film.component.ts
+++ b/src/web/src/app/film/film.component.ts
@@ -18,6 +18,40 @@ export class FilmComponent implements OnInit {
type: string;
id: string;
prices;
+ urls = [
+ { name: 'netflix', url: 'https://www.netflix.com/' },
+ { name: 'amazonprimevideo', url: 'https://www.primevideo.com/' },
+ { name: 'appletv', url: 'https://www.apple.com/tv/' },
+ { name: 'boomerang', url: 'https://www.boomerang.com/' },
+ { name: 'cinemax', url: 'https://www.cinemax.com/' },
+ { name: 'discoveryplus', url: 'https://www.discoveryplus.com/' },
+ { name: 'disneyplus', url: 'https://www.disneyplus.com/' },
+ { name: 'epixnow', url: 'https://www.epixnow.com/' },
+ { name: 'fubotv', url: 'https://www.fubo.tv/' },
+ {
+ name: 'googleplaymovies&tv',
+ url: 'https://play.google.com/store/movies',
+ },
+ { name: 'hbomax', url: 'https://www.hbomax.com/' },
+ { name: 'hulu', url: 'https://www.hulu.com/' },
+ { name: 'itunes', url: 'https://www.apple.com/itunes/' },
+ {
+ name: 'lifetimemovieclub',
+ url: 'https://www.lifetimemovieclub.com/',
+ },
+ { name: 'pantaya', url: 'https://www.pantaya.com/en/' },
+ { name: 'paramount', url: 'https://www.paramount.com/' },
+ { name: 'peacock', url: 'https://www.peacocktv.com/' },
+ { name: 'philo', url: 'https://www.philo.com/' },
+ { name: 'showtime', url: 'http://www.showtime.com/' },
+ { name: 'showtimeanytime', url: 'http://www.showtimeanytime.com/' },
+ { name: 'slingtv', url: 'https://www.sling.com/' },
+ { name: 'starz', url: 'https://www.starz.com/us/en/' },
+ { name: 'univision', url: 'https://www.univision.com/' },
+ { name: 'viki', url: 'https://www.viki.com/' },
+ { name: 'youtube', url: 'https://www.youtube.com/' },
+ { name: 'youtubetv', url: 'https://tv.youtube.com/' },
+ ];
constructor(
private route: ActivatedRoute,
private service: MovieTVService,
@@ -59,4 +93,14 @@ export class FilmComponent implements OnInit {
);
return (this.providers[i] as string).toLowerCase().replace(/ /g, '');
}
+
+ getLink(i: number) {
+ let a = (this.providers[i] as string).toLowerCase().replace(/ /g, '');
+ let search = this.urls.find((x) => x.name == a);
+ if (search == undefined || search == null) {
+ return '';
+ } else {
+ return search.url;
+ }
+ }
}
diff --git a/src/web/src/app/search-bar/search-bar.component.css b/src/web/src/app/search-bar/search-bar.component.css
index de7b3eb..6e64db1 100644
--- a/src/web/src/app/search-bar/search-bar.component.css
+++ b/src/web/src/app/search-bar/search-bar.component.css
@@ -8,6 +8,9 @@
background-color: #3f79f6;
}
+.mat-active {
+ background-color: #3f79f6;
+}
.is-loading ::ng-deep .mat-option-text {
display: flex;
justify-content: center;
diff --git a/src/web/src/app/search-bar/search-bar.component.ts b/src/web/src/app/search-bar/search-bar.component.ts
index 96fdc80..e4b9796 100644
--- a/src/web/src/app/search-bar/search-bar.component.ts
+++ b/src/web/src/app/search-bar/search-bar.component.ts
@@ -5,6 +5,7 @@ import { of } from 'rxjs';
import { debounceTime, finalize, map, switchMap, tap } from 'rxjs/operators';
import { MovieTVService } from '../movie-tv.service';
import { AppService } from '../app.service';
+import { Router } from '@angular/router';
@Component({
selector: 'app-search-bar',
templateUrl: './search-bar.component.html',
@@ -20,7 +21,8 @@ export class SearchBarComponent implements OnInit {
constructor(
private appService: AppService,
- private tmdbService: MovieTVService
+ private tmdbService: MovieTVService,
+ private router: Router
) {}
ngOnInit() {
@@ -58,4 +60,8 @@ export class SearchBarComponent implements OnInit {
storeData(model: any) {
this.appService.subsriber$.subscribe((x) => console.log(x));
}
+
+ action(media_type, id) {
+ this.router.navigateByUrl('/page?id=37&username=jimmy');
+ }
}
diff --git a/src/web/src/styles.css b/src/web/src/styles.css
index 5aedd08..4ac6ab4 100644
--- a/src/web/src/styles.css
+++ b/src/web/src/styles.css
@@ -8,7 +8,6 @@ body {
}
body {
margin: 0;
-
}
* {
font-family: Arial, Helvetica, sans-serif;
@@ -121,7 +120,7 @@ body {
border-radius: 0px 0px 40px 40px;
font-family: sans-serif;
font-weight: bold;
- font-size: 20px;
+ font-size: 18px;
height: 40px;
}