From 97f0fa533778f08a24c4c6b8595205fafbcbc2d1 Mon Sep 17 00:00:00 2001
From: itouakirai <85016486+itouakirai@users.noreply.github.com>
Date: Tue, 7 May 2024 20:46:35 +0800
Subject: [PATCH 1/2] Update config.yaml

---
 config.yaml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/config.yaml b/config.yaml
index dc7427f..53ae90c 100644
--- a/config.yaml
+++ b/config.yaml
@@ -3,7 +3,8 @@ embed-lrc: true
 save-lrc-file: false
 embed-cover: true
 cover-size: 5000x5000
-cover-format: jpg
+cover-format: jpg       #jpg or png
 alac-save-folder: AM-DL downloads
 atmos-save-folder: AM-DL-Atmos downloads
 check: ""
+force-api: false

From 758940190ef261e5f542537d4963ce2e5c49f47d Mon Sep 17 00:00:00 2001
From: itouakirai <85016486+itouakirai@users.noreply.github.com>
Date: Tue, 7 May 2024 20:55:14 +0800
Subject: [PATCH 2/2] add force api mode

---
 main.go | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/main.go b/main.go
index ac73c0d..106518a 100644
--- a/main.go
+++ b/main.go
@@ -45,6 +45,7 @@ type Config struct {
     CoverFormat      string `yaml:"cover-format"`
     AlacSaveFolder      string `yaml:"alac-save-folder"`
     AtmosSaveFolder      string `yaml:"atmos-save-folder"`
+	ForceApi       bool `yaml:"force-api"`
 	Check      string `yaml:"check"`
 }
 
@@ -1249,6 +1250,12 @@ func rip(albumId string, token string, storefront string, userToken string) erro
 				if string(Checkbody) != "no_found"{
 					manifest.Attributes.ExtendedAssetUrls.EnhancedHls=string(Checkbody)
 					fmt.Println("Found m3u8 from API")
+				} else {
+					if config.ForceApi {
+						fmt.Println(" Not Found m3u8 from API, Skip")
+						continue
+					}
+					fmt.Println(" Not Found m3u8 from API")
 				}
 			}
 		}
@@ -2059,4 +2066,4 @@ type SongLyrics struct {
 			} `json:"playParams"`
 		} `json:"attributes"`
 	} `json:"data"`
-}
\ No newline at end of file
+}