MaxFour / Music-Player

Lightweight and Material designed Music Player
GNU General Public License v3.0
283 stars 71 forks source link

Artist field is deleted after editing album tags #58

Open camelCaseSucks opened 5 years ago

camelCaseSucks commented 5 years ago

Actual behaviour

Albums move from artist to 'unknown artist' after editing album tags

Expected behaviour

tags should not be lost

Steps to reproduce

  1. Select an artist, then an album
  2. Open menu and click 'tag editor'
  3. Make any change and press save button
  4. Return to albums list and watch the album disappear
  5. Check 'unknown artist' to find album

Environment data

Android version: 8.1

Device model: nokia 6.1

Stock or customized system: stock

Music-Player app version: 1.2.1

MaxFour commented 5 years ago

Hello! I reproduced, but it's all okay. Please try last version.

camelCaseSucks commented 5 years ago

I just tested 1.3.0 and the bug still exists.

camelCaseSucks commented 5 years ago

I found the problem.

https://github.com/MaxFour/Music-Player/blob/master/app/src/main/java/com/maxfour/music/ui/activities/tageditor/AlbumTagEditorActivity.java#L168

Here, it's setting both the Artist and Album Artist tags to the contents of the Album Artist EditText. If the Album tag was set but Album Artist was not, the Album tag is overwritten with an empty string. You can fix it by just removing this line, or even better, adding an Artist EditText to the album tag editor to enable editing the Artist field for the whole album just like in the song tag editor.