-
Notifications
You must be signed in to change notification settings - Fork 0
Add AI slop detection and auto-skip functionality #68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 40 commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
b3b51fa
ISSUE-67: Add AI slop detection and auto-skip functionality
vtvz 29a5243
prefix
vtvz 6d1c873
links
vtvz 2022207
ISSUE-67: Add AI slop notification UI with artist page button
vtvz 268d94c
ISSUE-67: Add soul-over-ai provider for AI slop detection
vtvz 9457cca
ISSUE-67: Add spot-the-ai provider for AI slop detection
vtvz 1daa0e6
ISSUE-67: Add error handling for AI slop detection providers
vtvz a322d0b
ISSUE-67: Add SHLabs provider for AI slop detection
vtvz 7af0f3a
ISSUE-67: Add provider attribution to AI slop notifications
vtvz b98322a
ISSUE-67: Document AI-generated music detection in README
vtvz 3c286cb
ISSUE-67: Add user configuration for AI slop detection behavior
vtvz a08c962
ISSUE-67: Add localization and UI for AI slop detection settings
vtvz 2589fab
ISSUE-67: Refactor AI slop detection logic and improve configuration
vtvz 728d87a
ISSUE-67: Rename REDIS_KEY_ARTIST_PREFIX to REDIS_KEY_TRACK_PREFIX
vtvz de17cdf
fix
vtvz 976adda
added missing
vtvz db22ea7
ISSUE-67: Add AISlopPredict trait and prediction type classification
vtvz 4d6d58b
ISSUE-67: Rename AISlopPredict trait and improve button labels
vtvz fde8ad2
ISSUE-67: Fix TOCTOU race in AI slop detection providers
vtvz abb4062
ISSUE-67: Add tracing instrumentation to AI slop detection
vtvz 1b869ea
fix skipped
vtvz be0a47f
ISSUE-67: Fix atomic flag not reset on Redis write failure
vtvz ac8c93b
unreachable
vtvz 6ca7d6b
ISSUE-67: Optimize Redis writes and add auth check
vtvz 2bc735e
ISSUE-67: Remove SpotTheAI provider
vtvz cd271d6
ISSUE-67: Use dynamic button labels in action messages
vtvz fc507c4
ISSUE-67: Skip AI detection for tracks released before 2024
vtvz 1d044d3
ISSUE-67: Improve AI slop alert message wording
vtvz 645ee3a
ISSUE-67: Show AI slop config in admin user details
vtvz 7dc8703
ISSUE-67: Move skip counter increment to caller
vtvz 13b030a
ISSUE-67: Log errors when incrementing skip counter
vtvz b0e76a6
ISSUE-67: Add rate limiting for SHLabs provider
vtvz 479f134
ISSUE-67: Use Instant for populate timeout
vtvz 7bf623f
ISSUE-67: Log actual pause duration in rate limit warning
vtvz 209c11a
ISSUE-67: Use Instant for populate timeout in SoulOverAI
vtvz e8c4693
ISSUE-67: Remove unused Utc import and use const for hour
vtvz 56fc00b
ISSUE-67: Use const for expiry seconds in SoulOverAI populate
vtvz 6c53b32
ISSUE-67: Use const for expiry seconds in SpotifyAIBlocker
vtvz 3b587c9
ISSUE-67: Separate URL action buttons from callback buttons
vtvz 32617b0
ISSUE-67: Simplify AI slop skip logic for non-premium users
vtvz 3e99ce7
ISSUE-67: Clean up serde imports
vtvz dc15ea3
ISSUE-67: Check cache before rate limit in SHLabs fetch
vtvz 48e4262
exact text
vtvz 12d8299
ISSUE-67: Extract expiry calculation with explanatory comment
vtvz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| _version: 2 | ||
|
|
||
| ai-slop.alert: | ||
| en: |- | ||
| 🎵 %{track_name} | ||
| Album: %{album_name} | ||
|
|
||
| <tg-emoji emoji-id="5429334864010681294">💩</tg-emoji> This track is most likely <b>%{prediction}</b>. You can block track or ignore similar notifications for this track | ||
|
|
||
| To permanently block this artist from recommendations: | ||
| <tg-emoji emoji-id="6028171274939797252">🔗</tg-emoji> Open the artist's page in Spotify | ||
| <tg-emoji emoji-id="6032924188828767321">➕</tg-emoji> Tap the three dots near the <i>"Follow"</i> button | ||
| <tg-emoji emoji-id="5774077015388852135">❌</tg-emoji> Select <i>"Don't play this artist"</i> | ||
|
|
||
| <i>Information provided by "%{ai_check_provider}"</i> | ||
|
|
||
| <b>Support real organic hand-made music instead of AI-slop!</b> | ||
|
|
||
| <blockquote>Want to disable these alerts or auto-skip AI tracks? Try /%{config_command}</blockquote> | ||
|
vtvz marked this conversation as resolved.
|
||
| ru: |- | ||
| 🎵 %{track_name} | ||
| Альбом: %{album_name} | ||
|
|
||
| <tg-emoji emoji-id="5429334864010681294">💩</tg-emoji> Этот трек скорее всего <b>%{prediction}</b>. Вы можете заблокировать трек или отключить подобные уведомления для этого трека | ||
|
|
||
| Чтобы навсегда скрыть этого исполнителя из рекомендаций: | ||
| <tg-emoji emoji-id="6028171274939797252">🔗</tg-emoji> Откройте страницу исполнителя в Spotify | ||
| <tg-emoji emoji-id="6032924188828767321">➕</tg-emoji> Нажмите на три точки рядом с кнопкой <i>«Подписаться»</i> | ||
| <tg-emoji emoji-id="5774077015388852135">❌</tg-emoji> Выберите <i>«Не воспроизводить этого исполнителя»</i> | ||
|
|
||
| <i>Информация предоставлена "%{ai_check_provider}"</i> | ||
|
|
||
| <b>Поддерживайте настоящую живую музыку вместо ИИ-шлака!</b> | ||
|
|
||
| <blockquote>Хотите отключить уведомления или настроить автопропуск AI-треков? Попробуйте /%{config_command}</blockquote> | ||
|
|
||
| ai-slop.alert-pure-ai: | ||
| en: fully AI-generated | ||
| ru: полностью сгенерирован ИИ | ||
|
|
||
| ai-slop.alert-processed-ai: | ||
| en: partially generated or processed by AI | ||
| ru: частично сгенерирован или обработан ИИ | ||
|
|
||
| ai-slop.setting-description: | ||
| en: |- | ||
| <tg-emoji emoji-id="5429334864010681294">💩</tg-emoji> AI Music Detection | ||
|
|
||
| Bot automatically checks tracks for AI generation | ||
|
|
||
| Configure bot's reaction to such tracks: | ||
| ru: |- | ||
| <tg-emoji emoji-id="5429334864010681294">💩</tg-emoji> Обнаружение ИИ-музыки | ||
|
|
||
| Бот автоматически проверяет треки на ИИ-генерацию | ||
|
|
||
| Настройте реакцию бота на такие треки: | ||
|
|
||
| ai-slop.button-notify: | ||
| en: |- | ||
| %{mark}Notify | ||
| ru: |- | ||
| %{mark}Уведомлять | ||
|
|
||
| ai-slop.button-ignore: | ||
| en: |- | ||
| %{mark}Don't notify | ||
| ru: |- | ||
| %{mark}Не уведомлять | ||
|
|
||
| ai-slop.button-skip: | ||
| en: |- | ||
| %{mark}Skip automatically | ||
| ru: |- | ||
| %{mark}Пропускать автоматически | ||
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
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
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
2 changes: 2 additions & 0 deletions
2
migrations/20260302172253_add_user_cfg_ai_slop_detection_field.sql
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| alter table "user" | ||
| add cfg_ai_slop_detection text default 'notify' not null; | ||
|
vtvz marked this conversation as resolved.
|
||
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.