Commit Graph

31 Commits

Author SHA1 Message Date
Anas Rashid
91a7517d31 Remove music features (Spotify, Golha, Beeptunes, music index, song suggestions)
Pages, API endpoints, services and assets removed; music DB models/tables kept
so the feature can be rebuilt for Urdu later.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 23:41:02 +02:00
Ehsan Mohandesi
cb7b1b03a3 Replace Spotify search with a validated music link box
The Spotify Web API integration stopped working, leaving /spotify unable to
suggest songs at all. Replace the artist/album/track search flow with a single
box where the user pastes a link to the track on a music service.

Links are checked against a hardcoded allow-list of legal streaming and store
domains so links to ripped audio cannot be submitted. The check lives in the
service layer, not just the page: any authenticated user can POST to
/api/ganjoor/song directly and bypass the UI. Hosts are matched against the
full host or a dot-prefixed suffix, so look-alikes such as
open.spotify.com.evil.com are rejected; https is required, and userinfo and
non-default ports are refused. Accepted URLs are canonicalised - https,
lowercased host, tracking parameters stripped - so the same track always yields
the same stored URL and duplicate detection actually works.

Links are stored under one new type, PoemMusicTrackType.MusicUrl, with the
platform derived from the host at render time. That needs no migration or
backfill, and supporting another service later needs no new enum value. The
duplicate check no longer keys on TrackType, which closes a gap where the same
URL could be resubmitted as a different type. Several links per poem remain
allowed; only an identical URL for the same poem is refused.

The Spotify search page and its OAuth plumbing are kept and simply redirect to
/musiclink while the existing SpotifyWorking flag is false, so the old flow can
be restored if that API ever works again.

Track URLs are no longer written through Html.Raw into href attributes. They
previously came from the Spotify API; now that they are user supplied, encoding
them prevents stored XSS.

Also fixes two latent bugs in SuggestSong that this flow would have hit: a null
dereference when TrackUrl is empty, and a singer lookup that matched any singer
with an empty Url.
2026-09-13 22:16:18 -05:00
Hamid Reza Mohammadi
3814f6234d semantic search improvemenst 2026-09-11 14:10:56 +03:30
Hamid Reza Mohammadi
b0d21bbb09 semantic search control 2026-09-10 14:19:06 +03:30
Hamid Reza Mohammadi
e63c8c5e9d semantic search 2026-09-10 13:03:20 +03:30
Hamid Reza Mohammadi
5c70e88b09 semantic search fix 2026-09-10 09:02:20 +03:30
Hamid Reza Mohammadi
65737c73d8 fix for semantic search 2026-09-09 14:07:00 +03:30
Hamid Reza Mohammadi
0762f19fb4 semantic search 2026-09-09 11:07:09 +03:30
Hamid Reza Mohammadi
ef5b61bf03 warning fix 2026-09-04 15:53:19 +03:30
Hamid Reza Mohammadi
fbb2700afb #498 fix 2026-08-16 15:26:58 +03:30
Hamid Reza Mohammadi
ae6ff5ba28 #498 fixes 2026-08-15 12:10:18 +03:30
Hamid Reza Mohammadi
6df8b587a9 #498 git fix 2026-08-15 08:09:55 +03:30
Hamid Reza Mohammadi
ca8c781b6c #498 git fix 2026-08-15 07:30:06 +03:30
Hamid Reza Mohammadi
47f3297cf0 #498 fix 2026-08-14 15:44:42 +03:30
Hamid Reza Mohammadi
0fb3110dd9 #498 imprort public data 2026-08-14 14:57:00 +03:30
Hamid Reza Mohammadi
6768ee4c52 #498 export public data 2026-08-14 13:49:57 +03:30
Hamid Reza Mohammadi
ae50557acc Open source all public data
#498
2026-08-14 13:37:43 +03:30
Hamid Reza Mohammadi
e11487ac2e #495 GanjoorCommentRankingScoreCalculator 2026-07-22 18:55:50 +03:30
Hamid Reza Mohammadi
5feaf8cea4 #467 cat editor 2025-03-24 13:17:57 +03:30
Hamid Reza Mohammadi
fea213b2ae #467 cat editor 2025-03-24 12:35:37 +03:30
Hamid Reza Mohammadi
287213fef8 #467 cat editor 2025-03-24 11:59:27 +03:30
Hamid Reza Mohammadi
def19f06b4 #467 cat editor 2025-03-24 11:58:46 +03:30
Hamid Reza Mohammadi
fa392dfca4 a small improvement on generating thank you emails text for donars 2025-03-24 11:07:48 +03:30
Hamid Reza Mohammadi
f3cb6ee193 .NET 9 upgrade 2024-12-13 10:16:25 +03:30
Hamid Reza Mohammadi
6bc1a02da8 #445 trying to fix transilerate 2024-08-09 09:28:18 +03:30
Hamid Reza Mohammadi
13c77cd48f #445 FixTransilerations 2024-07-21 15:15:22 +03:30
Hamid Reza Mohammadi
6ab4619051 #445 fixes 2024-07-21 15:05:24 +03:30
Hamid Reza Mohammadi
b8a4bf0353 #445 transilerate fixer 2024-07-21 11:04:44 +03:30
Hamid Reza Mohammadi
46699f5f05 #445 tajik transilerate 2024-07-20 11:49:31 +03:30
Hamid Reza Mohammadi
880e6e8a58 #445 ganjoor transilerate 2024-07-19 19:01:22 +03:30
Hamid Reza Mohammadi
1b9913b4a7 docs: #307 some refactoring 2022-04-23 16:51:20 +04:30