Skip to content

Commit

Permalink
Merge branch 'music' into 'master'
Browse files Browse the repository at this point in the history
Add Spotify previews to scrobble widget

See merge request rameezv/rameez.me!7
  • Loading branch information
rameezv committed Mar 1, 2023
2 parents 9a14169 + 9941f74 commit 6d5657b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,5 @@ testem.log
# System Files
.DS_Store
Thumbs.db

/src/api_keys.ts
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@fortawesome/fontawesome-svg-core": "~1.2.15",
"@fortawesome/free-brands-svg-icons": "~5.7.2",
"@fortawesome/free-solid-svg-icons": "~5.7.2",
"angular-last-fm-scrobbles": "^7.0.0",
"angular-last-fm-scrobbles": "^8.0.0",
"core-js": "^2.5.4",
"firebase": "^6.1.1",
"node-gyp": "^9.3.1",
Expand Down
2 changes: 1 addition & 1 deletion src/app/music/music.component.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<last-fm-scrobbles username="bigtreeworld" [apiKey]="lastFmApiKey"></last-fm-scrobbles>
<last-fm-scrobbles username="bigtreeworld" [apiKey]="lastFmApiKey" [spotifyClientId]="spotifyClientId" [spotifyClientSecret]="spotifyClientSecret"></last-fm-scrobbles>

<div class="playlist-section">
<button class="playlist-expand-collapse" (click)="togglePlaylistsExpanded()" mat-button><span>Browse my playlists</span><mat-icon>{{ playlistsExpanded ? 'keyboard_arrow_up' : 'keyboard_arrow_down' }}</mat-icon></button>
Expand Down
5 changes: 4 additions & 1 deletion src/app/music/music.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Component, Inject } from '@angular/core';
import { LAST_FM_API_KEY, SPOTIFY_CLIENT_ID, SPOTIFY_CLIENT_SECRET } from '../../api_keys';

enum Source {
SPOTIFY,
Expand All @@ -18,7 +19,9 @@ interface Playlist {
styleUrls: ['./music.component.scss']
})
export class MusicComponent {
lastFmApiKey = '27faee170fc87214923dfa18ea3624fc';
lastFmApiKey = LAST_FM_API_KEY;
spotifyClientId = SPOTIFY_CLIENT_ID;
spotifyClientSecret = SPOTIFY_CLIENT_SECRET;
sourceEnum = Source;
playlists: Playlist[] = [{
name: 'Eternals',
Expand Down

0 comments on commit 6d5657b

Please sign in to comment.