Commit Graph
14 Commits
Author SHA1 Message Date
Mrixs 923705c7fc Migrate to yandex-music-api-go v0.0.0-20261018120746-dbf9a46bb2e7
CI/CD / docker (push) Successful in 2m37s
CI/CD / test (push) Successful in 48s
CI/CD / build (push) Successful in 56s
Library now provides GetTrackDownloadURL (signed URL via XML download_info_url),
so ym-dl delegates to it instead of reimplementing XML parsing and MD5 signing.
Removed local DownloadTrackXML/DownloadInfoXML and unused crypto/md5, encoding/hex,
encoding/xml, io imports from client.go.

Track.Lyrics replaced by LyricsInfo (availability flags only, no text).
Lyrics text requires separate GetTrackLyrics + GetTrackLyricsText calls —
not implemented yet, lyrics field left empty.
2026-10-18 16:06:17 +03:00
Mrixs d7692875db Add debug logging to GetTrackDownloadURL
CI/CD / test (push) Successful in 43s
CI/CD / build (push) Successful in 42s
CI/CD / docker (push) Successful in 2m23s
The library returns download_info but GetTrackDownloadURL cannot extract
a working URL (bestInfo.URL is empty). Added debug logging of all
download info candidates and a more descriptive error message to
diagnose why Yandex API returns entries without URL.

This is a ym-dl issue, not a library issue — the library correctly
returns download_info; ym-dl fails to build a download URL from it.
2026-10-18 11:56:11 +03:00
Mrixs 5dcdd92d40 Update yandex-music-api-go and fix Artist.ID JSONID conversion
CI/CD / build (push) Successful in 1m0s
CI/CD / test (push) Successful in 47s
CI/CD / docker (push) Successful in 2m36s
Library updated to v0.0.0-20261018080126-dbb823ade349 which fixes:
- R128 field type changed from float64 to JSONR128 (accepts object or number)
- Artist.ID type changed from string to JSONID (accepts number or string)

Converted Artist.ID usages in storage.go to string() for assignments.
2026-10-18 11:14:39 +03:00
Mrixs 4e6bef40e3 Fix JSONID type conversions for yandex-music-api-go v0.0.0-20261018072517-d0173f795d2a
CI/CD / test (push) Successful in 48s
CI/CD / build (push) Successful in 54s
CI/CD / docker (push) Successful in 2m31s
The new library version uses models.JSONID (custom string type) for ID
fields instead of plain string. Convert to string where IDs are passed
to functions expecting string or compared with string values.

Affected: client.go (GetTrackInfoWithPosition), downloader.go
(track.ID usage), monitor.go (track.ID, album.ID usage), storage.go
(album/track ID assignment).
2026-10-18 10:39:43 +03:00
Mrixs 5d32daad07 Update yandex-music-api-go to fix Major.ID and Album.ID type parsing
CI/CD / test (push) Successful in 37s
CI/CD / build (push) Successful in 42s
CI/CD / docker (push) Successful in 2m18s
The library now accepts numeric IDs from Yandex Music API for
Major.ID (track) and Album.ID (album), fixing unmarshalling errors
when API returns numbers instead of strings.
2026-10-18 10:29:24 +03:00
Mrixs 03ef94b033 Remove go mod tidy from Docker build
CI/CD / test (push) Successful in 38s
CI/CD / build (push) Successful in 39s
CI/CD / docker (push) Successful in 3m33s
go mod tidy in Docker build causes disk space issues on CI runners
(compiling modernc.org/ccgo pulls many C files). go.mod/go.sum are
committed to repo, so go mod download + go build is sufficient.
2026-10-18 09:28:08 +03:00
Mrixs 7ddf43158a Increase pageSize to 500 for artist API calls
CI/CD / test (push) Successful in 40s
CI/CD / build (push) Successful in 44s
CI/CD / docker (push) Failing after 49s
Fetch up to 500 tracks/albums per page instead of 50, reducing
the number of API calls needed when checking artists with large
discographies.
2026-10-18 09:17:29 +03:00
Mrixs c228e7e2b7 Update yandex-music-api-go library
CI/CD / test (push) Successful in 1m35s
CI/CD / build (push) Successful in 52s
CI/CD / docker (push) Canceled after 13s
Upgrade to v0.0.0-20261018055743-0456ca0665a6 which fixes the
page=0 validation bug in GetArtistTracks/GetArtistAlbums.

The library now returns *ArtistTracks/*ArtistAlbums wrappers
instead of raw slices, so the YandexClient wrapper extracts
the inner slices for backward compatibility.

Reverted page numbering back to 0 in monitor since the API
bug is fixed server-side/library-side.
2026-10-18 09:15:19 +03:00
Mrixs ed6c26a3af Fix artist page numbering for Yandex API
CI/CD / test (push) Successful in 11m45s
CI/CD / build (push) Successful in 10m27s
CI/CD / docker (push) Successful in 2m58s
Start page numbering at 1 instead of 0 in checkArtistTracks and
checkArtistAlbums. Yandex Music API rejects page=0 with
400 'Parameters requirements are not met'.

GetArtistInfo works because it doesn't use pagination.
2026-10-18 01:07:04 +03:00
Mrixs 6ec39da5da Fix SQLite driver for CGO_ENABLED=0 builds
CI/CD / test (push) Successful in 1m33s
CI/CD / docker (push) Successful in 2m30s
CI/CD / build (push) Successful in 1m13s
Replace github.com/mattn/go-sqlite3 (CGO required) with
modernc.org/sqlite (pure Go, works with CGO_ENABLED=0).
Binary built with CGO_ENABLED=0 in Dockerfile can now load
SQLite storage without cgo errors.
2026-10-18 00:52:58 +03:00
Mrixs 9a3d35bde4 Fix Dockerfile Go version
CI/CD / test (push) Successful in 2m56s
CI/CD / build (push) Successful in 1m47s
CI/CD / docker (push) Successful in 1m36s
Upgrade builder image from golang:1.24-alpine to golang:1.27-alpine
to match go.mod requirement (go 1.27.2). Go 1.24 cannot process
go.mod with go >= 1.27.2 even with GOTOOLCHAIN=local.
2026-10-17 22:16:32 +03:00
Mrixs 946d2629b3 Add Gitea Actions CI pipeline
CI/CD / test (push) Successful in 12m36s
CI/CD / build (push) Successful in 10m32s
CI/CD / docker (push) Failing after 1m56s
Add .gitea/workflows/ci.yml with test → build → docker pipeline.
Docker images pushed to gitea.mrixs.me/mrixs/ym-dl on master and v* tags.

Requires PACKAGES_TOKEN repo secret (read:package, write:package).
2026-10-17 18:06:48 +03:00
Mrixs 8e0ad5c90a Add README.md
Document project structure, configuration, build/run instructions,
storage schema, and ID3 tag mapping.
2026-10-17 17:12:46 +03:00
Mrixs fe62910311 Initial commit: ym-dl with yandex-music-api-go library migration
Migrate ym-dl from custom oapi-codegen Yandex Music API client to external
gitea.mrixs.me/Mrixs/yandex-music-api-go library with token-only authentication.

Key changes:
- Replace custom Yandex API client with yandexmusic library wrapper
- Token-based OAuth authentication only (no username/password fallback)
- SQLite storage index with JSON index migration path
- Extended ID3 tag support: genre, comment, lyrics, publisher, ISRC, copyright
- High-resolution album covers (1000x1000)
- Fixed album download check (requires all tracks, not just one)
2026-10-17 17:09:42 +03:00