From 62ed5346ac0a2db9e1c03d83f6fde652045ce1c0 Mon Sep 17 00:00:00 2001 From: 0x4B1D Date: Tue, 17 Feb 2026 23:05:01 +0100 Subject: [PATCH 1/3] Change checkout reference from 'api-feature' to 'search-filter-fix' Signed-off-by: 0x4B1D --- .github/workflows/release-builder-beta.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-builder-beta.yml b/.github/workflows/release-builder-beta.yml index a12632d8..63dd5303 100644 --- a/.github/workflows/release-builder-beta.yml +++ b/.github/workflows/release-builder-beta.yml @@ -12,7 +12,7 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4 with: - ref: api-feature + ref: search-filter-fix - name: Set up Python uses: actions/setup-python@v4 @@ -46,7 +46,7 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4 with: - ref: api-feature + ref: search-filter-fix - name: Run macOS Build Script run: scripts/build_mac.sh @@ -75,7 +75,7 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4 with: - ref: api-feature + ref: search-filter-fix - name: Run macOS Build Script run: scripts/build_mac.sh @@ -104,7 +104,7 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4 with: - ref: api-feature + ref: search-filter-fix - name: Install Dependencies run: | @@ -138,7 +138,7 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4 with: - ref: api-feature + ref: search-filter-fix - name: Install Dependencies run: | From 7aa85092bb81d648b774483a3401022cb287906f Mon Sep 17 00:00:00 2001 From: Edison Date: Wed, 3 Jun 2026 10:45:22 +0530 Subject: [PATCH 2/3] feat: add support for {composer} tag with smart path formatting --- src/onthespot/api/apple_music.py | 1 + src/onthespot/api/spotify.py | 1 + src/onthespot/otsconfig.py | 1 + src/onthespot/utils.py | 20 ++++++++++++++++++-- 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/onthespot/api/apple_music.py b/src/onthespot/api/apple_music.py index 2be7a9b3..a37c2777 100644 --- a/src/onthespot/api/apple_music.py +++ b/src/onthespot/api/apple_music.py @@ -204,6 +204,7 @@ def apple_music_get_track_metadata(session, item_id): info['image_url'] = image_url.replace("{w}", str(max_width)).replace("{h}", str(max_height)) info['writer'] = track_data.get('data', [])[0].get('attributes', {}).get('composerName') + info['composer'] = info['writer'] info['language'] = track_data.get('data', [])[0].get('attributes', {}).get('audioLocale') info['item_url'] = track_data.get('data', [])[0].get('attributes', {}).get('url') info['is_playable'] = True if track_data.get('data', [])[0].get('attributes', {}).get('playParams') else False diff --git a/src/onthespot/api/spotify.py b/src/onthespot/api/spotify.py index c936a5cb..f229074d 100644 --- a/src/onthespot/api/spotify.py +++ b/src/onthespot/api/spotify.py @@ -604,6 +604,7 @@ def spotify_get_track_metadata(token, item_id): info['performers'] = conv_list_format([item for item in credits.get('performers', []) if isinstance(item, str)]) info['producers'] = conv_list_format([item for item in credits.get('producers', []) if isinstance(item, str)]) info['writers'] = conv_list_format([item for item in credits.get('writers', []) if isinstance(item, str)]) + info['composer'] = info['writers'] if track_audio_data: key_mapping = { diff --git a/src/onthespot/otsconfig.py b/src/onthespot/otsconfig.py index bf63c089..fca8e80f 100755 --- a/src/onthespot/otsconfig.py +++ b/src/onthespot/otsconfig.py @@ -170,6 +170,7 @@ def __init__(self, cfg_path=None): "embed_performers": True, "embed_producers": True, "embed_writers": True, + "embed_composer": True, "embed_label": True, "embed_copyright": True, "embed_description": True, diff --git a/src/onthespot/utils.py b/src/onthespot/utils.py index ec470011..4ac58085 100644 --- a/src/onthespot/utils.py +++ b/src/onthespot/utils.py @@ -2,6 +2,7 @@ import json import os import platform +import re import requests import ssl import subprocess @@ -148,6 +149,13 @@ def format_item_path(item, item_metadata): elif item['item_type'] == 'episode': path = config.get("show_path_formatter") + # Audio + artist = sanitize_data(item_metadata.get('artists')) + composer_full = item_metadata.get('composer', '') + composer_first = re.split(r' [,&;] | & |,|;', composer_full)[0].strip() if composer_full else '' + composer = sanitize_data(composer_first) + album = sanitize_data(album) + item_path = path.format( # Universal service=sanitize_data(item.get('item_service')).title(), @@ -157,8 +165,9 @@ def format_item_path(item, item_metadata): explicit=sanitize_data(str(config.get('explicit_label')) if item_metadata.get('explicit') else ''), # Audio - artist=sanitize_data(item_metadata.get('artists')), - album=sanitize_data(album), + artist=artist, + composer=composer, + album=album, album_artist=sanitize_data(item_metadata.get('album_artists')), album_type=item_metadata.get('album_type', 'single').title(), disc_number=item_metadata.get('disc_number', 1) if not config.get('use_double_digit_path_numbers') else str(item_metadata.get('disc_number', 1)).zfill(2), @@ -401,6 +410,12 @@ def embed_metadata(item, metadata): else: command += ['-metadata', 'author={}'.format(value)] + elif key == 'composer' and config.get("embed_composer"): + if filetype == '.mp3': + command += ['-metadata', 'TCOM={}'.format(value)] + else: + command += ['-metadata', 'composer={}'.format(value)] + elif key == 'label' and config.get("embed_label"): if filetype in ['.flac', '.ogg', '.opus']: command += ['-metadata', 'label={}'.format(value)] @@ -663,6 +678,7 @@ def add_to_m3u_file(item, item_metadata): service=item.get('item_service').title(), service_id=str(item.get('item_id')), artist=item_metadata.get('artists'), + composer=item_metadata.get('composer'), album=item_metadata.get('album_name'), album_artist=item_metadata.get('album_artists'), album_type=item_metadata.get('album_type', 'single').title(), From 47ab2407c0368579cc7f5d8762232bb9e31f2231 Mon Sep 17 00:00:00 2001 From: 0x4B1D Date: Fri, 5 Jun 2026 23:46:43 +0200 Subject: [PATCH 3/3] tidying up composer handling in utils.py Signed-off-by: 0x4B1D --- src/onthespot/utils.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/onthespot/utils.py b/src/onthespot/utils.py index 4ac58085..1570e729 100644 --- a/src/onthespot/utils.py +++ b/src/onthespot/utils.py @@ -149,12 +149,9 @@ def format_item_path(item, item_metadata): elif item['item_type'] == 'episode': path = config.get("show_path_formatter") - # Audio - artist = sanitize_data(item_metadata.get('artists')) + # Split composer composer_full = item_metadata.get('composer', '') composer_first = re.split(r' [,&;] | & |,|;', composer_full)[0].strip() if composer_full else '' - composer = sanitize_data(composer_first) - album = sanitize_data(album) item_path = path.format( # Universal @@ -164,10 +161,11 @@ def format_item_path(item, item_metadata): year=sanitize_data(item_metadata.get('release_year')), explicit=sanitize_data(str(config.get('explicit_label')) if item_metadata.get('explicit') else ''), + # Audio - artist=artist, - composer=composer, - album=album, + artist=sanitize_data(item_metadata.get('artists')), + composer=sanitize_data(composer_first), + album=sanitize_data(album), album_artist=sanitize_data(item_metadata.get('album_artists')), album_type=item_metadata.get('album_type', 'single').title(), disc_number=item_metadata.get('disc_number', 1) if not config.get('use_double_digit_path_numbers') else str(item_metadata.get('disc_number', 1)).zfill(2),