mirror of
https://github.com/beetbox/beets.git
synced 2026-01-07 16:34:45 +01:00
MediaFile: Remove one last utility function (#1966)
This commit is contained in:
parent
075a4b6b85
commit
2cc1a61ea4
1 changed files with 6 additions and 2 deletions
|
|
@ -58,7 +58,6 @@ import traceback
|
|||
import enum
|
||||
|
||||
from beets import logging
|
||||
from beets.util import as_string
|
||||
import six
|
||||
|
||||
|
||||
|
|
@ -1486,7 +1485,12 @@ class MediaFile(object):
|
|||
"""
|
||||
for property, descriptor in cls.__dict__.items():
|
||||
if isinstance(descriptor, MediaField):
|
||||
yield as_string(property)
|
||||
if isinstance(property, bytes):
|
||||
# On Python 2, class field names are bytes. This method
|
||||
# produces text strings.
|
||||
yield property.decode('utf8', 'ignore')
|
||||
else:
|
||||
yield property
|
||||
|
||||
@classmethod
|
||||
def _field_sort_name(cls, name):
|
||||
|
|
|
|||
Loading…
Reference in a new issue