lexicon-python 0.5.0__tar.gz → 0.5.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/PKG-INFO +1 -1
  2. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/pyproject.toml +1 -1
  3. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/src/lexicon/resources/tracks.py +5 -1
  4. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/src/lexicon_python.egg-info/PKG-INFO +1 -1
  5. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/tests/test_tracks.py +14 -0
  6. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/LICENSE +0 -0
  7. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/README.md +0 -0
  8. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/setup.cfg +0 -0
  9. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/src/lexicon/__init__.py +0 -0
  10. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/src/lexicon/client.py +0 -0
  11. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/src/lexicon/colors.py +0 -0
  12. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/src/lexicon/resources/__init__.py +0 -0
  13. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/src/lexicon/resources/_common_types.py +0 -0
  14. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/src/lexicon/resources/base.py +0 -0
  15. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/src/lexicon/resources/control_types.py +0 -0
  16. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/src/lexicon/resources/player.py +0 -0
  17. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/src/lexicon/resources/player_types.py +0 -0
  18. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/src/lexicon/resources/playlist_tracks.py +0 -0
  19. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/src/lexicon/resources/playlist_tracks_types.py +0 -0
  20. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/src/lexicon/resources/playlists.py +0 -0
  21. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/src/lexicon/resources/playlists_types.py +0 -0
  22. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/src/lexicon/resources/tag_categories.py +0 -0
  23. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/src/lexicon/resources/tag_categories_types.py +0 -0
  24. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/src/lexicon/resources/tags.py +0 -0
  25. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/src/lexicon/resources/tags_types.py +0 -0
  26. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/src/lexicon/resources/tracks_types.py +0 -0
  27. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/src/lexicon/tools/__init__.py +0 -0
  28. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/src/lexicon/tools/playlists.py +0 -0
  29. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/src/lexicon/tools/tempo.py +0 -0
  30. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/src/lexicon/tools/tracks.py +0 -0
  31. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/src/lexicon/utils.py +0 -0
  32. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/src/lexicon_python.egg-info/SOURCES.txt +0 -0
  33. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/src/lexicon_python.egg-info/dependency_links.txt +0 -0
  34. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/src/lexicon_python.egg-info/requires.txt +0 -0
  35. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/src/lexicon_python.egg-info/top_level.txt +0 -0
  36. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/tests/test_base.py +0 -0
  37. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/tests/test_client.py +0 -0
  38. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/tests/test_colors.py +0 -0
  39. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/tests/test_common_types.py +0 -0
  40. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/tests/test_integration_lifecycle.py +0 -0
  41. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/tests/test_player.py +0 -0
  42. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/tests/test_playlist_tracks.py +0 -0
  43. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/tests/test_playlists.py +0 -0
  44. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/tests/test_playlists_types.py +0 -0
  45. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/tests/test_tag_categories.py +0 -0
  46. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/tests/test_tags.py +0 -0
  47. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/tests/test_tools_playlists.py +0 -0
  48. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/tests/test_tools_tempo.py +0 -0
  49. {lexicon_python-0.5.0 → lexicon_python-0.5.1}/tests/test_tools_tracks.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lexicon-python
3
- Version: 0.5.0
3
+ Version: 0.5.1
4
4
  Summary: Python client for the Lexicon DJ API
5
5
  Author-email: Garrison Burger <burgerga123@gmail.com>
6
6
  License-Expression: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "lexicon-python"
7
- version = "0.5.0"
7
+ version = "0.5.1"
8
8
  description = "Python client for the Lexicon DJ API"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -7,6 +7,7 @@ from typing import Optional, Sequence, Literal, Mapping, cast
7
7
 
8
8
  from .base import Resource
9
9
  from .tracks_types import (
10
+ TRACK_FIELDS,
10
11
  TRACK_SOURCES,
11
12
  FilterField,
12
13
  SortInput,
@@ -431,8 +432,11 @@ class Tracks(Resource):
431
432
  self._logger.warning("Skipping search: no valid filters remain.")
432
433
  return None
433
434
 
435
+ # Return the filtered fields too, except filter-only ones such as fileType,
436
+ # which Lexicon rejects in `fields`.
434
437
  filter_fields = cast(
435
- list[TrackField], [field for field in filter_payload.keys()]
438
+ list[TrackField],
439
+ [field for field in filter_payload if field in TRACK_FIELDS],
436
440
  )
437
441
  payload["filter"] = filter_payload
438
442
  id_filter = filter_payload.get("id")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lexicon-python
3
- Version: 0.5.0
3
+ Version: 0.5.1
4
4
  Summary: Python client for the Lexicon DJ API
5
5
  Author-email: Garrison Burger <burgerga123@gmail.com>
6
6
  License-Expression: MIT
@@ -2047,6 +2047,20 @@ class Lexicon112TrackTests(unittest.TestCase):
2047
2047
  self.assertEqual(payload, {"fileType": "flac"})
2048
2048
  self.assertIsNone(errors)
2049
2049
 
2050
+ def test_search_file_type_filter_is_not_returned(self):
2051
+ # fileType is filter-only: Lexicon rejects it in `fields`, so search() must
2052
+ # not add it to the returned fields the way it adds other filter fields.
2053
+ with patch.object(
2054
+ self.tracks, "_request", return_value=self._page([3], 1)
2055
+ ) as mocked:
2056
+ result = self.tracks.search(
2057
+ {"fileType": "flac", "artist": "a"},
2058
+ fields=["id"],
2059
+ validation="strict",
2060
+ )
2061
+ self.assertEqual(result, [{"id": 3}])
2062
+ self.assertEqual(mocked.call_args.kwargs["json"]["fields"], ["id", "artist"])
2063
+
2050
2064
  # --- cue point and tempo marker payloads ---
2051
2065
 
2052
2066
  def test_cuepoint_data_is_kept(self):
File without changes
File without changes
File without changes