Commit Graph

30 Commits

Author SHA1 Message Date
Alok Saboo
a0f092ff14 fix test_parse_artwork_url placement into TestStaticHelpers class 2026-06-24 14:10:11 -04:00
Alok Saboo
01b12dca3b rename CoverArt types to Artwork to match Tidal API 2026-06-24 14:10:11 -04:00
Alok Saboo
26d90bbcfa make cover_art_by_id required and remove broken fallback URL 2026-06-24 14:10:10 -04:00
Alok Saboo
d26cfdedbc fix cover art types and parsing to match API response 2026-06-24 14:03:58 -04:00
Alok Saboo
659ee7df0b add cover art support 2026-06-24 14:03:56 -04:00
Šarūnas Nejus
8fe9c2e576 Set albumtypes instead of albumtype 2026-06-24 16:44:10 +01:00
Šarūnas Nejus
368d2c0a6d Normalize albumtype 2026-06-24 16:44:10 +01:00
Šarūnas Nejus
fca1aafdd0 Remove misplaced implementation test
Two issues with this one:
1. It tests implementation.
2. It was part of `TidalPluginTest` base class, so it ran multiple times
   in every class that used this mixin:

   $ pytest -vv test/plugins/test_tidal.py | grep flex_field_types
   test/plugins/test_tidal.py::TidalPluginTest::test_flex_field_types_are_scoped_correctly PASSED
   test/plugins/test_tidal.py::TestAlbumParsing::test_flex_field_types_are_scoped_correctly PASSED
   test/plugins/test_tidal.py::TestTrackParsing::test_flex_field_types_are_scoped_correctly PASSED
   test/plugins/test_tidal.py::TestTrackForID::test_flex_field_types_are_scoped_correctly PASSED
   test/plugins/test_tidal.py::TestTracksForIDs::test_flex_field_types_are_scoped_correctly PASSED
   test/plugins/test_tidal.py::TestAlbumForID::test_flex_field_types_are_scoped_correctly PASSED
   test/plugins/test_tidal.py::TestAlbumsForIDs::test_flex_field_types_are_scoped_correctly PASSED
   test/plugins/test_tidal.py::TestCandidates::test_flex_field_types_are_scoped_correctly PASSED
   test/plugins/test_tidal.py::TestItemCandidates::test_flex_field_types_are_scoped_correctly PASSED
   test/plugins/test_tidal.py::TestTidalsync::test_flex_field_types_are_scoped_correctly PASSED
2026-06-24 16:44:10 +01:00
Šarūnas Nejus
499e8dc8cb Use a single data-driven test for parsing 2026-06-24 16:44:10 +01:00
Alok Saboo
904839106c address reviewer comments 2026-06-17 11:47:01 -04:00
Alok Saboo
d855dbf55b lint issues 2026-06-17 10:31:24 -04:00
Alok Saboo
dcd54146d8 address reviewer comments 2026-06-17 09:45:02 -04:00
Alok Saboo
ab2a9ced63 Apply ruff formatting 2026-06-15 17:24:01 -04:00
Alok Saboo
5904dc280a Fix id_field, update tests, fix flake8 2026-06-15 17:08:34 -04:00
Alok Saboo
4cd996cc0e apply ruff formatting 2026-06-15 13:18:15 -04:00
Alok Saboo
4a0b2beeef address reviewer comments: simplify _parse_popularity, fix flake8 E501 2026-06-15 13:00:59 -04:00
Alok Saboo
a6bf76b232 address reviewer comments: type _parse_popularity with attributes, add album popularity to sync 2026-06-15 11:38:12 -04:00
Alok Saboo
2f434b2b93 address reviewer comments 2026-06-15 09:45:35 -04:00
Alok Saboo
bed1f024b0 Fix tests and mypy error
- Use self.add_item() instead of self.lib.add_item() in tests
- Fix mypy: add isinstance(val, int) check in _popularity()
- Apply ruff formatting
2026-06-14 16:36:19 -04:00
Alok Saboo
71d09893ef fix tests 2026-06-14 15:59:25 -04:00
Alok Saboo
98681406af tidal: add flexattrs and tidalsync command
- Add item_types ClassVar with tidal_track_id, tidal_album_id,
  tidal_artist_id, tidal_track_popularity, tidal_alb_popularity,
  tidal_updated fields
- Populate flexattrs during album/track import via AlbumInfo/TrackInfo
  kwargs
- Add beet tidalsync command to refresh popularity data post-import
- Add tidal fields to REIMPORT_FRESH_FIELDS_ITEM for reimport support
- Add tests for flexattr population and tidalsync behavior
- Update tidal plugin docs with attribute reference and tidalsync usage
2026-06-14 13:44:16 -04:00
Šarūnas Nejus
648f24cbc2 Enable and fix flake8-builtins 2026-06-09 00:14:06 +01:00
Sebastian Mohr
adfb73b66d Run ruff format 2026-05-20 16:53:06 +02:00
Sebastian Mohr
eaf1f00424 warning instead of raising errors. 2026-04-20 20:55:47 +02:00
Sebastian Mohr
2c24b93ca7 Another subset of review comments from @snejus:
- Renamed _extract_* methods to _parse_*
- Renamed release to date_parts
- Using .get instead of .request("GET"...)
2026-04-20 20:55:47 +02:00
Sebastian Mohr
b9949ccae5 A subset of review comments from @snejus:
- Renamed id to _id
- Aligned line breaks for some comment with actual ruff line length
- Removed comment dividers
- Removed a number of unnecessary or duplicate comments
2026-04-20 20:55:47 +02:00
Sebastian Mohr
90e02be5c8 Added tests for candidates and item_candidates. 2026-04-20 20:55:47 +02:00
Sebastian Mohr
1569810427 Added candidate method implementations methods: Required a slight
amount of refactoring but im more happy with the abstraction now.
2026-04-20 20:55:47 +02:00
Sebastian Mohr
a85de2d8fa Implemented batch lookup methods for more efficient retrieval. 2026-04-20 20:55:47 +02:00
Sebastian Mohr
4d6fc9982c Added a number of unit tests for the parsing. 2026-04-20 20:55:47 +02:00