Coder Social home page Coder Social logo

Comments (2)

wisp3rwind avatar wisp3rwind commented on July 1, 2024

Hi! Please, provide the configuration file that generates this issue, and beets and beets-alternatives' versions.

You could probably test this by using the particular inline field in a regular path format, (and maybe run beet move -p to show what the effect would be without actually moving anything).

One of the examples at https://beets.readthedocs.io/en/stable/plugins/inline.html does use len().

from beets-alternatives.

RainbowPants avatar RainbowPants commented on July 1, 2024

Sorry, I fat-fingered the wrong button! here's the output of beet config. it works fine during import and move! both are latest versions, so beet 1.6.0 and beets-alternatives 0.10.2. this plugin also throws an error on running beet alt --version

directory: /media/altaria/lib/music
library: /media/altaria/lib/db/beets.db

plugins: inline fetchart info copyartifacts edit originquery mbsync subsonicupdate duplicates ftintitle convert scrub zero embedart unimported convert alternatives

ui:
    color: yes
threaded: yes
ignore_hidden: yes
per_disc_numbering: yes

import:
    copy: yes
    write: yes
    bell: yes
    log: /usr/lib/beets/log.txt
    resume: ask
item_fields:
    multidisc: 1 if disctotal > 1 else 0
    material: 'if ''Digital'' in media or ''File'' in media: return ''WEB''

        if ''12" Vinyl'' in media or ''7" Vinyl'' in media or ''10" Vinyl'' in media: return ''Vinyl''

        if ''SHM-CD'' in media or ''CD-R'' in media or ''CD'' in media: return ''CD''

        if ''USB Flash Drive'' in media: return ''WEB''

        if not media: return ''WEB''

        else: return media

        '
album_fields:
    codec: "if 'FLAC' in items[0].format:\n    if items[0].bitdepth == 24:\n        sr=str(items[0].samplerate)\n        return 'FLAC 24 '+sr[:2]+'.'+sr[2]\n    else:\n        return 'FLAC'\ntotal = 0\nfor item in items:\n    total += item.bitrate\nabr = total / items.size / 1000\nif abr > 320:\n    return 'FLAC'\nelif abr == 320:\n    return '320'\nelif abr < 320 and abr >= 215:\n    return 'V0'\nelif abr < 215:\n    return 'REPME'\n"
    alb_title: "allowedLength = 64\nif len(album)  > allowedLength:\n    return album[0:allowedLength] + '...'\nreturn album\n"

match:
    max_rec:
        source:
            bandcamp: medium
        missing_tracks: low
        track_length: low
        media: medium
        catalognum: medium
    distance_weights:
        missing_tracks: 10

paths:
    default: $albumartist/$alb_title (%if{$original_year,$original_year,$year}) [${material} ${codec}]/%if{$multidisc,Disc $disc/}$track - $title
    comp: Various Artists/$album (%if{$original_year,$original_year,$year}) [${material} ${codec}]/%if{$multidisc,Disc $disc/}$track - $title
    singleton: $albumartist/Singletons/$title
alternatives:
    hiby:
        directory: /media/altaria/temp/hiby/

        paths:
            default: $albumartist/(%if{$original_year,$original_year,$year}) $alb_title [${material}]/%if{$multidisc,Disc $disc/}$track - $title
            comp: Various Artists/$alb_title (%if{$original_year,$original_year,$year}) [${material}]/%if{$multidisc,Disc $disc/}$track - $title
        formats: mp3 aac
        query: ''
        removable: yes
fetchart:
    sources: filesystem coverart bandcamp itunes amazon fanarttv albumart
    auto: yes
    minwidth: 0
    maxwidth: 0
    quality: 0
    max_filesize: 0
    enforce_ratio: no
    cautious: no
    cover_names:
    - cover
    - front
    - art
    - album
    - folder
    google_key: REDACTED
    google_engine: 001442825323518660753:hrh5ch1gjzm
    fanarttv_key: REDACTED
    lastfm_key: REDACTED
    store_source: no
    high_resolution: no
    deinterlace: no
    cover_format:
embedart:
    auto: no
    maxwidth: 0
    compare_threshold: 0
    ifempty: no
    remove_art_file: no
    quality: 0
bandcamp:
    art: yes
copyartifacts:
    extensions: .log .LOG .cue .CUE .jpg .jpeg .png .yaml .m3u .gif
    print_ignored: no
subsonic:
    url: http://192.168.149.70/navidrome/
    user: rainbowpants
    pass: REDACTED
    auth: password
scrub:
    auto: no
zero:
    auto: no
    fields: lyrics comments
    keep_fields: []
    update_database: no
unimported:
    ignore_extensions: jpg png jpeg m3u log cue yaml LOG CUE M3U
    ignore_subdirectories: hej
convert:
    delete_originals: no
    dest: /media/altaria/temp/
    formats:
        mp3: ffmpeg -i $source -y -vn -aq 0 $dest
        aac:
            command: ffmpeg -i $source -y -vn -acodec aac -aq 1 $dest
            extension: m4a
        alac:
            command: ffmpeg -i $source -y -vn -acodec alac $dest
            extension: m4a
        flac: ffmpeg -i $source -y -vn -acodec flac $dest
        opus: ffmpeg -i $source -y -vn -acodec libopus -ab 96k $dest
        ogg: ffmpeg -i $source -y -vn -acodec libvorbis -aq 3 $dest
        wma: ffmpeg -i $source -y -vn -acodec wmav2 -vn $dest
    pretend: no
    link: no
    hardlink: no
    threads: 4
    format: mp3
    id3v23: inherit
    max_bitrate: 500
    auto: no
    tmpdir:
    quiet: no
    embed: yes

    paths: {}
    no_convert: ''
    never_convert_lossy_files: no
    copy_album_art: no
    album_art_maxwidth: 0

musicbrainz:
    extra_tags:
    - year
    - catalognum
    - country
    - media
    - label
originquery:
    origin_file: origin.yaml
    use_origin_on_conflict: yes
    tag_patterns:
        media: $.Media
        year: $."Edition year"
        label: $."Record label"
        catalognum: $."Catalog number"
        albumdisambig: $.Edition
pathfields: {}
duplicates:
    album: no
    checksum: ''
    copy: ''
    count: no
    delete: no
    format: ''
    full: no
    keys: []
    merge: no
    move: ''
    path: no
    tiebreak: {}
    strict: no
    tag: ''
ftintitle:
    auto: yes
    drop: no
    format: feat. {0}
edit:
    albumfields: album albumartist
    itemfields: track title artist album
    ignore_fields: id path

from beets-alternatives.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.