mirror of
https://github.com/glomatico/gamdl.git
synced 2026-06-13 04:05:14 +03:00
Use .get for playParams isLibrary checks
This commit is contained in:
@@ -57,7 +57,7 @@ class AppleMusicSongInterface:
|
|||||||
song_id=song_metadata["id"],
|
song_id=song_metadata["id"],
|
||||||
)
|
)
|
||||||
|
|
||||||
if song_metadata["attributes"]["playParams"]["isLibrary"]:
|
if song_metadata["attributes"]["playParams"].get("isLibrary"):
|
||||||
log.debug("library_song_no_lyrics")
|
log.debug("library_song_no_lyrics")
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@@ -259,7 +259,7 @@ class AppleMusicSongInterface:
|
|||||||
song_id=song_metadata["id"],
|
song_id=song_metadata["id"],
|
||||||
)
|
)
|
||||||
|
|
||||||
if song_metadata["attributes"]["playParams"]["isLibrary"]:
|
if song_metadata["attributes"]["playParams"].get("isLibrary"):
|
||||||
log.debug("library_song_no_m3u8_master_url")
|
log.debug("library_song_no_m3u8_master_url")
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@@ -277,6 +277,7 @@ class AppleMusicSongInterface:
|
|||||||
return enhanced
|
return enhanced
|
||||||
|
|
||||||
log.debug("no_m3u8_master_url")
|
log.debug("no_m3u8_master_url")
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
async def get_stream_info(
|
async def get_stream_info(
|
||||||
@@ -543,7 +544,7 @@ class AppleMusicSongInterface:
|
|||||||
)
|
)
|
||||||
)["data"][0]
|
)["data"][0]
|
||||||
|
|
||||||
if media.media_metadata["attributes"]["playParams"]["isLibrary"]:
|
if media.media_metadata["attributes"]["playParams"].get("isLibrary"):
|
||||||
catalog_metadata = self.base.get_catalog_metadata_from_library(
|
catalog_metadata = self.base.get_catalog_metadata_from_library(
|
||||||
media.media_metadata
|
media.media_metadata
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user