• Welcome to RadioDJ - Free Radio Automation Software Forum. Please log in or sign up.

Help with repeated artist back to back

Started by bubbly, December 28, 2020, 12:43:52 PM

Derek

Quote from: Jhonny on December 28, 2020, 04:43:15 PMLike more info on radiodj
Vissit The radiodj.info turorials.

I don't think that link works Jhonny :(

Jhonny

Currently on
RDJ V 2.0.4.8
MariaDB V 10.6.21
WIN 11 PRO

Marius

#62
Quote from: jeffm on February 28, 2025, 05:10:51 PMIs there a way to bulk add "Associate Artists"?

I have a lot of Sting and Police, Genesis and Phil Collins, Eric Clapton (and all of his related bands), etc.
It's pretty time consuming to go into each track to add the associated artist.

Did you tried Utilities - Update Associated Artists? I mean, if the artist field contains all the data, you just need to find a pattern to use it as a separator.
If the data is not contained in the artist field, there is no an easy way.

You can try manipulating directly the database, but if you're not familiar with that, you can break something pretty easy.

First run the Utilities - Update Associated Artists to populate the existing artist(s). Then if you have multiple tracks from an artist which you would like to have another associated artist, you can run something like this:

Code (MySQL) Select
UPDATE
    `songs` AS `dest`,
    (
        SELECT
            ID, associated_artists
        FROM
            `songs`
        WHERE
            associated_artists LIKE '%Genesis%' AND associated_artists NOT LIKE '%Phil Collins%'
    ) AS `src`
SET
    `dest`.`associated_artists` = CONCAT_WS(',', `src`.`associated_artists`, 'Phil Collins')
WHERE
    `dest`.`ID` = src.ID
;

In this script will search for the artist "Genesis" in the associated artist fields and if it finds it, it will add also "Phil Collins", but only if "Phil Collins" is not already there.

You need the replace the searching term (marked in red bellow) with the artist you are searching in your database and the new artist which will be added to the associated artist field (marked in green bellow):

QuoteUPDATE
    `songs` AS `dest`,
    (
        SELECT
            ID, associated_artists
        FROM
            `songs`
        WHERE
            associated_artists LIKE '%Genesis%' AND associated_artists NOT LIKE '%Phil Collins%'
    ) AS `src`
SET
    `dest`.`associated_artists` = CONCAT_WS(',', `src`.`associated_artists`, 'Phil Collins')
WHERE
    `dest`.`ID` = src.ID
;

As you can see, it can't do anything automatically and the only useful scenario is if you have many tracks from the same artist that must be updated.
DOWNLOADS PAGE

HOW TO FIX RADIODJ DATABASE
----------------
Please don't PM me for support requests. Use the forums instead.