@@ -28,7 +28,7 @@ const fetchTracks = async (date: Date, page = 1) => {
28
28
} ;
29
29
30
30
const getLastFmTracks = async ( date : Date , page = 1 ) => {
31
- if ( integrationConfig ( "last-fm" ) . history ) {
31
+ if ( integrationConfig ( "last-fm" , " history" ) ) {
32
32
console . log ( "Last.fm: Fetching tracks for" , dayjs ( date ) . format ( "YYYY-MM-DD" ) ) ;
33
33
const tracks = await fetchTracks ( date , page ) ;
34
34
const itemsByDate : { [ index : string ] : ITrack [ ] } = { } ;
@@ -62,7 +62,7 @@ export default class LastDotFm implements Integration {
62
62
}
63
63
console . log ( "Last.fm: Added daily summaries" ) ;
64
64
65
- if ( integrationConfig ( "last-fm" ) [ "top-albums" ] ) {
65
+ if ( integrationConfig ( "last-fm" , "top-albums" ) ) {
66
66
const topAlbumsWeekly = await lastFm . user . getTopAlbums ( {
67
67
user : config ( "lastfmUsername" ) ,
68
68
period : "7day" ,
@@ -75,7 +75,7 @@ export default class LastDotFm implements Integration {
75
75
) ;
76
76
}
77
77
78
- if ( integrationConfig ( "last-fm" ) [ "top-tracks" ] ) {
78
+ if ( integrationConfig ( "last-fm" , "top-tracks" ) ) {
79
79
const topTracksWeekly = await lastFm . user . getTopTracks ( {
80
80
user : config ( "lastfmUsername" ) ,
81
81
period : "7day" ,
@@ -88,7 +88,7 @@ export default class LastDotFm implements Integration {
88
88
) ;
89
89
}
90
90
91
- if ( integrationConfig ( "last-fm" ) [ "top-artists" ] ) {
91
+ if ( integrationConfig ( "last-fm" , "top-artists" ) ) {
92
92
const topArtistsWeekly = await lastFm . user . getTopArtists ( {
93
93
user : config ( "lastfmUsername" ) ,
94
94
period : "7day" ,
@@ -101,7 +101,7 @@ export default class LastDotFm implements Integration {
101
101
) ;
102
102
}
103
103
104
- if ( integrationConfig ( "last-fm" ) [ "top-albums" ] ) {
104
+ if ( integrationConfig ( "last-fm" , "top-albums" ) ) {
105
105
const topAlbumsMonthly = await lastFm . user . getTopAlbums ( {
106
106
user : config ( "lastfmUsername" ) ,
107
107
period : "1month" ,
@@ -114,7 +114,7 @@ export default class LastDotFm implements Integration {
114
114
) ;
115
115
}
116
116
117
- if ( integrationConfig ( "last-fm" ) [ "top-tracks" ] ) {
117
+ if ( integrationConfig ( "last-fm" , "top-tracks" ) ) {
118
118
const topTracksMonthly = await lastFm . user . getTopTracks ( {
119
119
user : config ( "lastfmUsername" ) ,
120
120
period : "1month" ,
@@ -127,7 +127,7 @@ export default class LastDotFm implements Integration {
127
127
) ;
128
128
}
129
129
130
- if ( integrationConfig ( "last-fm" ) [ "top-artists" ] ) {
130
+ if ( integrationConfig ( "last-fm" , "top-artists" ) ) {
131
131
const topArtistsMonthly = await lastFm . user . getTopArtists ( {
132
132
user : config ( "lastfmUsername" ) ,
133
133
period : "1month" ,
@@ -140,7 +140,7 @@ export default class LastDotFm implements Integration {
140
140
) ;
141
141
}
142
142
143
- if ( integrationConfig ( "last-fm" ) [ "top-albums" ] ) {
143
+ if ( integrationConfig ( "last-fm" , "top-albums" ) ) {
144
144
const topAlbumsYearly = await lastFm . user . getTopAlbums ( {
145
145
user : config ( "lastfmUsername" ) ,
146
146
period : "12month" ,
@@ -153,7 +153,7 @@ export default class LastDotFm implements Integration {
153
153
) ;
154
154
}
155
155
156
- if ( integrationConfig ( "last-fm" ) [ "top-tracks" ] ) {
156
+ if ( integrationConfig ( "last-fm" , "top-tracks" ) ) {
157
157
const topTracksYearly = await lastFm . user . getTopTracks ( {
158
158
user : config ( "lastfmUsername" ) ,
159
159
period : "12month" ,
@@ -166,7 +166,7 @@ export default class LastDotFm implements Integration {
166
166
) ;
167
167
}
168
168
169
- if ( integrationConfig ( "last-fm" ) [ "top-artists" ] ) {
169
+ if ( integrationConfig ( "last-fm" , "top-artists" ) ) {
170
170
const topArtistsYearly = await lastFm . user . getTopArtists ( {
171
171
user : config ( "lastfmUsername" ) ,
172
172
period : "12month" ,
0 commit comments