Skip to content

Commit

Permalink
Remove Limits
Browse files Browse the repository at this point in the history
  • Loading branch information
andyruwruw committed Jan 9, 2022
1 parent 56c0bbc commit 8a35482
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions src/store/modules/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ const actions: ActionTree<DataModuleState, any> = {
// && i < 1000 For when things get scary...

for (let i = 0; i < total; i += 50) {
const savedTracks = await getSavedTracks(i + 925);
const savedTracks = await getSavedTracks(i);

const audioFeatures = await getTracksAudioFeatures(savedTracks);

Expand Down Expand Up @@ -325,10 +325,27 @@ const actions: ActionTree<DataModuleState, any> = {
perplexity = 100;
}

const keys = Object.keys(tracks as Record<string, Track>);
let first = Date.now();
let last = 0;

for (let i = 0; i < keys.length; i += 1) {
const track = (tracks as Record<string, Track>)[i];

if (track !== undefined && 'added' in track) {
if (track.added < first) {
first = track.added;
}
if (track.added > last) {
last = track.added;
}
}
}

commit('setTracks', tracks);
commit('setGraph', graphs);

commit('setFirstAndLast', { first: 1423555000000, last: 1641756897767 });
commit('setFirstAndLast', { first, last });

commit('setPerplexity', perplexity);
commit('setEpsilon', 10);
Expand Down

3 comments on commit 8a35482

@vercel
Copy link

@vercel vercel bot commented on 8a35482 Jan 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 8a35482 Jan 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 8a35482 Jan 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.