track_status
¶
Utilities for classifying track statuses and editability.
normalize_track_status
¶
Normalize track status strings for consistent comparisons.
Performs runtime type validation to ensure defensive programming, even if incorrect types are passed at runtime.
Handles AppleScript raw enum constants like «constant ****kSub» by extracting the 4-character code and mapping to standard status strings.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
status
|
object
|
Track status (expected str or None, but validated at runtime) |
required |
Returns:
| Type | Description |
|---|---|
str
|
Normalized lowercase status string, or empty string for None |
Raises:
| Type | Description |
|---|---|
TypeError
|
If status is not a string or None |
Source code in src/core/models/track_status.py
is_prerelease_status
¶
is_available_status
¶
Determine if the track status allows standard processing.
can_edit_metadata
¶
filter_available_tracks
¶
Filter tracks that are available for processing based on status.