From 50bab4e951423a611fe33f6d94498d948cab4da6 Mon Sep 17 00:00:00 2001 From: Jesse Bannon Date: Tue, 23 Jul 2024 18:48:10 -0700 Subject: [PATCH] POPM (popularity meter) tag support --- mediafile.py | 7 +++++++ test/test_mediafile.py | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/mediafile.py b/mediafile.py index a5ec5e5..eb74e33 100644 --- a/mediafile.py +++ b/mediafile.py @@ -1881,6 +1881,13 @@ def as_dict(self): ASFStorageStyle('TotalDiscs'), out_type=int, ) + popm = MediaField( + MP3StorageStyle('POPM'), + MP4StorageStyle('POPM'), + StorageStyle('POPM'), + ASFStorageStyle('Popm'), + out_type=int + ) url = MediaField( MP3DescStorageStyle(key='WXXX', attr='url', multispec=False), diff --git a/test/test_mediafile.py b/test/test_mediafile.py index 8105983..60baae7 100644 --- a/test/test_mediafile.py +++ b/test/test_mediafile.py @@ -1114,7 +1114,8 @@ def test_known_fields(self): ('encoder', 'images', 'genres', 'albumtype', 'artists', 'albumartists', 'url', 'mb_artistids', 'mb_albumartistids', 'albumtypes', 'catalognums', 'languages', 'artists_credit', - 'artists_sort', 'albumartists_credit', 'albumartists_sort') + 'artists_sort', 'albumartists_credit', 'albumartists_sort', + 'popm') ) assertCountEqual(self, MediaFile.fields(), fields)