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

lastgenre: `force` config option doesn’t work #2704

Closed
geoffreynl opened this issue Sep 29, 2017 · 5 comments

Comments

Projects
None yet
3 participants
@geoffreynl
Copy link

commented Sep 29, 2017

Problem

I want to write the popular genres from Last.fm in the metatags of my music.

I have the following configuration:

lastgenre:
    whitelist: no
    count: 5
    fallback: nogenre
    min_weight: 20
    source: track
    force: yes

Now I run "beets lastgenre"

Other than what I had expected that beets would now write the 5 most popular genres into each file, it just outputs with (keep) and doesn't change anything to the genre metatag...

What could be going wrong here and how can I fix this?

Thanks a lot for any help!

@sampsyo sampsyo added the needinfo label Sep 29, 2017

@sampsyo

This comment has been minimized.

Copy link
Member

commented Sep 29, 2017

Hello! When you report a problem, it really helps us if you use the issue template. I know it looks like a lot of extra information, but actually including the verbose output from running the command and your versions can help us understand what's happening.

@kimpenhaus

This comment has been minimized.

Copy link

commented Jun 21, 2018

Today I stumbled across the same problem - so I am trying to fill the issue template

Problem

Even though I added lastgenre with force: yes inside my config.yaml (which should than overwrite the genreas from what I understood from the docs) running lastgenre results in keep.

I did re-run it for a single album and it always procudes the same output - keep
The album (or better each track) ist currently having the genre metalcore - re-running I would asume changing it to the correct Metalcore

Running this command in verbose (-vv) mode:

$ beet -vv lastgenre albumartist:"Integrity" album:"The Blackest Curse"
user configuration: /Users/k/.config/beets/config.yaml
data directory: /Users/k/.config/beets
plugin paths:
Sending event: pluginload
library database: /Users/k/.config/beets/library.db
library directory: /Volumes/music
Sending event: library_opened
lastgenre: genre for album Integrity - The Blackest Curse (keep): metalcore
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: write
zero: comments:  -> None
Sending event: after_write
Sending event: write
zero: comments:  -> None
Sending event: after_write
Sending event: write
zero: comments:  -> None
Sending event: after_write
Sending event: write
zero: comments:  -> None
Sending event: after_write
Sending event: write
zero: comments:  -> None
Sending event: after_write
Sending event: write
zero: comments:  -> None
Sending event: after_write
Sending event: write
zero: comments:  -> None
Sending event: after_write
Sending event: write
zero: comments:  -> None
Sending event: after_write
Sending event: write
zero: comments:  -> None
Sending event: after_write
Sending event: write
zero: comments:  -> None
Sending event: after_write
Sending event: cli_exit

Led to this problem:

lastgenre: genre for album Integrity - The Blackest Curse (keep): metalcore

Setup

  • OS: 10.13.5
  • Python version: 3.6.5
  • beets version: 1.4.7
  • Turning off plugins made problem go away (yes/no): no - to be more precise I turned off all others plugins than lastgenre - obviously ;-)

My configuration (output of beet config) is:

directory: /Volumes/music/

paths:
    default: $albumartist/$album/%if{$disc == 0 && $totaldisc == 1, 01, $disc} - $track - $title
    comp: Compilations/$album/%if{$disc == 0 && $totaldisc == 1, 01, $disc} - $track - $title

ignore: ['Ringtones', '#recycle', '.*', '*~', 'System Volume Information', 'lost+found', '.m4r']

format_item: ($format) $artist - $album - $track - $title

clutter: ['Thumbs.db', '.DS_Store', '*.m3u', '*.pls', '*.nfo', '*.sfv', '*.jpg', '*.jpeg', '*.png', '*.url', '*.URL', '*.txt', '*.ini']

import:
    copy: no
    write: yes
    move: yes

plugins: [discogs, bandcamp, fetchart, embedart, chroma, zero, scrub, duplicates, missing, edit, lastgenre]

bandcamp:
    art: true

fetchart:
    cautious: true
    minwidth: 200
    maxwidth: 200
    enforce_ratio: yes
    sources: [filesystem, bandcamp, coverart, amazon, albumart, wikipedia, google]

zero:
    fields: comments
    update_database: true

lastgenre:
    source: album
    count: 10
    force: yes
    canonical: '~/Documents/git/india.kimpenhaus.home/beets/genres-tree.yaml'
    whitelist: '~/Documents/git/india.kimpenhaus.home/beets/genres.txt'
    prefer_specific: yes
    min_weight: 20
    fallback: ''
    separator: ';'

missing:
    format: $albumartist - $album - $title
    count: no
    total: no

edit:
    itemfields: [track, title, artist, albumartist, album, genre]

If you need more detailed info I will gladly provide.
Thanks!

@sampsyo

This comment has been minimized.

Copy link
Member

commented Jun 21, 2018

Awesome! Thank you for all the extra detail.

To confirm a suspicion, can you please try using the command-line flag equivalent (that is, use the -f flag to the lastgenre command)? I’m guessing that will work. We probably need to remove the default parameter on this line:

action='store_true', default=False,

@kimpenhaus

This comment has been minimized.

Copy link

commented Jun 21, 2018

You're a beast 😄 That worked!

grafik

@sampsyo sampsyo added bug and removed needinfo labels Jun 22, 2018

@sampsyo sampsyo changed the title Lastgenre not working as expected lastgenre: `force` config option doesn’t work Jun 22, 2018

@sampsyo

This comment has been minimized.

Copy link
Member

commented Jun 22, 2018

Great!! This should be an easy fix. (I’m away from a computer right now, so anyone reading this thread is welcome to take credit for the necessary one-line change.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.