Beispiel #1
0
def test_default_music_directory():
    if sys.platform.startswith('linux'):
        output = subprocess.check_output(['xdg-user-dir', 'MUSIC'])
        expect_directory = output.decode('utf-8').rstrip()
    else:
        home = os.path.expanduser('~')
        expect_directory = os.path.join(home, 'Music')

    directory = internals.get_music_dir()
    assert directory == expect_directory
Beispiel #2
0
import logging
import yaml
import argparse

import os
import sys

_LOG_LEVELS_STR = ['INFO', 'WARNING', 'ERROR', 'DEBUG']

default_conf = {
    'spotify-downloader': {
        'manual': False,
        'no-metadata': False,
        'avconv': False,
        'folder': internals.get_music_dir(),
        'overwrite': 'prompt',
        'input-ext': '.m4a',
        'output-ext': '.mp3',
        'download-only-metadata': False,
        'dry-run': False,
        'music-videos-only': False,
        'no-spaces': False,
        'file-format': '{artist} - {track_name}',
        'search-format': '{artist} - {track_name} lyrics',
        'youtube-api-key': None,
        'log-level': 'INFO'
    }
}