ampache / ampache

A web based audio/video streaming application and file manager allowing you to access your music & videos from anywhere, using almost any internet enabled device.
http://ampache.org
GNU Affero General Public License v3.0
3.51k stars 588 forks source link

MusicBrainz not disabled during catalog import #3142

Open zhkfn opened 2 years ago

zhkfn commented 2 years ago

Description

MusicBrainz is used during catalog import even when I've turned it off in the config.

Describe the bug

Ampache is running on a server with no access to the internet, so it can't use MusicBrainz at all, and I've removed MusicBrainz as a source for metadata in the config. However, on import Ampache will still take bits of data from the comments and elsewhere (sometimes actual mbids) and attempt to scrape MusicBrainz. In the end, most of my music library gets matched to Aerosmith, who happens to be the first artist alphabetically.

To reproduce

  1. Disconnect server with Apache from the internet.
  2. Remove MusicBrainz from config file (or not, doesn't seem to make a difference)
  3. Import music by different artists with complete id3 data filled out
  4. Many songs get assigned to the first artist alphabetically (seemingly when they have data in the comment field?)

Expected behavior

Music would be added according to id3 data only, and MusicBrainz would not be attempted to be scraped.

Environment

Client type

Ampache web ui over localhost

zhkfn commented 2 years ago

I made some quick and dirty edits to the check method in Artist.php and I was able to resolve the issue where it assigns most of my music to one artist. However, I was still running into an issue where many albums were broken into multiple entries (like one or two songs per 'album') even though the album title, album artist, and in most cases song artist was identical for all songs in the album. I started to do some more quick and dirty edits to Album.php and Song.php, but managed to break something before running out of time.

lachlan-00 commented 2 years ago

are you saying that you don't want to read the musicbrainz related tags from the files?

zhkfn commented 2 years ago

For the vast majority of these songs, there is no metadata related to MusicBrainz at all. There are maybe a dozen or two that have mb Ids stored in the comments, but the remainder (several thousand) seem to be getting mis-parsed. Either way, I wouldn't expect the majority of my music to be assigned to one artist. The final several thousand with no comment metadata were assigned properly to their correct artist.

I was able to make a quick fix for my case by commenting out some lines in Artist.php to keep it from attempting to parse for mb Ids.

The multiple album issue turned out to be another bug for compilation albums - since most of the songs were written in different years, it was creating one album per year due to the detail in the album cache map. I removed the year columns from that array to suit my needs.