Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

beet update messes up albumtype tags under Bash for Windows #4938

Closed
light opened this issue Oct 7, 2023 · 18 comments
Closed

beet update messes up albumtype tags under Bash for Windows #4938

light opened this issue Oct 7, 2023 · 18 comments
Labels
needinfo We need more details or follow-up from the filer before this can be tagged "bug" or "feature."

Comments

@light
Copy link

light commented Oct 7, 2023

Problem

Running beet update inside Git Bash under Windows 10, albumtype and albumtypes are split into single letters :

$ beet update
Some Artist - Some Album - Some Song
  albumtype: soundtrack -> a
  albumtypes: album; soundtrack -> ['a', 'l', 'b', 'u', 'm', ';', ' ', 's', 'o', 'u', 'n', 'd', 't', 'r', 'a', 'c', 'k']

Under PowerShell, I get the same behavior :

PS C:\Users\light> beet update
Some Artist - Some Album - Some Song
  albumtypes: album; soundtrack -> ←[31;01m['←[39;49;00ma←[31;01m', '←[39;49;00ml←[31;01m', '←[39;49;00mb←[31;01m', '←[39;49;00mu←[31;01m', '←[39;49;00mm←[31;01m', '←[39;49;00m;←[31;01m',←[39;49;00m ←[31;01m' ', '←[39;49;00ms←[31;01m', '←[39;49;00mo←[31;01m', '←[39;49;00mu←[31;01m', '←[39;49;00mn←[31;01m', '←[39;49;00md←[31;01m', '←[39;49;00mt←[31;01m', '←[39;49;00mr←[31;01m', '←[39;49;00ma←[31;01m', '←[39;49;00mc←[31;01m', '←[39;49;00mk←[31;01m']←[39;49;00m
  albumtype: ←[31;01msoundtr←[39;49;00ma←[31;01mck←[39;49;00m -> a

Under cmd, I don't see this behavior :

C:\Users\light>beet update

C:\Users\light>

Using cmd however is not really viable since there is no color support and escape sequences are displayed bare (as in PowerShell). Which seems related to that other issue : #2607

Setup

Completely fresh install of beet and basic config, first thing I imported.

$ beet --version
beets version 1.6.0
Python version 3.9.1
no plugins loaded
$ beet config
directory: M:/MP3/sorted
library: M:/MP3/musiclibrary.db

import:
    move: yes
@arsaboo
Copy link
Contributor

arsaboo commented Oct 12, 2023

I am seeing this in Ubuntu too. Looks like it happens only with album; soundtrack (need to double check this)

Some Artist - Some Album - Some Song
  albumtype: soundtrack -> a
  albumtypes: album; soundtrack -> a; l; b; u; m; ;;  ; s; o; u; n; d; t; r; a; c; k

@pioneerHitesh
Copy link

@arsaboo i would like to pick this issue up can you assign this to me?

@arsaboo
Copy link
Contributor

arsaboo commented Oct 14, 2023

@pioneerHitesh Absolutely... please submit a PR. There is no assignment on beets, but anyone working on this will see your comment.

@pioneerHitesh
Copy link

pioneerHitesh commented Oct 15, 2023

I am seeing this in Ubuntu too. Looks like it happens only with album; soundtrack (need to double check this)

Some Artist - Some Album - Some Song
  albumtype: soundtrack -> a
  albumtypes: album; soundtrack -> a; l; b; u; m; ;;  ; s; o; u; n; d; t; r; a; c; k

@arsaboo This issue is not reproducible on ubuntu shell when deleting a song then running beets update.Can you suggest any specific album where this is happening?

@pioneerHitesh
Copy link

@light @arsaboo this issue is not reproducible on windows 11 powershell and git bash.

@arsaboo
Copy link
Contributor

arsaboo commented Oct 15, 2023

Here's one:

Sukhwinder Singh & Sunidhi Chauhan - Billu Barber - Marjaani (Electro House)
  albumtypes: album; soundtrack -> a; l; b; u; m; ;;  ; s; o; u; n; d; t; r; a; c; k
  albumtype: album -> a

@pioneerHitesh
Copy link

pioneerHitesh commented Oct 15, 2023

@arsaboo i am unable to replicate this issue with windows 11 powershell, git bash version 2.42.0.2 and terminal in ubuntu version 22.04.03 LTS

@arsaboo
Copy link
Contributor

arsaboo commented Oct 21, 2023

This is excessive:

arsaboo@arsplex:~$ beet info album:"ALBUM"
        albumtype: s
       albumtypes: s; ;;  ; ;; ;;  ;  ; ;;  ; ;; ;;  ; ;; ;;  ;  ; ;;  ;  ; ;;  ; ;; ;;  ;  ; ;;  ; ;; ;;  ; ;; ;;  ;  ; ;;  ; ;; ;;  ; ;; ;;  ;  ; ;;  ;  ; ;;  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;; ;;  ;  ; ;;  ;  ; ;;  ; ;; ;;  ;  ; ;;  ; e

@sampsyo any thoughts what may be driving it...I am lost here and not sure what/how to fix this.

@sampsyo
Copy link
Member

sampsyo commented Oct 21, 2023

Unfortunately this seems to require some very careful debugging, and I don't have an immediate intuition about the source. I would start with #4582, which purports to have addressed this general issue—and start by ensuring that everyone experiencing it is using a version of the code with that fix?

@sampsyo sampsyo added the needinfo We need more details or follow-up from the filer before this can be tagged "bug" or "feature." label Oct 21, 2023
@JOJ0
Copy link
Member

JOJ0 commented Oct 29, 2023

@light as sampsyo suggested: Please try to replicate this issue with the current beets version in development (git master). Thanks!

@JOJ0
Copy link
Member

JOJ0 commented Oct 29, 2023

@pioneerHitesh if you want to pick up this issue, please read #4582 as sampsyo suggested, then read #4715 which describes, as far as I understand it, the part of the initial issue that remains to be fixed

@pioneerHitesh
Copy link

@JOJ0 will take a look at this and will give it another try.

@arsaboo
Copy link
Contributor

arsaboo commented Nov 1, 2023

Weirdly enough, I am now seeing some going in the reverse direction after I updated.

  albumtypes: a; ;;  ; ;; ;;  ;  ; ;;  ; ;; ;;  ; ;; ;;  ;  ; ;;  ;  ; ;;  ; ;; ;;  ;  ; ;;  ; l; ;;  ; ;; ;;  ;  ; ;;  ; ;; ;;  ; ;; ;;  ;  ; ;;  ;  ; ;;  ; ;; ;;  ;  ; ;;  ; b; ;;  ; ;; ;;  ;  ; ;;  ; ;; ;;  ; ;; ;;  ;  ; ;;  ;  ; ;;  ; ;; ;;  ;  ; ;;  ; u; ;;  ; ;; ;;  ;  ; ;;  ; ;; ;;  ; ;; ;;  ;  ; ;;  ;  ; ;;  ; ;; ;;  ;  ; ;;  ; m -> album
  albumtype: a -> album

@JOJ0
Copy link
Member

JOJ0 commented Nov 1, 2023

Weirdly enough, I am now seeing some going in the reverse direction after I updated.


  albumtypes: a; ;;  ; ;; ;;  ;  ; ;;  ; ;; ;;  ; ;; ;;  ;  ; ;;  ;  ; ;;  ; ;; ;;  ;  ; ;;  ; l; ;;  ; ;; ;;  ;  ; ;;  ; ;; ;;  ; ;; ;;  ;  ; ;;  ;  ; ;;  ; ;; ;;  ;  ; ;;  ; b; ;;  ; ;; ;;  ;  ; ;;  ; ;; ;;  ; ;; ;;  ;  ; ;;  ;  ; ;;  ; ;; ;;  ;  ; ;;  ; u; ;;  ; ;; ;;  ;  ; ;;  ; ;; ;;  ; ;; ;;  ;  ; ;;  ;  ; ;;  ; ;; ;;  ;  ; ;;  ; m -> album

  albumtype: a -> album

Yep, we still haven't fixed this issue. I'm sure you remember ;-)

Happens if you have broken data in the db already.
Here's how to temporarily fix it: #4582 (comment)

@Gremious
Copy link

Gremious commented Nov 22, 2023

Just wanted to say that this also happened to me on latest (? - 1.6.0) on debian bullseye. I don't think OS matters here.

Brand new user, started importing my library, ~1 folder at a time. After 4-5, I ran beet update to try and fix something, and it happened to me not with soundtrack, but with album; compilation as well as with just album and ep.

I already did the beet write for the fix but I do see it the output of what it fixed:

D3Δ†H H3X - Arcana - PΔRΔMΦUR
  albumtype: a -> album
  albumtypes: ['a', 'l', 'b', 'u', 'm'] -> album

D3Δ†H H3X - King Remixes - King (NOIRE ANTIDOTE remix)
  albumtype: e -> ep
  albumtypes: ['e', 'p'] -> ep

Darkside - Take a Trip, Part 1 - Trumphession
  albumtype: a -> compilation
  albumtypes: ['a', 'l', 'b', 'u', 'm', ';', ' ', 'c', 'o', 'm', 'p', 'i', 'l', 'a', 't', 'i', 'o', 'n'] -> album; compilation

So seemingly, it's any os, and any albumtype

@JOJ0
Copy link
Member

JOJ0 commented Nov 22, 2023

@Gremious sorry you got into this. It's partly fixed in git latest beets version. Please upgrade and try fix your library using the steps described here #4582 (comment)

@Gremious
Copy link

Yep it's alright, I did that fix just earlier, all is well :)

Good to know it's actually fixed on latest, I will use git version, thanks for the heads up!

@JOJ0
Copy link
Member

JOJ0 commented Dec 10, 2023

Duplicate of #4528

@JOJ0 JOJ0 marked this as a duplicate of #4528 Dec 10, 2023
@JOJ0 JOJ0 closed this as completed Dec 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needinfo We need more details or follow-up from the filer before this can be tagged "bug" or "feature."
Projects
None yet
Development

No branches or pull requests

6 participants