Jump to content

Genre and Composer Uris


Recommended Posts

@maxmp the table folder_files contains the genre_id and composer_id but when a user searches for eg genre="rock" and composer ="satriani" the string would first need to be translated into an _id. 

Using the uri

public final Uri powerampgenreuri = Uri.parse("content://com.maxmpz.audioplayer.data/genres/files");

will return the genre string "rock" but cannot show the composer string

conversely, using the 

public final Uri composersuri = Uri.parse("content://com.maxmpz.audioplayer.data/composers/files");

will return the composer string "satriani"  but not genre.

Is it at all possible in the next release to expand either uri to return both genre and composer strings?

The query below an example of  the dataset I am looking for

genres._id, genres.genre,
 folder_files.composer_id ,
INNER JOIN genres ON genres._id=genre_entries.genre_id  
INNER JOIN composers ON  folder_files.composer_id=composers."_id"
INNER JOIN folder_files ON folder_files._id=genre_entries.folder_file_id  
INNER JOIN folders ON folders._id=folder_files.folder_id  
LEFT JOIN albums ON albums._id=folder_files.album_id 
LEFT JOIN artists ON artists._id=folder_files.artist_id ;



Link to comment
Share on other sites

It requires joins between multiple tables, preferable left joins, as inner join will return just entries with both genres and composers, while there can be track without those at all.

As Poweramp has no use for genres + composers (and other possible combinations), it’s not implemented.

I would suggest just importing track data into your local db and doing the joins as needed.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...