Repository navigation
Conversation
`beet spotifysync` skips every track that has no `spotify_track_id`, but it only said so at debug level. At the default verbosity the command printed "Processing ..." for each track and exited normally, so it looked like the data had been fetched when nothing was actually requested (see beetbox#7158). Count those tracks and print one info-level line: Skipped 3 track(s) without a spotify_track_id. Adds a test asserting the message is emitted for an item without the field.
Member
|
See our AI Policy. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7206 +/- ##
==========================================
+ Coverage 80.88% 80.93% +0.04%
==========================================
Files 150 150
Lines 21247 21251 +4
Branches 3246 3247 +1
==========================================
+ Hits 17186 17199 +13
+ Misses 3250 3242 -8
+ Partials 811 810 -1
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #7158.
beet spotifysyncskips every track that has nospotify_track_id, but the only trace of that was a debug-level line:At the default verbosity the command prints
Processing 1/10 tracks - ...for each item and exits normally, so a library whose tracks were imported from MusicBrainz (or withimport -A) looks like it synced successfully while nothing was requested at all.Change
Count the skipped tracks and print one info-level line after the loop:
Info rather than warning, since having no Spotify id is a normal state for tracks that were not imported through the plugin - the user just needs to be told that they were not processed.
Tests
Added
test_fetch_info_reports_tracks_without_id: an item without the field,_fetch_infocalled withforce=True, asserting the message appears at INFO level. No HTTP mock is needed because the method returns before any request.pytest test/plugins/test_spotify.pyspotify.pyfails the new testChangelog entry added under Unreleased -> Bug fixes.