think I changed smth

This commit is contained in:
lars
2022-10-24 13:55:34 +02:00
parent 137b18517f
commit e18dc980fe
9 changed files with 15 additions and 42 deletions

View File

@@ -2,12 +2,13 @@ import metadata
import download_links
import url_to_path
import download
import phonetic_compares
import logging
import requests
import os
# "/home/lars/Projekts/big projects/music-downloader/venv/bin/python3.10" "/home/lars/Projekts/big projects/music-downloader/src/main.py"
TEMP = "temp"
STEP_ONE_CACHE = ".cache1.csv"
STEP_TWO_CACHE = ".cache2.csv"

View File

@@ -96,7 +96,6 @@ class Search:
return album_sort
result = musicbrainzngs.get_release_by_id(mb_id, includes=["artists", "recordings", 'release-groups'])
print(result['release'])
if album_sort is None:
album_sort = get_additional_artist_info(
@@ -189,8 +188,6 @@ class Search:
continue
artist.append(name_)
mb_artist_ids.append(get_elem_from_obj(artist_, ['artist', 'id']))
# artist = [get_elem_from_obj(artist_, ['artist', 'name']) for artist_ in recording_data['artist-credit']]
# mb_artist_ids = [get_elem_from_obj(artist_, ['artist', 'id']) for artist_ in recording_data['artist-credit']]
def get_additional_artist_info(mb_id_):
r = musicbrainzngs.get_artist_by_id(mb_id_, includes=["releases"])

View File

@@ -15,7 +15,6 @@ def get_youtube_from_isrc(isrc: str):
# https://stackoverflow.com/questions/63388364/searching-youtube-videos-using-youtube-dl
with youtube_dl.YoutubeDL(YDL_OPTIONS) as ydl:
video = ydl.extract_info(f"ytsearch:{isrc}", download=False)['entries'][0]
print(type(video))
if YOUTUBE_URL_KEY not in video:
return None
return {