From ae76f916aea012c77de968bd16935dc0e85f0c73 Mon Sep 17 00:00:00 2001 From: "Maxence G. de Montauzan" Date: Wed, 18 Oct 2017 23:00:46 +0200 Subject: [PATCH] Improve Bit Rate translate processing --- dashboard/src/app/artist/artist.component.html | 2 +- dashboard/src/app/artist/artist.component.ts | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/dashboard/src/app/artist/artist.component.html b/dashboard/src/app/artist/artist.component.html index 6743e01..f1b317a 100644 --- a/dashboard/src/app/artist/artist.component.html +++ b/dashboard/src/app/artist/artist.component.html @@ -111,7 +111,7 @@ {{song['Play Count']}} {{song.Genre}} - + diff --git a/dashboard/src/app/artist/artist.component.ts b/dashboard/src/app/artist/artist.component.ts index 86ca3c7..0b67ee1 100644 --- a/dashboard/src/app/artist/artist.component.ts +++ b/dashboard/src/app/artist/artist.component.ts @@ -15,7 +15,6 @@ import { SortByPipe } from './../sort-by.pipe'; }) export class ArtistComponent implements OnInit { - Math: any; artistName = ''; songs: Array = []; artist: Artist = new Artist(); @@ -30,9 +29,7 @@ export class ArtistComponent implements OnInit { private elsService: ElsService, private route: ActivatedRoute, private location: Location - ) { - this.Math = Math; - } + ) { } ngOnInit(): void { this.route.params.subscribe((params: Params) => this.artistName = params['name']); @@ -99,4 +96,8 @@ export class ArtistComponent implements OnInit { this.songs = new SortByPipe().transform(this.songs, 'Year', 'Album', 'Track Number', 'Play Count'); this.sortable = false; } + + roundBitRate(bitRate: number) { + return Math.round(bitRate / 64); + } }