Skip to content

Commit dbd2b35

Browse files
committed
nothing new to save
1 parent ee22aa8 commit dbd2b35

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

supabase/functions/fetch-scrobbles/scrobbles.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ export async function scrobbles(env: Variables): Promise<string> {
3636
total = parseInt(paginationInitial.total);
3737
page = totalPages;
3838

39+
if (total === 0) {
40+
console.log('Nothing new to save.');
41+
return 'ok';
42+
}
43+
3944
if (startFrom) {
4045
console.log(
4146
`Found ${total} new tracks to save! Starting from page ${totalPages}.`,

0 commit comments

Comments
 (0)