Searching for Music Album from Entry (Android)

83 views
Skip to first unread message

Gabriel

unread,
Mar 22, 2025, 6:32:40 PM3/22/25
to mementodatabase
In case anyone wants to do the same thing and can find the code useful: I’m building a music database based on the “Albums” library template, and I thought it would be great to be able to click on an entry and search for the album in my music service (I use YouTube Music). Here’s the script:

let e = entry();
let artist = e.field('Artist');  // Artist field
let album = e.field('Title');    // Title field

// Construct search query
let query = encodeURIComponent(artist + " " + album);

// YouTube Music search URL
let url = "https://music.youtube.com/search?q=" + query;

let i = intent("android.intent.action.VIEW");
i.data(url);  // The data we want to send in the intent

i.send();

Set the Script Place of Action to “Entries in the List”, and choose the icon of your choice, and you’re good to go! When you press on the entry icon, it automatically searches YouTube Music for it.

Jorge Luis

unread,
Jul 18, 2025, 9:54:30 PM7/18/25
to mementodatabase

Great!!!

I change Youtube for URL 
https://open.spotify.com/search/

for Spotify
Reply all
Reply to author
Forward
0 new messages