fixed again
This commit is contained in:
parent
f7129e796e
commit
da0bb12190
@ -4,6 +4,7 @@ import logging
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
from lyrics import genius
|
from lyrics import genius
|
||||||
|
from src.utils.shared import *
|
||||||
|
|
||||||
"""
|
"""
|
||||||
This whole Part is bodgy as hell and I need to rewrite this little file urgently. genius.py is really clean though :3
|
This whole Part is bodgy as hell and I need to rewrite this little file urgently. genius.py is really clean though :3
|
||||||
@ -56,7 +57,7 @@ def fetch_single_lyrics(row: dict):
|
|||||||
add_lyrics(file_, lyrics[0])
|
add_lyrics(file_, lyrics[0])
|
||||||
|
|
||||||
|
|
||||||
def fetch_lyrics(database: db.Database):
|
def fetch_lyrics():
|
||||||
for row in database.get_custom_track([]):
|
for row in database.get_custom_track([]):
|
||||||
print(row['title'])
|
print(row['title'])
|
||||||
fetch_single_lyrics(row)
|
fetch_single_lyrics(row)
|
||||||
@ -81,4 +82,4 @@ if __name__ == "__main__":
|
|||||||
db_logger,
|
db_logger,
|
||||||
reset_anyways=False)
|
reset_anyways=False)
|
||||||
|
|
||||||
fetch_lyrics(database)
|
fetch_lyrics()
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
from src.utils.shared import *
|
from src.utils.shared import *
|
||||||
from src.utils.object_handeling import get_elem_from_obj
|
from src.utils.object_handeling import get_elem_from_obj, parse_music_brainz_date
|
||||||
|
|
||||||
from typing import List
|
from typing import List
|
||||||
import musicbrainzngs
|
import musicbrainzngs
|
||||||
@ -51,8 +51,6 @@ class MetadataDownloader:
|
|||||||
|
|
||||||
for i, release_group in enumerate(release_groups):
|
for i, release_group in enumerate(release_groups):
|
||||||
self.release_groups.append(MetadataDownloader.ReleaseGroup(
|
self.release_groups.append(MetadataDownloader.ReleaseGroup(
|
||||||
database,
|
|
||||||
logger,
|
|
||||||
musicbrainz_releasegroupid=release_group['id'],
|
musicbrainz_releasegroupid=release_group['id'],
|
||||||
artists=[self],
|
artists=[self],
|
||||||
albumsort=i + 1
|
albumsort=i + 1
|
||||||
|
@ -28,6 +28,9 @@ def get_youtube_from_isrc(isrc: str) -> List[dict]:
|
|||||||
|
|
||||||
|
|
||||||
def get_youtube_url(row):
|
def get_youtube_url(row):
|
||||||
|
if row['isrc'] is None:
|
||||||
|
return None
|
||||||
|
|
||||||
real_title = row['title'].lower()
|
real_title = row['title'].lower()
|
||||||
|
|
||||||
final_result = None
|
final_result = None
|
||||||
|
@ -26,7 +26,7 @@ temp_dir = os.path.join(tempfile.gettempdir(), TEMP_FOLDER)
|
|||||||
if not os.path.exists(temp_dir):
|
if not os.path.exists(temp_dir):
|
||||||
os.mkdir(temp_dir)
|
os.mkdir(temp_dir)
|
||||||
|
|
||||||
mb_log = logging.getLogger("musicbrainzngs").setLevel(logging.WARNING)
|
logging.getLogger("musicbrainzngs").setLevel(logging.WARNING)
|
||||||
musicbrainzngs.set_useragent("metadata receiver", "0.1", "https://github.com/HeIIow2/music-downloader")
|
musicbrainzngs.set_useragent("metadata receiver", "0.1", "https://github.com/HeIIow2/music-downloader")
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user