Skip to content

Commit

Permalink
Minor tweaks to tidal metadata and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
justin025 committed Dec 15, 2024
1 parent a2bc121 commit 5cab0f9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Customize **OnTheSpot** to fit your preferences by adjusting the settings in the
| **Windows 10 Explorer Thumbnails** | Embed thumbnails in a format that respects Windows 10 explorer and media player, this is an older format of ID3 and not widely supported. |
| **Close To Tray** | Close application to tray on exit. |
| **Check for Updates** | Automatically check for application updates. |
| **File Bitrate** | Set the bitrate of a converted file, default value is 320k. This setting is ignored if a lossless file format is selected. |
| **File Bitrate** | Set the bitrate of a converted file, default value is 320k. This setting is not respected by flac, wav, and m4a files. |
| **File Hertz** | Set the hertz of a converted file, default value is 44100 |
| **Track/Episode Format** | Select the audio format for your downloaded music or podcasts (e.g. `mp3`, `flac`, `ogg`, `m4a`). |
| [**Track/Episode Path**](#trackplaylist-path-format) | Customize the file naming pattern for tracks, episodes, and playlists using variables like `{artist}`, `{album}`, etc. |
Expand Down
2 changes: 1 addition & 1 deletion src/onthespot/api/tidal.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ def tidal_get_track_metadata(token, item_id):
info['copyright'] = track_data.get('copyright', '')
bpm = track_data.get('bpm', '')
info['bpm'] = bpm if bpm else ''
info['item_url'] = track_data.get('url', '')
info['item_url'] = track_data.get('url', '').replace('http://www.', 'https://')
info['isrc'] = track_data.get('isrc', '')
info['explicit'] = track_data.get('explicit', '')
info['album_artists'] = track_data.get('artist', '').get('name', '')
Expand Down
2 changes: 1 addition & 1 deletion src/onthespot/parse_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
DEEZER_URL_REGEX = re.compile(r'https?://www.deezer.com/(?:[a-z]{2}/)?(?P<type>album|playlist|track|artist)/(?P<id>\d+)')
SOUNDCLOUD_URL_REGEX = re.compile(r"https?://soundcloud.com/[-\w:/]+")
SPOTIFY_URL_REGEX = re.compile(r"https?://open.spotify.com/(intl-([a-zA-Z]+)/|)(?P<type>track|album|artist|playlist|episode|show)/(?P<id>[0-9a-zA-Z]{22})(\?si=.+?)?$")
TIDAL_URL_REGEX = re.compile(r"https?://(www\.|listen\.)?tidal.com/(?P<type>album|track|artist|playlist)/(?P<id>[a-z0-9\-]+)")
TIDAL_URL_REGEX = re.compile(r"https?://(www\.|listen\.)?tidal.com/(browse/)?(?P<type>album|track|artist|playlist)/(?P<id>\d+)")
YOUTUBE_URL_REGEX = re.compile(r"https?://(www\.|music\.)?youtube\.com/watch\?v=(?P<video_id>[a-zA-Z0-9_-]+)(&list=(?P<list_id>[a-zA-Z0-9_-]+))?")
#QOBUZ_INTERPRETER_URL_REGEX = re.compile(r"https?://www\.qobuz\.com/\w\w-\w\w/interpreter/[-\w]+/([-\w]+)")

Expand Down
7 changes: 6 additions & 1 deletion src/onthespot/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,12 @@ def convert_audio_format(filename, default_format):
if filetype == default_format:
command += ['-c:a', 'copy']
else:
command += ['-ar', f'{config.get("file_hertz")}', '-ac', '2', '-b:a', f'{config.get("file_bitrate")}']
command += [
#'-f', filetype.split('.')[1],
'-ac', '2',
'-ar', f'{config.get("file_hertz")}',
'-b:a', f'{config.get("file_bitrate")}'
]

# Add user defined parameters
for param in config.get('ffmpeg_args'):
Expand Down

0 comments on commit 5cab0f9

Please sign in to comment.