senaaforgerr/spotify.lua
Spotify-style music player for GTA SA-MP Mobile (MonetLoader) with full-length YouTube audio.
README.md
spotify.lua
Pemutar musik bergaya Spotify untuk GTA SA-MP Mobile lewat MonetLoader. Pencarian dan metadata lagu diambil dari endpoint web Spotify, audio penuh diputar dari YouTube. Tidak perlu akun Spotify atau Premium, dan tidak ada preview 30 detik.
Bahasa: Bahasa Indonesia · English
Bahasa Indonesia
Fitur
- Pencarian lagu dan metadata dari endpoint web Spotify tanpa login.
- Audio penuh dari YouTube, bukan preview 30 detik.
- UI
mimguidengan tab Home, Search, Now Playing, Queue, dan Info. - Empat playlist publik di Home, lengkap dengan halaman detail, Play, dan Shuffle.
- Queue, shuffle, repeat, seek, dan volume. Audio tetap berjalan saat panel ditutup.
- Tab Info berisi author, lisensi, Discord, dan YouTube. Link dibuka lewat Android intent, jadi aplikasi Discord atau YouTube langsung terbuka jika terpasang.
- Native
libspaudio.sountukarmeabi-v7adanarm64-v8a, dipilih otomatis sesuai ABI perangkat.
Kebutuhan
- Android dengan GTA SA-MP Mobile.
- MonetLoader yang menyediakan
mimgui,cjson,jsoncfg,sha1, danbasexx. - Native library sesuai ABI perangkat. Keduanya sudah disertakan di
lib/.
Instalasi
Clone atau unduh repo ini.
Salin
spotify.lua, folderasset/, dan folderlib/ke folder loader:/storage/emulated/0/Android/media/<package>/monetloader/Ganti
<package>dengan package client yang dipakai. Contoh untuk GTA SA:com.rockstargames.gtasa. Pertahankan struktur folderasset/danlib/.Force-stop game, lalu buka lagi. Script menyalin
libspaudio.soyang sesuai ABI ke direktori internal aplikasi saat pertama kali dijalankan.Tunggu pesan
[spotify] v1.0.2 ready. Type /spotify to open the player.
Pemakaian
- Ketik
/spotifyatau/spuntuk membuka panel. Ketik lagi atau tekan tombol close untuk menutupnya. - Di Home, ketuk kartu playlist untuk membuka detail, lalu tekan Play atau Shuffle.
- Di Search, ketik judul atau nama artis lalu tekan Enter atau tombol Search. Ketuk hasil untuk memutar. Pencarian mengembalikan maksimal 20 lagu.
- Gunakan halaman Now Playing atau dock bawah untuk seek, previous, play/pause, next, shuffle, repeat, dan volume.
- Buka tab Queue atau panel antrean kanan untuk melihat dan memilih lagu berikutnya.
- Buka tab Info untuk melihat author, lisensi, dan link komunitas.
Audio tetap berjalan saat panel ditutup.
Konfigurasi
File config dibuat otomatis saat pertama kali dijalankan. MonetLoader
menyimpannya di config/spotify.json di dalam folder loader:
/storage/emulated/0/Android/media/<package>/monetloader/config/spotify.json
| Key | Default | Keterangan |
|---|---|---|
volume | 0.8 | Volume 0.0 sampai 1.0. |
tab | home | Tab terakhir: home, search, now, queue, atau info. |
device_id | dibuat otomatis | 32 karakter hex untuk client token Spotify. |
search_hash | bawaan | Hash query searchTracks; diperbarui otomatis. |
client_version | bawaan | Versi web client Spotify; diperbarui otomatis. |
Volume dan tab disimpan otomatis. Hapus file config untuk kembali ke default.
Build native
Hanya perlu jika ingin membangun ulang libspaudio.so. Butuh Rust 1.100 atau
lebih baru, target aarch64-linux-android dan armv7-linux-androideabi, dua
sysroot NDK yang sudah disiapkan, clang, lld, dan llvm-strip.
rustup target add aarch64-linux-android armv7-linux-androideabi
SP_NDK_ARMV7=/path/to/ndk-armv7 \
SP_NDK_ARM64=/path/to/ndk-arm64 \
./build.sh
Direktori NDK harus berisi sysroot/ dan resource directory clang yang
sesuai; lihat build.sh untuk layout yang dipakai. Output ada di
build/<abi>/libspaudio.so, lalu disalin ke lib/<abi>/libspaudio.so dalam
keadaan stripped.
./test.sh menjalankan pemeriksaan host: format, clippy, unit test Rust, cek
sintaks dan lint Lua, harness UI headless, serta pemeriksaan simbol dan ELF
kedua library. Tool yang dibutuhkan: cargo, rustfmt, clippy, luacheck,
luac5.1, luajit, readelf, dan nm.
Struktur
spotify.lua script utama
Cargo.toml manifest crate Rust
Cargo.lock lockfile dependensi
build.sh build libspaudio untuk dua ABI
src/ sumber Rust libspaudio
tests/ test Rust dan harness Lua
lib/armeabi-v7a/ library untuk perangkat 32-bit
lib/arm64-v8a/ library untuk perangkat 64-bit
asset/fonts/ Roboto dan Font Awesome
docs/now-playing.jpg screenshot
Batasan
- Tidak ada login Spotify, library pribadi, unduhan audio, atau pemutaran offline.
- Home memakai empat playlist publik yang ditentukan di
spotify.lua. - Pencarian mengembalikan maksimal 20 lagu.
- Endpoint Spotify dan YouTube yang dipakai adalah endpoint internal web player, bukan API publik resmi. Perubahan dari sisi layanan bisa memutus pencarian atau pemutaran.
- Audio yang tersedia bergantung pada region, ketersediaan video, dan format yang diberikan YouTube.
- Kecocokan video memakai judul, artis, dan durasi. Video dengan durasi mirip tetap bisa terpilih walaupun bukan rekaman yang dimaksud.
Masalah umum
| Gejala | Pemeriksaan |
|---|---|
| Script tidak muncul | Pastikan spotify.lua ada di folder monetloader/. Cek log MonetLoader. |
Failed to start: ... | Baca pesan setelah titik dua dan cek lib/<abi>/libspaudio.so. |
| Font atau ikon tidak muncul | Pastikan folder asset/fonts ada di root loader. |
HTTP queue full / native not ready | Pastikan libspaudio.so sesuai ABI dan berasal dari repo ini, lalu force-stop dan buka ulang game. |
| Lagu gagal diputar | Coba lagu lain; YouTube mungkin tidak menyediakan audio penuh yang cocok. |
| Link Info tidak terbuka | Pastikan ada aplikasi atau browser yang bisa menangani link. |
Lisensi
Author: Senaa (senaaforgerr). Copyright (C) 2026 sena.
Kode dilisensikan di bawah GNU General Public License v3.0 only. Teks
lengkap ada di LICENSE. Sumber native Rust di src/, Cargo.toml,
Cargo.lock, dan build.sh disertakan agar lib/<abi>/libspaudio.so bisa
dibangun ulang.
Roboto di asset/fonts/ memakai Apache License 2.0; lihat
asset/fonts/LICENSE-Roboto.txt. Font Awesome mengikuti lisensi di
asset/fonts/LICENSE-FontAwesome.txt.
Proyek ini tidak berafiliasi dengan Spotify atau YouTube.
Komunitas
- Discord: https://discord.gg/apeUr47XCc
- YouTube: https://youtube.com/@sena-omp
English
Spotify-style music player for GTA SA-MP Mobile on MonetLoader. Search and track metadata come from Spotify's web endpoints, full-length audio comes from YouTube. No Spotify account or Premium needed, and no 30-second preview.
Features
- Track search and metadata from Spotify's web endpoints without login.
- Full-length audio from YouTube, not a 30-second preview.
mimguiUI with Home, Search, Now Playing, Queue, and Info tabs.- Four public playlists on Home, with a detail page, Play, and Shuffle.
- Queue, shuffle, repeat, seek, and volume. Audio keeps playing when the panel is closed.
- Info tab with author, license, Discord, and YouTube. Links open through an Android intent, so the Discord or YouTube app opens directly when installed.
- Native
libspaudio.soforarmeabi-v7aandarm64-v8a, selected automatically for the device ABI.
Requirements
- Android with GTA SA-MP Mobile.
- MonetLoader with
mimgui,cjson,jsoncfg,sha1, andbasexx. - The native library for the device ABI. Both are included in
lib/.
Installation
Clone or download this repository.
Copy
spotify.lua, theasset/folder, and thelib/folder into the loader directory:/storage/emulated/0/Android/media/<package>/monetloader/Replace
<package>with the client package. For GTA SA, for example:com.rockstargames.gtasa. Keep theasset/andlib/folder structure.Force-stop the game, then open it again. On first run the script copies the
libspaudio.somatching the device ABI into the app's internal directory.Wait for
[spotify] v1.0.2 ready. Type /spotify to open the player.
Usage
- Type
/spotifyor/spto open the panel. Use the same command or the close button to hide it. - On Home, tap a playlist card to open its detail page, then press Play or Shuffle.
- On Search, type a title or artist and press Enter or the Search button. Tap a result to play it. Search returns at most 20 tracks.
- Use Now Playing or the bottom dock to seek, go to the previous track, play/pause, go to the next track, toggle shuffle or repeat, and change the volume.
- Open the Queue tab or the right-side queue drawer to see and select upcoming tracks.
- Open the Info tab for the author, license, and community links.
Audio keeps playing when the panel is closed.
Configuration
The config file is created on first run. MonetLoader stores it as
config/spotify.json inside the loader directory:
/storage/emulated/0/Android/media/<package>/monetloader/config/spotify.json
| Key | Default | Notes |
|---|---|---|
volume | 0.8 | 0.0 to 1.0. |
tab | home | Last tab: home, search, now, queue, or info. |
device_id | generated | 32 hex characters for the Spotify client token. |
search_hash | built in | searchTracks query hash; updated automatically. |
client_version | built in | Spotify web client version; updated automatically. |
Volume and tab are saved automatically. Delete the file to return to the defaults.
Building the native library
Only needed to rebuild libspaudio.so. Requires Rust 1.100 or newer, the
aarch64-linux-android and armv7-linux-androideabi targets, two prepared NDK
sysroots, clang, lld, and llvm-strip.
rustup target add aarch64-linux-android armv7-linux-androideabi
SP_NDK_ARMV7=/path/to/ndk-armv7 \
SP_NDK_ARM64=/path/to/ndk-arm64 \
./build.sh
The NDK directories must contain sysroot/ and the matching clang resource
directory; see build.sh for the expected layout. Output goes to
build/<abi>/libspaudio.so, then to lib/<abi>/libspaudio.so in stripped form.
./test.sh runs the host checks: formatting, clippy, Rust unit tests, Lua
syntax and lint checks, headless UI harnesses, and symbol/ELF checks on both
libraries. Required tools: cargo, rustfmt, clippy, luacheck, luac5.1,
luajit, readelf, and nm.
Layout
spotify.lua main script
Cargo.toml Rust crate manifest
Cargo.lock dependency lockfile
build.sh libspaudio build for both ABIs
src/ Rust libspaudio sources
tests/ Rust tests and Lua harnesses
lib/armeabi-v7a/ library for 32-bit devices
lib/arm64-v8a/ library for 64-bit devices
asset/fonts/ Roboto and Font Awesome
docs/now-playing.jpg screenshot
Limitations
- No Spotify login, private library, audio download, or offline playback.
- Home uses the four public playlists defined in
spotify.lua. - Search returns at most 20 tracks.
- The Spotify and YouTube endpoints are internal web-player endpoints, not the official public APIs. Changes on their side can break search or playback.
- Available audio depends on region, video availability, and the formats YouTube returns.
- Matching uses title, artist, and duration. A video with a similar duration can still be selected even if it is not the intended recording.
Troubleshooting
| Symptom | Check |
|---|---|
| Script does not appear | Make sure spotify.lua is in monetloader/. Check the MonetLoader log. |
Failed to start: ... | Read the message after the colon and check lib/<abi>/libspaudio.so. |
| Fonts or icons are missing | Make sure asset/fonts exists in the loader root. |
HTTP queue full / native not ready | Make sure libspaudio.so matches the device ABI and comes from this repo, then force-stop and reopen the game. |
| A track fails to play | Try another track; YouTube may not provide a matching full-length audio source. |
| Info links do not open | Make sure an app or browser is available to handle the link. |
License
Author: Senaa (senaaforgerr). Copyright (C) 2026 sena.
The project is licensed under the GNU General Public License v3.0 only. The
full text is in LICENSE. The Rust native sources in src/,
Cargo.toml, Cargo.lock, and build.sh are included so
lib/<abi>/libspaudio.so can be rebuilt.
Roboto in asset/fonts/ is under the Apache License 2.0; see
asset/fonts/LICENSE-Roboto.txt. Font Awesome follows the license in
asset/fonts/LICENSE-FontAwesome.txt.
This project is not affiliated with Spotify or YouTube.
Community
- Discord: https://discord.gg/apeUr47XCc
- YouTube: https://youtube.com/@sena-omp
androidgta-salualuajitmimguimonetloadermusic-playerrustsa-mpsampspotifyyoutube
This page is built from what GitHub publishes about the repository. samp.directory does not host the code. Report a problem with this listing