gukebox 1.0.0.dev1__tar.gz → 1.0.0.dev2__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 (100) hide show
  1. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/PKG-INFO +6 -6
  2. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/README.md +5 -5
  3. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/settings/entities.py +7 -1
  4. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/settings/file_settings_repository.py +7 -4
  5. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/pyproject.toml +1 -1
  6. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/LICENSE +0 -0
  7. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/discstore/__init__.py +0 -0
  8. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/discstore/adapters/__init__.py +0 -0
  9. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/discstore/adapters/inbound/__init__.py +0 -0
  10. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/discstore/adapters/inbound/api_controller.py +0 -0
  11. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/discstore/adapters/inbound/cli_controller.py +0 -0
  12. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/discstore/adapters/inbound/cli_display.py +0 -0
  13. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/discstore/adapters/inbound/config.py +0 -0
  14. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/discstore/adapters/inbound/interactive_cli_controller.py +0 -0
  15. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/discstore/adapters/inbound/ui_controller.py +0 -0
  16. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/discstore/adapters/outbound/__init__.py +0 -0
  17. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/discstore/adapters/outbound/json_library_adapter.py +0 -0
  18. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/discstore/adapters/outbound/text_current_tag_adapter.py +0 -0
  19. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/discstore/app.py +0 -0
  20. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/discstore/command_handlers.py +0 -0
  21. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/discstore/commands.py +0 -0
  22. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/discstore/di_container.py +0 -0
  23. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/discstore/domain/__init__.py +0 -0
  24. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/discstore/domain/entities/__init__.py +0 -0
  25. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/discstore/domain/entities/current_tag_status.py +0 -0
  26. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/discstore/domain/repositories/__init__.py +0 -0
  27. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/discstore/domain/use_cases/__init__.py +0 -0
  28. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/discstore/domain/use_cases/add_disc.py +0 -0
  29. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/discstore/domain/use_cases/edit_disc.py +0 -0
  30. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/discstore/domain/use_cases/get_current_tag_status.py +0 -0
  31. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/discstore/domain/use_cases/get_disc.py +0 -0
  32. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/discstore/domain/use_cases/list_discs.py +0 -0
  33. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/discstore/domain/use_cases/remove_disc.py +0 -0
  34. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/discstore/domain/use_cases/resolve_tag_id.py +0 -0
  35. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/discstore/domain/use_cases/search_discs.py +0 -0
  36. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/.DS_Store +0 -0
  37. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/__init__.py +0 -0
  38. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/adapters/.DS_Store +0 -0
  39. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/adapters/__init__.py +0 -0
  40. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/adapters/inbound/__init__.py +0 -0
  41. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/adapters/inbound/cli_controller.py +0 -0
  42. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/adapters/inbound/config.py +0 -0
  43. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/adapters/outbound/.DS_Store +0 -0
  44. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/adapters/outbound/__init__.py +0 -0
  45. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/adapters/outbound/json_library_adapter.py +0 -0
  46. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/adapters/outbound/players/__init__.py +0 -0
  47. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/adapters/outbound/players/dryrun_player_adapter.py +0 -0
  48. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/adapters/outbound/players/sonos_player_adapter.py +0 -0
  49. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/adapters/outbound/readers/__init__.py +0 -0
  50. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/adapters/outbound/readers/dryrun_reader_adapter.py +0 -0
  51. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/adapters/outbound/readers/nfc_reader_adapter.py +0 -0
  52. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/adapters/outbound/text_current_tag_adapter.py +0 -0
  53. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/admin/__init__.py +0 -0
  54. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/admin/app.py +0 -0
  55. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/admin/cli_presentation.py +0 -0
  56. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/admin/command_handlers.py +0 -0
  57. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/admin/commands.py +0 -0
  58. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/admin/di_container.py +0 -0
  59. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/app.py +0 -0
  60. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/di_container.py +0 -0
  61. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/domain/.DS_Store +0 -0
  62. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/domain/__init__.py +0 -0
  63. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/domain/entities/__init__.py +0 -0
  64. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/domain/entities/current_tag_action.py +0 -0
  65. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/domain/entities/disc.py +0 -0
  66. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/domain/entities/library.py +0 -0
  67. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/domain/entities/playback_action.py +0 -0
  68. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/domain/entities/playback_session.py +0 -0
  69. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/domain/entities/tag_event.py +0 -0
  70. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/domain/ports/__init__.py +0 -0
  71. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/domain/ports/player_port.py +0 -0
  72. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/domain/ports/reader_port.py +0 -0
  73. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/domain/repositories/__init__.py +0 -0
  74. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/domain/repositories/current_tag_repository.py +0 -0
  75. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/domain/repositories/library_repository.py +0 -0
  76. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/domain/use_cases/__init__.py +0 -0
  77. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/domain/use_cases/determine_action.py +0 -0
  78. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/domain/use_cases/determine_current_tag_action.py +0 -0
  79. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/domain/use_cases/handle_tag_event.py +0 -0
  80. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/settings/__init__.py +0 -0
  81. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/settings/definitions.py +0 -0
  82. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/settings/dict_utils.py +0 -0
  83. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/settings/errors.py +0 -0
  84. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/settings/migration.py +0 -0
  85. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/settings/repositories.py +0 -0
  86. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/settings/resolve.py +0 -0
  87. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/settings/runtime_validation.py +0 -0
  88. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/settings/service_protocols.py +0 -0
  89. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/settings/sonos_runtime.py +0 -0
  90. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/settings/timing_validation.py +0 -0
  91. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/settings/types.py +0 -0
  92. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/settings/validation_rules.py +0 -0
  93. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/shared/__init__.py +0 -0
  94. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/shared/config_utils.py +0 -0
  95. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/shared/dependency_messages.py +0 -0
  96. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/shared/logger.py +0 -0
  97. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/jukebox/shared/timing.py +0 -0
  98. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/pn532/__init__.py +0 -0
  99. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/pn532/pn532.py +0 -0
  100. {gukebox-1.0.0.dev1 → gukebox-1.0.0.dev2}/pn532/spi.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: gukebox
3
- Version: 1.0.0.dev1
3
+ Version: 1.0.0.dev2
4
4
  Summary: A Jukebox to play music on speakers using 'CD' with NFC tag
5
5
  Keywords: jukebox,discstore,music,nfc
6
6
  Author: Gudsfile
@@ -160,7 +160,7 @@ uv sync
160
160
 
161
161
  ## First steps
162
162
 
163
- Initialize the library file with `discstore` or manually create it at `~/.jukebox/library.json`.
163
+ Initialize the library file with `discstore` or manually create it at `~/.config/jukebox/library.json`.
164
164
 
165
165
  ### Manage the library with the discstore
166
166
 
@@ -207,7 +207,7 @@ uv run --extra ui jukebox-admin ui
207
207
 
208
208
  ### Manage the library manually
209
209
 
210
- Complete your `~/.jukebox/library.json` file with each tag id and the expected media URI.
210
+ Complete your `~/.config/jukebox/library.json` file with each tag id and the expected media URI.
211
211
  Take a look at `library.example.json` and the [The library file](#the-library-file) section for more information.
212
212
 
213
213
  ## Usage
@@ -225,7 +225,7 @@ Optional Parameters
225
225
  | Parameter | Description |
226
226
  | --- | --- |
227
227
  | `--help` | Show help message. |
228
- | `--library` | Path to the library file, default: `~/.jukebox/library.json`. |
228
+ | `--library` | Path to the library file, default: `~/.config/jukebox/library.json`. |
229
229
  | `--pause-delay SECONDS` | Grace period before pausing when the NFC tag is removed. Fractional values such as `0.5` or `0.2` are supported, with a minimum of `0.2` seconds to avoid pausing on brief missed reads. Default: 0.25 seconds. |
230
230
  | `--pause-duration SECONDS` | Maximum duration of a pause before resetting the queue. Default: 900 seconds (15 minutes). |
231
231
  | `--verbose` | Enable verbose logging. |
@@ -268,7 +268,7 @@ The `library.json` file is a JSON file that contains the artists, albums and tag
268
268
  It is used by the `jukebox` command to find the corresponding metadata for each tag.
269
269
  And the `discstore` command help you to managed this file with a CLI, an interactive CLI, an API or an UI (see `discstore --help`).
270
270
 
271
- By default, this file should be placed at `~/.jukebox/library.json`. But you can use another path by creating a `JUKEBOX_LIBRARY_PATH` environment variable or with the `--library` argument.
271
+ By default, this file should be placed at `~/.config/jukebox/library.json`. But you can use another path by creating a `JUKEBOX_LIBRARY_PATH` environment variable or with the `--library` argument.
272
272
 
273
273
  ```json
274
274
  {
@@ -307,7 +307,7 @@ It is also possible to use the `shuffle` key to play the album in shuffle mode:
307
307
  }
308
308
  ```
309
309
 
310
- To summarize, for example, if you have the following `~/.jukebox/library.json` file:
310
+ To summarize, for example, if you have the following `~/.config/jukebox/library.json` file:
311
311
 
312
312
  ```json
313
313
  {
@@ -103,7 +103,7 @@ uv sync
103
103
 
104
104
  ## First steps
105
105
 
106
- Initialize the library file with `discstore` or manually create it at `~/.jukebox/library.json`.
106
+ Initialize the library file with `discstore` or manually create it at `~/.config/jukebox/library.json`.
107
107
 
108
108
  ### Manage the library with the discstore
109
109
 
@@ -150,7 +150,7 @@ uv run --extra ui jukebox-admin ui
150
150
 
151
151
  ### Manage the library manually
152
152
 
153
- Complete your `~/.jukebox/library.json` file with each tag id and the expected media URI.
153
+ Complete your `~/.config/jukebox/library.json` file with each tag id and the expected media URI.
154
154
  Take a look at `library.example.json` and the [The library file](#the-library-file) section for more information.
155
155
 
156
156
  ## Usage
@@ -168,7 +168,7 @@ Optional Parameters
168
168
  | Parameter | Description |
169
169
  | --- | --- |
170
170
  | `--help` | Show help message. |
171
- | `--library` | Path to the library file, default: `~/.jukebox/library.json`. |
171
+ | `--library` | Path to the library file, default: `~/.config/jukebox/library.json`. |
172
172
  | `--pause-delay SECONDS` | Grace period before pausing when the NFC tag is removed. Fractional values such as `0.5` or `0.2` are supported, with a minimum of `0.2` seconds to avoid pausing on brief missed reads. Default: 0.25 seconds. |
173
173
  | `--pause-duration SECONDS` | Maximum duration of a pause before resetting the queue. Default: 900 seconds (15 minutes). |
174
174
  | `--verbose` | Enable verbose logging. |
@@ -211,7 +211,7 @@ The `library.json` file is a JSON file that contains the artists, albums and tag
211
211
  It is used by the `jukebox` command to find the corresponding metadata for each tag.
212
212
  And the `discstore` command help you to managed this file with a CLI, an interactive CLI, an API or an UI (see `discstore --help`).
213
213
 
214
- By default, this file should be placed at `~/.jukebox/library.json`. But you can use another path by creating a `JUKEBOX_LIBRARY_PATH` environment variable or with the `--library` argument.
214
+ By default, this file should be placed at `~/.config/jukebox/library.json`. But you can use another path by creating a `JUKEBOX_LIBRARY_PATH` environment variable or with the `--library` argument.
215
215
 
216
216
  ```json
217
217
  {
@@ -250,7 +250,7 @@ It is also possible to use the `shuffle` key to play the album in shuffle mode:
250
250
  }
251
251
  ```
252
252
 
253
- To summarize, for example, if you have the following `~/.jukebox/library.json` file:
253
+ To summarize, for example, if you have the following `~/.config/jukebox/library.json` file:
254
254
 
255
255
  ```json
256
256
  {
@@ -1,3 +1,4 @@
1
+ import os
1
2
  from typing import Optional
2
3
 
3
4
  try:
@@ -12,6 +13,11 @@ from jukebox.shared.timing import MIN_PAUSE_DELAY_SECONDS
12
13
  from .runtime_validation import validate_resolved_jukebox_runtime_rules
13
14
 
14
15
 
16
+ def _resolve_default_library_path():
17
+ xdg_config_home = os.environ.get("XDG_CONFIG_HOME", "~/.config")
18
+ return os.path.expanduser(os.path.join(xdg_config_home, "jukebox/library.json"))
19
+
20
+
15
21
  class StrictModel(BaseModel):
16
22
  model_config = ConfigDict(extra="forbid")
17
23
 
@@ -94,7 +100,7 @@ class ServerSettings(StrictModel):
94
100
 
95
101
 
96
102
  class PathsSettings(StrictModel):
97
- library_path: str = "~/.jukebox/library.json"
103
+ library_path: str = _resolve_default_library_path()
98
104
 
99
105
 
100
106
  class AdminSettings(StrictModel):
@@ -2,6 +2,7 @@ import json
2
2
  import os
3
3
  import tempfile
4
4
  from contextlib import suppress
5
+ from typing import Optional
5
6
 
6
7
  from pydantic import ValidationError
7
8
 
@@ -11,12 +12,14 @@ from .errors import InvalidSettingsError, MalformedSettingsFileError
11
12
  from .migration import CURRENT_SETTINGS_SCHEMA_VERSION, migrate_settings_data
12
13
  from .types import JsonObject
13
14
 
14
- DEFAULT_SETTINGS_PATH = os.path.expanduser("~/.jukebox/settings.json")
15
-
16
15
 
17
16
  class FileSettingsRepository:
18
- def __init__(self, filepath: str = DEFAULT_SETTINGS_PATH):
19
- self.filepath = os.path.expanduser(filepath)
17
+ def __init__(self, filepath: Optional[str] = None):
18
+ if filepath is None:
19
+ xdg_config_home = os.environ.get("XDG_CONFIG_HOME", "~/.config")
20
+ self.filepath = os.path.expanduser(os.path.join(xdg_config_home, "jukebox/settings.json"))
21
+ else:
22
+ self.filepath = os.path.expanduser(filepath)
20
23
 
21
24
  def load_persisted_settings_data(self) -> JsonObject:
22
25
  if not os.path.exists(self.filepath):
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "gukebox"
3
- version = "1.0.0.dev1"
3
+ version = "1.0.0.dev2"
4
4
  description = "A Jukebox to play music on speakers using 'CD' with NFC tag"
5
5
  authors = [{ name = "Gudsfile" }]
6
6
  readme = "README.md"
File without changes
File without changes