Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • funkwhale funkwhale
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 426
    • Issues 426
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 13
    • Merge requests 13
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Terraform modules
    • Model experiments
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • funkwhalefunkwhale
  • funkwhalefunkwhale
  • Issues
  • #646

Tracks with multiple artists

What is the problem you are facing?

Funkwhale doesn't handle multi-artist tracks correctly. For example:

  1. Add a track with the ARTIST tag set to "Madeon (feat. Passion Pit)" or any artist compound.
  2. Observe the behavior: Funkwhale will create an entire new artist named "Madeon (feat. Passion Pit)" and display it besides the track in the web UI.

I propose we replace Track.artist with Track.artists set of TrackArtist, a model like this:

class Affiliation:
    MAIN = "main"
    FEATURED = "featured"
    COMPOSER = "composer"
    CONDUCTOR = "conductor"
    COMPILER = "compiler"
    REMIXER = "remixer"
    PRODUCER = "producer"

    _CHOICES = (
        (MAIN, "Main"),
        (FEATURED, "Featured"),
        (COMPOSER, "Composer"),
        (CONDUCTOR, "Conductor"),
        (COMPILER, "Compiler"),
        (REMIXER, "Remixer"),
        (PRODUCER, "Producer"),
    )

class TrackArtist(models.Model):
    artist = models.ForeignKeyField(Artist, related_name="tracks", on_delete=models.CASCADE)
    track = models.ForeignKeyField(Track, related_name="artists", on_delete=models.CASCADE)
    affiliation = models.CharField(
        max_length=30, default=Affiliation.MAIN, choices=Affiliation._CHOICES
    )

    class Meta:
        unique_together = (('artist', 'track'),)

and then extract information from tags and filenames (?), as appropriate:

  • MAIN and FEATURED: extract FEATURED from ARTIST tag using a regular expression (\s*\(?feat(?:uring)?\.?\s+((?:\w\s?)+)\)?$) and then split the rest by a few preset delimiters, setting MAIN.
  • COMPOSER, CONDUCTOR and REMIXER: extracted from appropriate Vorbis and ID3 tags.
  • COMPILER and PRODUCER: not 100% sure how to handle these two, as there doesn't seem to be any standard.

It might also be a good idea to implement (sort of) tabs in artist pages, allowing the user to filter by tracks the artist produced, appeared in or remixed.

What are the possible drawbacks or issues with the requested changes?

This change is going to involve quite a lot of work, especially on the API, and some UI/UX changes on the frontend.

  • More joins, resulting in worse performance overall unless we manually add a couple of indexes to the models.
  • This would require a backfill (new TrackArtist(affiliation=MAIN) = Track.artist) migration.

Context

Related to: #215 (closed)

I also noted down a few things in the Matrix channel.

Edited Dec 31, 2018 by Auri
Assignee
Assign to
Time tracking