audio streaming app plyr.fm
38
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: skip copyright scan for integration tests on staging (#745)

* fix: skip copyright scan for integration tests on staging

synthetic drone audio doesn't need AudD API calls - skip the scan
when BOTH conditions are met:
1. environment is staging
2. track is tagged with integration-test

this prevents unnecessary moderation costs while ensuring production
tracks are always scanned regardless of tags.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: also skip notifications for integration tests on staging

prevents DM spam from moderation account when running integration tests.
same staging + integration-test tag check as copyright scan.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>

authored by

nate nowack
Claude Opus 4.5
and committed by
GitHub
0918440b ec4cfb4e

+9 -2
+9 -2
backend/src/backend/api/tracks/uploads.py
··· 467 467 await db.refresh(track) 468 468 469 469 await _add_tags_to_track(db, track.id, ctx.tags, ctx.artist_did) 470 - await _send_track_notification(db, track) 471 470 472 - if r2_url: 471 + # skip notifications and copyright scan for integration tests on staging 472 + # (synthetic audio, no point spamming DMs or paying for AudD API calls) 473 + is_integration_test = ( 474 + settings.observability.environment == "staging" 475 + and "integration-test" in (ctx.tags or []) 476 + ) 477 + if not is_integration_test: 478 + await _send_track_notification(db, track) 479 + if r2_url and not is_integration_test: 473 480 await schedule_copyright_scan(track.id, r2_url) 474 481 475 482 # sync album list record if track is in an album