Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dhruv-ahuja/spoti-dl
/ functions
Functions
50 in github.com/dhruv-ahuja/spoti-dl
⨍
Functions
50
◇
Types & classes
8
↓ 8 callers
Function
correct_path_names
Corrects a given file or directory path by replacing illegal characters with '#'; replaces `/` if the given name is a file as files cannot contain the
src/utils.rs:67
↓ 4 callers
Function
env_vars
Generates mock environment variables to be used for testing certain helper functions.
tests/test_utils.py:12
↓ 3 callers
Function
add_metadata
Adds metadata for the downloaded song given its path and requisite metadata information
src/metadata.rs:13
↓ 3 callers
Function
create_download_directories
Creates the album-art and its parent download directory given the download directory's path
src/utils.rs:80
↓ 3 callers
Function
download_album_art
Downloads an album art image and writes its data to the target path; the path contains the file name
src/utils.rs:151
↓ 3 callers
Function
download_song
( file_path: &Path, song_name: &str, artists: &[String], track_number: Option<u32>, cli_ar
src/downloader.rs:15
↓ 2 callers
Function
filter_playlist_items
(items: Vec<PlaylistItem>)
src/spotify.rs:153
↓ 1 callers
Function
controller
Executes the main application flow by preparing the spotify client and extracting its active token. Calls and awaits the rust entrypoint func
spotidl/cli.py:64
↓ 1 callers
Function
download_album_covers
( unique_covers: Vec<(String, String)>, album_art_dir: PathBuf, parallel_tasks_count: usize, )
src/downloader.rs:130
↓ 1 callers
Function
download_album_songs
( mut file_path: PathBuf, cli_args: Arc<CliArgs>, album_art_dir: Arc<PathBuf>, album_name: Arc
src/downloader.rs:82
↓ 1 callers
Function
download_playlist_songs
( mut file_path: PathBuf, cli_args: Arc<CliArgs>, album_art_dir: PathBuf, song_details: Vec<Sp
src/downloader.rs:172
↓ 1 callers
Function
fetch_cli_args
Fetch all command-line arguments defined for the application.
spotidl/cli.py:13
↓ 1 callers
Function
generate_client
(token: String)
src/spotify.rs:61
↓ 1 callers
Function
generate_youtube_query
Generates the search query to fetch song audio stream from Youtube
src/utils.rs:101
↓ 1 callers
Function
get_album_details
( spotify_id: String, spotify_client: AuthCodeSpotify, )
src/spotify.rs:110
↓ 1 callers
Function
get_playlist_details
fetches the playlists' details and the 100 initial tracks; skips any podcast episodes as the app cannot reliably download them reliably
src/spotify.rs:196
↓ 1 callers
Function
get_playlist_songs
( spotify_client: &AuthCodeSpotify, spotify_id: &str, offset: u32, )
src/spotify.rs:225
↓ 1 callers
Function
get_song_details
( spotify_id: String, spotify_client: AuthCodeSpotify, )
src/spotify.rs:70
↓ 1 callers
Function
get_unique_cover_urls
(songs: &Vec<SpotifySong>)
src/spotify.rs:254
↓ 1 callers
Function
main
()
spotidl/main.py:6
↓ 1 callers
Function
parse_cli_arguments
Parses, validates and returns arguments passed to the application; prints out apt messages to the user if it fails
src/utils.rs:13
↓ 1 callers
Function
parse_link
Parses the link type and the Spotify item ID from the input Spotify link
src/utils.rs:106
↓ 1 callers
Function
process_album_download
( album: SpotifyAlbum, cli_args: CliArgs, )
src/downloader.rs:268
↓ 1 callers
Function
process_playlist_download
( spotify_id: String, spotify_client: AuthCodeSpotify, playlist: SpotifyPlaylist, cli_args: Cl
src/downloader.rs:339
↓ 1 callers
Function
process_song_download
(song: SpotifySong, cli_args: CliArgs)
src/downloader.rs:220
Function
check_env_vars
Run a barebones check to ensure that the three needed environment variables are not blank.
spotidl/utils.py:42
Function
check_ffmpeg_installed
Checks whether FFmpeg is installed or not.
spotidl/utils.py:51
Function
colorize_message
Colorizes a message with the given ANSI color code.
spotidl/utils.py:67
Method
fmt
(&self, f: &mut fmt::Formatter<'_>)
src/types.rs:55
Method
from_str
(s: &str)
src/types.rs:43
Method
from_str
(s: &str)
src/spotify.rs:20
Function
get_spotify_client
()
spotidl/spotify.py:7
Function
get_spotify_token
(client: spotipy.Spotify)
spotidl/spotify.py:17
Function
initialize_logger
Initializes an app-wide logger, for use in the Rust code, with the given configuration values.
spotidl/utils.py:13
Function
load_env_vars
Loads the environment variables into a dictionary.
spotidl/utils.py:24
Function
make_vars
(id_: str = "foo", secret: str = "bar", uri: str = "baz")
tests/test_utils.py:18
Function
parser
Acts as the point from where test functions can retrieve the ArgumentParser mock object to conduct testing.
tests/test_cli_args.py:12
Function
process_downloads
( py: Python<'_>, token: String, link: String, download_dir_str: String, codec_str: String
src/lib.rs:24
Function
spotidl_rs
(_py: Python, m: &PyModule)
src/lib.rs:16
Function
test_app_name
Verifies the application name.
tests/test_cli_args.py:39
Function
test_check_cli_args
Tests the CLI arguments verifier function with a variety of different correct arguments.
tests/test_utils.py:115
Function
test_check_cli_empty_link
Tests the CLI arguments verifier function with an empty link.
tests/test_utils.py:103
Function
test_check_cli_wrong_args
Tests the CLI arguments verifier function with a variety of different incorrect arguments.
tests/test_utils.py:80
Function
test_defaults
Tests the applications' default generated argument values.
tests/test_cli_args.py:71
Function
test_empty_link
Tests the applications' link argument by sending an empty link to the argument parser.
tests/test_cli_args.py:86
Function
test_get_link_type
Tests the link getter function.
tests/test_utils.py:129
Function
test_invalid_env_vars
Verifies whether the environment variable-checker function raises the apt Exception when given empty data.
tests/test_utils.py:47
Function
test_valid_env_vars
Verifies whether the environment variable-checker function is working as intended, by feeding it non-empty data.
tests/test_utils.py:32
Function
test_valid_link
Tests the application's link argument by sending a valid link to the argument parser.
tests/test_cli_args.py:100
Function
test_version
Verifies the application version.
tests/test_cli_args.py:52