mirror of
https://github.com/beetbox/beets.git
synced 2026-01-17 13:44:01 +01:00
Merge branch 'master' into pyupgrade
This commit is contained in:
commit
ed07bb5b7e
6 changed files with 86 additions and 72 deletions
6
.github/workflows/ci.yaml
vendored
6
.github/workflows/ci.yaml
vendored
|
|
@ -12,7 +12,7 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
platform: [ubuntu-latest, windows-latest]
|
||||
python-version: [3.6, 3.7, 3.8, 3.9, 3.10-rc.2]
|
||||
python-version: [3.6, 3.7, 3.8, 3.9, 3.10.0-rc.2]
|
||||
|
||||
env:
|
||||
PY_COLORS: 1
|
||||
|
|
@ -45,7 +45,7 @@ jobs:
|
|||
sudo apt install ffmpeg # For replaygain
|
||||
|
||||
- name: Test older Python versions with tox
|
||||
if: matrix.python-version != '3.9' && matrix.python-version != '3.10-rc.2'
|
||||
if: matrix.python-version != '3.9' && matrix.python-version != '3.10.0-rc.2'
|
||||
run: |
|
||||
tox -e py-test
|
||||
|
||||
|
|
@ -55,7 +55,7 @@ jobs:
|
|||
tox -vv -e py-cov
|
||||
|
||||
- name: Test nightly Python version with tox
|
||||
if: matrix.python-version == '3.10-rc.2'
|
||||
if: matrix.python-version == '3.10.0-rc.2'
|
||||
# continue-on-error is not ideal since it doesn't give a visible
|
||||
# warning, but there doesn't seem to be anything better:
|
||||
# https://github.com/actions/toolkit/issues/399
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@
|
|||
import musicbrainzngs
|
||||
import re
|
||||
import traceback
|
||||
from collections import Counter
|
||||
from six.moves.urllib.parse import urljoin
|
||||
|
||||
from beets import logging
|
||||
from beets import plugins
|
||||
|
|
|
|||
138
beets/library.py
138
beets/library.py
|
|
@ -455,47 +455,47 @@ class Item(LibModel):
|
|||
'path': PathType(),
|
||||
'album_id': types.FOREIGN_ID,
|
||||
|
||||
'title': types.STRING,
|
||||
'artist': types.STRING,
|
||||
'artist_sort': types.STRING,
|
||||
'artist_credit': types.STRING,
|
||||
'album': types.STRING,
|
||||
'albumartist': types.STRING,
|
||||
'albumartist_sort': types.STRING,
|
||||
'albumartist_credit': types.STRING,
|
||||
'genre': types.STRING,
|
||||
'style': types.STRING,
|
||||
'discogs_albumid': types.INTEGER,
|
||||
'discogs_artistid': types.INTEGER,
|
||||
'discogs_labelid': types.INTEGER,
|
||||
'lyricist': types.STRING,
|
||||
'composer': types.STRING,
|
||||
'composer_sort': types.STRING,
|
||||
'work': types.STRING,
|
||||
'mb_workid': types.STRING,
|
||||
'work_disambig': types.STRING,
|
||||
'arranger': types.STRING,
|
||||
'grouping': types.STRING,
|
||||
'year': types.PaddedInt(4),
|
||||
'month': types.PaddedInt(2),
|
||||
'day': types.PaddedInt(2),
|
||||
'track': types.PaddedInt(2),
|
||||
'tracktotal': types.PaddedInt(2),
|
||||
'disc': types.PaddedInt(2),
|
||||
'disctotal': types.PaddedInt(2),
|
||||
'lyrics': types.STRING,
|
||||
'comments': types.STRING,
|
||||
'bpm': types.INTEGER,
|
||||
'comp': types.BOOLEAN,
|
||||
'mb_trackid': types.STRING,
|
||||
'mb_albumid': types.STRING,
|
||||
'mb_artistid': types.STRING,
|
||||
'mb_albumartistid': types.STRING,
|
||||
'mb_releasetrackid': types.STRING,
|
||||
'trackdisambig': types.STRING,
|
||||
'albumtype': types.STRING,
|
||||
'albumtypes': types.STRING,
|
||||
'label': types.STRING,
|
||||
'title': types.STRING,
|
||||
'artist': types.STRING,
|
||||
'artist_sort': types.STRING,
|
||||
'artist_credit': types.STRING,
|
||||
'album': types.STRING,
|
||||
'albumartist': types.STRING,
|
||||
'albumartist_sort': types.STRING,
|
||||
'albumartist_credit': types.STRING,
|
||||
'genre': types.STRING,
|
||||
'style': types.STRING,
|
||||
'discogs_albumid': types.INTEGER,
|
||||
'discogs_artistid': types.INTEGER,
|
||||
'discogs_labelid': types.INTEGER,
|
||||
'lyricist': types.STRING,
|
||||
'composer': types.STRING,
|
||||
'composer_sort': types.STRING,
|
||||
'work': types.STRING,
|
||||
'mb_workid': types.STRING,
|
||||
'work_disambig': types.STRING,
|
||||
'arranger': types.STRING,
|
||||
'grouping': types.STRING,
|
||||
'year': types.PaddedInt(4),
|
||||
'month': types.PaddedInt(2),
|
||||
'day': types.PaddedInt(2),
|
||||
'track': types.PaddedInt(2),
|
||||
'tracktotal': types.PaddedInt(2),
|
||||
'disc': types.PaddedInt(2),
|
||||
'disctotal': types.PaddedInt(2),
|
||||
'lyrics': types.STRING,
|
||||
'comments': types.STRING,
|
||||
'bpm': types.INTEGER,
|
||||
'comp': types.BOOLEAN,
|
||||
'mb_trackid': types.STRING,
|
||||
'mb_albumid': types.STRING,
|
||||
'mb_artistid': types.STRING,
|
||||
'mb_albumartistid': types.STRING,
|
||||
'mb_releasetrackid': types.STRING,
|
||||
'trackdisambig': types.STRING,
|
||||
'albumtype': types.STRING,
|
||||
'albumtypes': types.STRING,
|
||||
'label': types.STRING,
|
||||
'acoustid_fingerprint': types.STRING,
|
||||
'acoustid_id': types.STRING,
|
||||
'mb_releasegroupid': types.STRING,
|
||||
|
|
@ -1024,35 +1024,35 @@ class Album(LibModel):
|
|||
_fields = {
|
||||
'id': types.PRIMARY_ID,
|
||||
'artpath': PathType(True),
|
||||
'added': DateType(),
|
||||
'added': DateType(),
|
||||
|
||||
'albumartist': types.STRING,
|
||||
'albumartist_sort': types.STRING,
|
||||
'albumartist_credit': types.STRING,
|
||||
'album': types.STRING,
|
||||
'genre': types.STRING,
|
||||
'style': types.STRING,
|
||||
'discogs_albumid': types.INTEGER,
|
||||
'discogs_artistid': types.INTEGER,
|
||||
'discogs_labelid': types.INTEGER,
|
||||
'year': types.PaddedInt(4),
|
||||
'month': types.PaddedInt(2),
|
||||
'day': types.PaddedInt(2),
|
||||
'disctotal': types.PaddedInt(2),
|
||||
'comp': types.BOOLEAN,
|
||||
'mb_albumid': types.STRING,
|
||||
'mb_albumartistid': types.STRING,
|
||||
'albumtype': types.STRING,
|
||||
'albumtypes': types.STRING,
|
||||
'label': types.STRING,
|
||||
'mb_releasegroupid': types.STRING,
|
||||
'asin': types.STRING,
|
||||
'catalognum': types.STRING,
|
||||
'script': types.STRING,
|
||||
'language': types.STRING,
|
||||
'country': types.STRING,
|
||||
'albumstatus': types.STRING,
|
||||
'albumdisambig': types.STRING,
|
||||
'albumartist': types.STRING,
|
||||
'albumartist_sort': types.STRING,
|
||||
'albumartist_credit': types.STRING,
|
||||
'album': types.STRING,
|
||||
'genre': types.STRING,
|
||||
'style': types.STRING,
|
||||
'discogs_albumid': types.INTEGER,
|
||||
'discogs_artistid': types.INTEGER,
|
||||
'discogs_labelid': types.INTEGER,
|
||||
'year': types.PaddedInt(4),
|
||||
'month': types.PaddedInt(2),
|
||||
'day': types.PaddedInt(2),
|
||||
'disctotal': types.PaddedInt(2),
|
||||
'comp': types.BOOLEAN,
|
||||
'mb_albumid': types.STRING,
|
||||
'mb_albumartistid': types.STRING,
|
||||
'albumtype': types.STRING,
|
||||
'albumtypes': types.STRING,
|
||||
'label': types.STRING,
|
||||
'mb_releasegroupid': types.STRING,
|
||||
'asin': types.STRING,
|
||||
'catalognum': types.STRING,
|
||||
'script': types.STRING,
|
||||
'language': types.STRING,
|
||||
'country': types.STRING,
|
||||
'albumstatus': types.STRING,
|
||||
'albumdisambig': types.STRING,
|
||||
'releasegroupdisambig': types.STRING,
|
||||
'rg_album_gain': types.NULL_FLOAT,
|
||||
'rg_album_peak': types.NULL_FLOAT,
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# This file is part of beets.
|
||||
# Copyright 2021, Edgars Supe.
|
||||
#
|
||||
|
|
@ -14,6 +16,7 @@
|
|||
|
||||
"""Adds an album template field for formatted album types."""
|
||||
|
||||
from __future__ import division, absolute_import, print_function
|
||||
|
||||
from beets.autotag.mb import VARIOUS_ARTISTS_ID
|
||||
from beets.library import Album
|
||||
|
|
|
|||
|
|
@ -27,6 +27,13 @@ Major new features:
|
|||
option is set, and sort them by the number of votes. Thanks to
|
||||
:user:`aereaux`.
|
||||
|
||||
* Primary and secondary release types from MusicBrainz are now stored in
|
||||
``albumtypes`` field. Thanks to :user:`edgars-supe`.
|
||||
:bug:`2200`
|
||||
|
||||
* :doc:`/plugins/albumtypes`: An accompanying plugin for formatting
|
||||
``albumtypes``. Thanks to :user:`edgars-supe`.
|
||||
|
||||
Other new things:
|
||||
|
||||
* Permissions plugin now sets cover art permissions to the file permissions.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# This file is part of beets.
|
||||
# Copyright 2021, Edgars Supe.
|
||||
#
|
||||
|
|
@ -14,6 +15,7 @@
|
|||
|
||||
"""Tests for the 'albumtypes' plugin."""
|
||||
|
||||
from __future__ import division, absolute_import, print_function
|
||||
|
||||
import unittest
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue