Skip to content

Commit 8879008

Browse files
committed
Refactor sync service and enhance integration tests
- Updated NewScrobble function to accept a logger parameter for improved logging during track normalization. - Modified sync service to include a useSince flag, allowing explicit lower bound overrides. - Renamed integration test functions for clarity and consistency. - Added comprehensive integration tests for progress bar functionality and error handling scenarios. - Created README.md for integration tests, outlining structure and running instructions. - Removed backup README.md file.
1 parent 095cc26 commit 8879008

10 files changed

Lines changed: 526 additions & 538 deletions

File tree

INDEX.md

Lines changed: 0 additions & 323 deletions
This file was deleted.

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,14 +257,15 @@ lastfm-sync fetch --user alice --output azure --azure-container test --dry-run
257257
Each line is a JSON object representing one scrobble:
258258
259259
```json
260-
{"username":"alice","artist":"Radiohead","track":"Paranoid Android","album":"OK Computer","uts":1704067200,"local_time":"2024-01-01T00:00:00Z","mbid":"abc123","source":"lastfm","ingested_at":"2024-01-06T14:30:22Z","raw":{}}
261-
{"username":"alice","artist":"The Beatles","track":"Come Together","album":"Abbey Road","uts":1704070800,"local_time":"2024-01-01T01:00:00Z","source":"lastfm","ingested_at":"2024-01-06T14:30:22Z","raw":{}}
260+
{"username":"alice","artist":"Radiohead","track":"Paranoid Android","normalized_title":"Paranoid Android","album":"OK Computer","uts":1704067200,"local_time":"2024-01-01T00:00:00Z","mbid":"abc123","source":"lastfm","ingested_at":"2024-01-06T14:30:22Z","raw":{}}
261+
{"username":"alice","artist":"The Beatles","track":"Come Together - Remastered","normalized_title":"Come Together","album":"Abbey Road","uts":1704070800,"local_time":"2024-01-01T01:00:00Z","source":"lastfm","ingested_at":"2024-01-06T14:30:22Z","raw":{}}
262262
```
263263
264264
**Fields:**
265265
- `username` (string): Last.fm username
266266
- `artist` (string): Artist name
267-
- `track` (string): Track name
267+
- `track` (string): Track name (original from Last.fm, may include annotations)
268+
- `normalized_title` (string): Clean track title with annotations removed (Live, Remastered, featuring, etc.)
268269
- `album` (string): Album name
269270
- `uts` (int64): Unix timestamp (seconds since epoch)
270271
- `local_time` (string): Human-readable UTC timestamp in RFC3339 format (derived from uts)

0 commit comments

Comments
 (0)