Spotify API and SQLite improvements
This PR improves the Spotify API integration and significantly enhances the SQLite database handling to fix concurrency issues.
**Spotify API updates:**
- Switched to the Spotify Developer API using client credentials authentication.
- Added support for reading credentials from a JSON file and caching access tokens with expiration handling.
- Fixed regex patterns for Spotify URLs to handle international URLs correctly.
**Database improvements:**
- Prevented "database is locked" errors by adding explicit rows.Close() calls inside loops instead of deferring them, reducing the number of open cursors.
- Added SQLite busy timeout to the connection string to handle concurrent access better.
- Ensured transactions are correctly committed or rolled back on errors for stability.
合并状态:已合并 合并于 2025-06-27 关闭于 2025-06-27 2 条评论