Package: phrydy
phrydyThis is an extended version of themediafilelibrary of thebeetsproject.
It is used by the Python audio renaming command line toolaudiorename.The namephrydyis pronounced like the German wordFriedi.In the previous versions thephrydylibrary offers a standalone
version of themediafile.pyincluded in thebeetsproject. Nowbeetshas its own separate library calledmediafile. It might be
better to use the upstream library directly.phrydyofferes two media file classes:MediaFileis the
looped through and unmodified version that comes directly from the beets
project.MediaFileExtendedis the slightly modified and extended
version:Changed fields:albumartist_sortcomposer_sortmb_workidNew fields:workwork_hierarchyreleasegroup_typesOther additions:A little command line debug utility namedphrydy-debug.A dictionary containing documentation about the various meta data
fields.Some code to generate documentation from the field documentation
dictionary.InstallationFrom Githubgitclonegit@github.com:Josef-Friedrich/phrydy.gitcdphrydypythonsetup.pyinstallFrom PyPIpipinstallphrydyeasy_installphrydyUsageBasic usage:>>> from phrydy import MediaFileExtended
>>> f = MediaFileExtended('Lucy.mp3')
>>> f.title
u'Lucy in the Sky with Diamonds'
>>> f.artist = 'The Beatles'
>>> f.save()List all available fields of a media file:fromphrydyimportMediaFileExtendedmedia_file=MediaFileExtended('test/files/full.mp3')forkeyinMediaFileExtended.readable_fields():value=getattr(media_file,key)ifkey!='art'andvalue:print('{}:{}'.format(key,value))Fields documentationField nameCategoryDescriptionExamplesacoustid_fingerprintmusic_brainzAcoustic ID fingerprintacoustid_idmusic_brainzAcoustic ID86e217b7-d3ad-4493-a9f2-cf71256ace07albumcommonalbumHelp!albumartistcommonThe artist for the entire album, which may be different from the artists for the individual tracksThe Beatlesalbumartist_creditcommonalbumartist_creditalbumartist_sortcommonalbumartist_sortBeatles, ThealbumartistscommonalbumartistsalbumdisambigcommonThe disambiguation album field helps to distinguish between identically named albums. The album “Weezer” for example has the disambiguation comments “Red Album” and “Green Album”.albumstatuscommonThe status describes how “official” a release is.official,promotional,bootleg,pseudo-releasealbumtypecommonThe MusicBrainz album type; the MusicBrainz wiki has a list of type namesalbum/soundtrackarrangercommonA musician who creates arrangements.artcommonLegacy album art field.b'\xff\xd8\xff\xe0\x00'artistcommonartistThe Beatlesartist_creditcommonThe track-specific artist credit name, which may be a variation of the artist’s “canonical” nameartist_sortcommonThe “sort name” of the track artist.Beatles, The,White, Jackartistscommonartists['a-ha'],['Anouk', 'Remon Stotijn']asincommonAmazon Standard Identification NumberB000002UALbarcodecommonThere are many different types of barcode, but the ones usually found on music releases are two: 1. Universal Product Code (UPC), which is the original barcode used in North America. 2. European Article Number (EAN)5028421931838,036000291452bitdepthaudioonly available for some formats16bitrateaudioin kilobits per second, with units: e.g., “192kbps”436523,256000bitrate_modecommonbitrate_modeCBRbpmcommonBeats per MinutecatalognumcommonThis is a number assigned to the release by the label which can often be found on the spine or near the barcode. There may be more than one, especially when multiple labels are involved. This is not the ASIN — there is a relationship for that — nor the label code.CDP 7 46439 2channelsaudiochannels1,2commentscommoncommentscompcommonCompilation flagTrue,FalsecomposercommonThe name of the composer.Ludwig van Beethovencomposer_sortcommonThe composer name for sorting.Beethoven, Ludwig vancopyrightcommoncopyrightcountrycommonThe country the release was issued in.NLdatedateThe release data of the specific release.1996-01-01daydateThe release day of the specific release.disccommondisc1disctitlecommondisctitledisctotalcommondisctotal1encodercommonthe name of the person or organisation that encoded the audio file. This field may contain a copyright message, if the audio file also is copyrighted by the encoder.iTunes v7.6.2encoder_infocommonencoder_infoLAME 3.92.0+encoder_settingscommonencoder_settings-b255+formataudioe.g., “MP3” or “FLAC”MP3,FLACgenrecommongenreRockgenrescommongenres['Rock']groupingcommonA content group, which is a collection of media items such as a CD boxed set.imagescommonimages['<mediafile.Imageobject at0x7f51fce26b20>']initial_keycommonThe Initial key frame contains the musical key in which the sound starts. It is represented as a string with a maximum length of three characters. The ground keys are represented with “A”,”B”,”C”,”D”,”E”, “F” and “G” and halfkeys represented with “b” and “#”. Minor is represented as “m”.DbmisrccommonThe International Standard Recording Code, abbreviated to ISRC, is a system of codes that identify audio and music video recordings.CAC118989003,ITO101117740labelcommonThe label which issued the release. There may be more than one.Brilliant Classics,wealanguagecommonThe language a release’s track list is written in. The possible values are taken from the ISO 639-3 standard.zxx,englengthaudioThe length of a recording in seconds.674.4666666666667lyricistcommonThe writer of the text or lyrics in the recording.lyricscommonThe lyrics of the song or a text transcription of other vocal activities.mb_albumartistidmusic_brainzMusicBrainz album artist ID.1f9df192-a621-4f54-8850-2c5373b7eac9,b972f589-fb0e-474e-b64a-803b0364fa75mb_albumartistidsmusic_brainzMusicBrainz album artist IDs as a list.['b972f589-fb0e-474e-b64a-803b0364fa75','dea28aa9-1086-4ffa-8739-0ccc759de1ce','d2ced2f1-6b58-47cf-ae87-5943e2ab6d99']mb_albumidmusic_brainzMusicBrainz album ID.fd6adc77-1489-4a13-9aa0-32951061d92bmb_artistidmusic_brainzMusicBrainz artist ID.1f9df192-a621-4f54-8850-2c5373b7eac9mb_artistidsmusic_brainzMusicBrainz artist IDs as a list.['1f9df192-a621-4f54-8850-2c5373b7eac9']mb_releasegroupidmusic_brainzMusicBrainz releasegroup ID.f714fd70-aaca-4863-9d0d-2768a53acaebmb_releasetrackidmusic_brainzMusicBrainz release track ID.38c8c114-5e3b-484f-8af0-79c47ef9c169mb_trackidmusic_brainzMusicBrainz track ID.c390b132-4a44-4e16-bec3-bffbbcaa19aamb_workhierarchy_idsmusic_brainzAll IDs in the work hierarchy. This field corresponds to the fieldwork_hierarchy. The top level work ID appears first. A slash (/) is used as separator.e208c5f5-5d37-3dfc-ac0b-999f207c9e46/5adc213f-700a-4435-9e95-831ed720f348/eafec51f-47c5-3c66-8c36-a524246c85f8mb_workidmusic_brainzMusicBrainz work ID.508ec4b1-9549-38cd-a61e-1f0d120a6118mediacommonA prototypical medium is one of the physical, separate things you would get when you buy something in a record store.CDmonthdateThe release month of the specific release.11original_datedateThe release date of the original version of the album.1991-11-04original_daydateThe release day of the original version of the album.4original_monthdateThe release month of the original version of the album.11original_yeardateThe release year of the original version of the album.1991r128_album_gainr128An optional gain for album normalization. EBU R 128 is a recommendation for loudness normalisation and maximum level of audio signals.r128_track_gainr128An optional gain for track normalization. EBU R 128 is a recommendation for loudness normalisation and maximum level of audio signals.releasegroup_typesmusic_brainzThis field collects all items in the MusicBrainz’ API  related to type:type,primary-type and `secondary-type-list. Main usage of this field is to determine in a secure manner if the release is a soundtrack.rg_album_gainrgReplayGain Album Gain, seehttps://en.wikipedia.org/wiki/ReplayGain.rg_album_peakrgReplayGain Album Peak, seehttps://en.wikipedia.org/wiki/ReplayGain.rg_track_gainrgReplayGain Track Gain, seehttps://en.wikipedia.org/wiki/ReplayGain.0.0rg_track_peakrgReplayGain Track Peak, seehttps://en.wikipedia.org/wiki/ReplayGain.0.000244samplerateaudioThe sample rate as an integer number.44100scriptcommonThe script used to write the release’s track list. The possible values are taken from the ISO 15924 standard.LatntitlecommonThe title of a audio file.32 Variations for Piano in C minor on an Original Theme, WoO 80trackcommonThe track number.1tracktotalcommonThe total track number.12urlcommonUniform Resource Locator.workcommonThe Musicbrainzs’ work entity.32 Variations for Piano in C minor on an Original Theme, WoO 80work_hierarchymusic_brainzThe hierarchy of works: The top level work appears first. As separator is this string used: –>.Die Zauberflöte, K. 620-->Die Zauberflöte, K. 620: Akt I-->Die Zauberflöte, K. 620: Act I, Scene II. No. 2 Aria "Was hör ...yeardateThe release year of the specific release.2001phrydy-debugusage: phrydy-debug [-h] [-c] [-v] audio_file

Debugging tool of the Python package “phrydy”, an easy wrapper around the “mutagen” library.

    acoustid_fingerprint:    Acoustic ID fingerprint

    acoustid_id:             Acoustic ID
                             Examples: ['86e217b7-d3ad-4493-a9f2-cf71256ace07']

    album:                   album
                             Examples: ['Help!']

    albumartist:             The artist for the entire album, which may be
                             different from the artists for the individual
                             tracks
                             Examples: ['The Beatles']

    albumartist_credit:      albumartist_credit

    albumartist_sort:        albumartist_sort
                             Examples: ['Beatles, The']

    albumartists:            albumartists

    albumdisambig:           The disambiguation album field helps to
                             distinguish between identically named albums. The
                             album “Weezer” for example has the disambiguation
                             comments “Red Album” and “Green Album”.

    albumstatus:             The status describes how "official" a release is.
                             Examples: ['official', 'promotional', 'bootleg', 'pseudo-release']

    albumtype:               The MusicBrainz album type; the MusicBrainz wiki
                             has a list of type names
                             Examples: ['album/soundtrack']

    arranger:                A musician who creates arrangements.

    art:                     Legacy album art field.
                             Examples: [b'\xff\xd8\xff\xe0\x00']

    artist:                  artist
                             Examples: ['The Beatles']

    artist_credit:           The track-specific artist credit name, which may
                             be a variation of the artist’s “canonical” name

    artist_sort:             The “sort name” of the track artist.
                             Examples: ['Beatles, The', 'White, Jack']

    artists:                 artists
                             Examples: [['a-ha'], ['Anouk', 'Remon Stotijn']]

    asin:                    Amazon Standard Identification Number
                             Examples: ['B000002UAL']

    barcode:                 There are many different types of barcode, but
                             the ones usually found on music releases are two:
                             1. Universal Product Code (UPC), which is the
                             original barcode used in North America. 2.
                             European Article Number (EAN)
                             Examples: ['5028421931838', '036000291452']

    bitdepth:                only available for some formats
                             Examples: [16]

    bitrate:                 in kilobits per second, with units: e.g.,
                             “192kbps”
                             Examples: [436523, 256000]

    bitrate_mode:            bitrate_mode
                             Examples: ['CBR']

    bpm:                     Beats per Minute

    catalognum:              This is a number assigned to the release by the
                             label which can often be found on the spine or
                             near the barcode. There may be more than one,
                             especially when multiple labels are involved.
                             This is not the ASIN — there is a relationship
                             for that — nor the label code.
                             Examples: ['CDP 7 46439 2']

    channels:                channels
                             Examples: [1, 2]

    comments:                comments

    comp:                    Compilation flag
                             Examples: [True, False]

    composer:                The name of the composer.
                             Examples: ['Ludwig van Beethoven']

    composer_sort:           The composer name for sorting.
                             Examples: ['Beethoven, Ludwig van']

    copyright:               copyright

    country:                 The country the release was issued in.
                             Examples: ['NL']

    date:                    The release data of the specific release.
                             Examples: ['1996-01-01']

    day:                     The release day of the specific release.

    disc:                    disc
                             Examples: [1]

    disctitle:               disctitle

    disctotal:               disctotal
                             Examples: [1]

    encoder:                 the name of the person or organisation that
                             encoded the audio file. This field may contain a
                             copyright message, if the audio file also is
                             copyrighted by the encoder.
                             Examples: ['iTunes v7.6.2']

    encoder_info:            encoder_info
                             Examples: ['LAME 3.92.0+']

    encoder_settings:        encoder_settings
                             Examples: ['-b 255+']

    format:                  e.g., “MP3” or “FLAC”
                             Examples: ['MP3', 'FLAC']

    genre:                   genre
                             Examples: ['Rock']

    genres:                  genres
                             Examples: [['Rock']]

    grouping:                A content group, which is a collection of media
                             items such as a CD boxed set.

    images:                  images
                             Examples: [['<mediafile.Image object at 0x7f51fce26b20>']]

    initial_key:             The Initial key frame contains the musical key in
                             which the sound starts. It is represented as a
                             string with a maximum length of three characters.
                             The ground keys are represented with
                             "A","B","C","D","E", "F" and "G" and halfkeys
                             represented with "b" and "#". Minor is
                             represented as "m".
                             Examples: ['Dbm']

    isrc:                    The International Standard Recording Code,
                             abbreviated to ISRC, is a system of codes that
                             identify audio and music video recordings.
                             Examples: ['CAC118989003', 'ITO101117740']

    label:                   The label which issued the release. There may be
                             more than one.
                             Examples: ['Brilliant Classics', 'wea']

    language:                The language a release’s track list is written
                             in. The possible values are taken from the ISO
                             639-3 standard.
                             Examples: ['zxx', 'eng']

    length:                  The length of a recording in seconds.
                             Examples: [674.4666666666667]

    lyricist:                The writer of the text or lyrics in the
                             recording.

    lyrics:                  The lyrics of the song or a text transcription of
                             other vocal activities.

    mb_albumartistid:        MusicBrainz album artist ID.
                             Examples: ['1f9df192-a621-4f54-8850-2c5373b7eac9', 'b972f589-fb0e-474e-b64a-803b0364fa75']

    mb_albumartistids:       MusicBrainz album artist IDs as a list.
                             Examples: [['b972f589-fb0e-474e-b64a-803b0364fa75', 'dea28aa9-1086-4ffa-8739-0ccc759de1ce', 'd2ced2f1-6b58-47cf-ae87-5943e2ab6d99']]

    mb_albumid:              MusicBrainz album ID.
                             Examples: ['fd6adc77-1489-4a13-9aa0-32951061d92b']

    mb_artistid:             MusicBrainz artist ID.
                             Examples: ['1f9df192-a621-4f54-8850-2c5373b7eac9']

    mb_artistids:            MusicBrainz artist IDs as a list.
                             Examples: [['1f9df192-a621-4f54-8850-2c5373b7eac9']]

    mb_releasegroupid:       MusicBrainz releasegroup ID.
                             Examples: ['f714fd70-aaca-4863-9d0d-2768a53acaeb']

    mb_releasetrackid:       MusicBrainz release track ID.
                             Examples: ['38c8c114-5e3b-484f-8af0-79c47ef9c169']

    mb_trackid:              MusicBrainz track ID.
                             Examples: ['c390b132-4a44-4e16-bec3-bffbbcaa19aa']

    mb_workhierarchy_ids:    All IDs in the work hierarchy. This field
                             corresponds to the field `work_hierarchy`. The
                             top level work ID appears first. A slash (/) is
                             used as separator.
                             Examples: ['e208c5f5-5d37-3dfc-ac0b-999f207c9e46 / 5adc213f-700a-4435-9e95-831ed720f348 / eafec51f-47c5-3c66-8c36-a524246c85f8']

    mb_workid:               MusicBrainz work ID.
                             Examples: ['508ec4b1-9549-38cd-a61e-1f0d120a6118']

    media:                   A prototypical medium is one of the physical,
                             separate things you would get when you buy
                             something in a record store.
                             Examples: ['CD']

    month:                   The release month of the specific release.
                             Examples: [11]

    original_date:           The release date of the original version of the
                             album.
                             Examples: ['1991-11-04']

    original_day:            The release day of the original version of the
                             album.
                             Examples: [4]

    original_month:          The release month of the original version of the
                             album.
                             Examples: [11]

    original_year:           The release year of the original version of the
                             album.
                             Examples: [1991]

    r128_album_gain:         An optional gain for album normalization. EBU R
                             128 is a recommendation for loudness
                             normalisation and maximum level of audio signals.

    r128_track_gain:         An optional gain for track normalization. EBU R
                             128 is a recommendation for loudness
                             normalisation and maximum level of audio signals.

    releasegroup_types:      This field collects all items in the MusicBrainz’
                             API  related to type: `type`, `primary-type and
                             `secondary-type-list`. Main usage of this field
                             is to determine in a secure manner if the release
                             is a soundtrack.

    rg_album_gain:           ReplayGain Album Gain, see
                             https://en.wikipedia.org/wiki/ReplayGain.

    rg_album_peak:           ReplayGain Album Peak, see
                             https://en.wikipedia.org/wiki/ReplayGain.

    rg_track_gain:           ReplayGain Track Gain, see
                             https://en.wikipedia.org/wiki/ReplayGain.
                             Examples: [0.0]

    rg_track_peak:           ReplayGain Track Peak, see
                             https://en.wikipedia.org/wiki/ReplayGain.
                             Examples: [0.000244]

    samplerate:              The sample rate as an integer number.
                             Examples: [44100]

    script:                  The script used to write the release’s track
                             list. The possible values are taken from the ISO
                             15924 standard.
                             Examples: ['Latn']

    title:                   The title of a audio file.
                             Examples: ['32 Variations for Piano in C minor on an Original Theme, WoO 80']

    track:                   The track number.
                             Examples: [1]

    tracktotal:              The total track number.
                             Examples: [12]

    url:                     Uniform Resource Locator.

    work:                    The Musicbrainzs’ work entity.
                             Examples: ['32 Variations for Piano in C minor on an Original Theme, WoO 80']

    work_hierarchy:          The hierarchy of works: The top level work
                             appears first. As separator is this string used:
                             -->.
                             Examples: ['Die Zauberflöte, K. 620 --> Die Zauberflöte, K. 620: Akt I --> Die Zauberflöte, K. 620: Act I, Scene II. No. 2 Aria "Was hör ...']

    year:                    The release year of the specific release.
                             Examples: [2001]

positional arguments:
  audio_file     A audio file

optional arguments:
  -h, --help     show this help message and exit
  -c, --color    Colorize the output
  -v, --version  show program's version number and exitDevelopmentTestpyenv install 3.9.12 3.10.4
pyenv local 3.9.12 3.10.4
pip3 install tox tox-pyenv
toxPublish a new versiongit tag 1.1.1
git push --tags
python setup.py sdist uploadPackage documentationThe package documentation is hosted onreadthedocs.Generate the package documentation:python setup.py build_sphinx