add port config
This commit is contained in:
parent
4cfa5251b6
commit
cd126d6e8d
@ -10,6 +10,8 @@ alac-save-folder: AM-DL downloads
|
||||
atmos-save-folder: AM-DL-Atmos downloads
|
||||
check: ""
|
||||
force-api: false
|
||||
decrypt-m3u8-port: "127.0.0.1:10020"
|
||||
get-m3u8-port: "127.0.0.1:20020"
|
||||
get-m3u8-from-device: false
|
||||
alac-max: 192000 #192000 96000 48000 44100
|
||||
atmos-max: 2768 #2768 2448
|
||||
|
14
main.go
14
main.go
@ -41,8 +41,8 @@ var (
|
||||
type Config struct {
|
||||
MediaUserToken string `yaml:"media-user-token"`
|
||||
SaveLrcFile bool `yaml:"save-lrc-file"`
|
||||
SaveAnimatedArtwork bool `yaml:"save-animated-artwork"`
|
||||
EmbyAnimatedArtwork bool `yaml:"emby-animated-artwork"`
|
||||
SaveAnimatedArtwork bool `yaml:"save-animated-artwork"`
|
||||
EmbyAnimatedArtwork bool `yaml:"emby-animated-artwork"`
|
||||
EmbedLrc bool `yaml:"embed-lrc"`
|
||||
EmbedCover bool `yaml:"embed-cover"`
|
||||
CoverSize string `yaml:"cover-size"`
|
||||
@ -58,6 +58,8 @@ type Config struct {
|
||||
AppleMasterChoice string `yaml:"apple-master-choice"`
|
||||
ForceApi bool `yaml:"force-api"`
|
||||
Check string `yaml:"check"`
|
||||
DecryptM3u8Port string `yaml:"decrypt-m3u8-port"`
|
||||
GetM3u8Port string `yaml:"get-m3u8-port"`
|
||||
GetM3u8FromDevice bool `yaml:"get-m3u8-from-device"`
|
||||
AlacMax int `yaml:"alac-max"`
|
||||
UseSongInfoForPlaylist bool `yaml:"use-songinfo-for-playlist"`
|
||||
@ -926,7 +928,7 @@ func writeM4a(w *mp4.Writer, info *SongInfo, meta *AutoGenerated, data []byte, t
|
||||
|
||||
func decryptSong(info *SongInfo, keys []string, manifest *AutoGenerated, filename string, trackNum, trackTotal int) error {
|
||||
//fmt.Printf("%d-bit / %d Hz\n", info.bitDepth, info.bitRate)
|
||||
conn, err := net.Dial("tcp", "127.0.0.1:10020")
|
||||
conn, err := net.Dial("tcp", config.DecryptM3u8Port)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -1419,7 +1421,7 @@ func rip(albumId string, token string, storefront string, userToken string) erro
|
||||
fmt.Printf("animated artwork to gif err: %v\n", err)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
trackTotal := len(meta.Data[0].Relationships.Tracks.Data)
|
||||
@ -1718,7 +1720,7 @@ func checkM3u8(b string, f string) (string, error) {
|
||||
}
|
||||
if config.GetM3u8FromDevice {
|
||||
adamID := b
|
||||
conn, err := net.Dial("tcp", "127.0.0.1:20020")
|
||||
conn, err := net.Dial("tcp", config.GetM3u8Port)
|
||||
if err != nil {
|
||||
fmt.Println("Error connecting to device:", err)
|
||||
}
|
||||
@ -2377,7 +2379,7 @@ type AutoGenerated struct {
|
||||
ID string `json:"id"`
|
||||
Kind string `json:"kind"`
|
||||
} `json:"playParams"`
|
||||
IsCompilation bool `json:"isCompilation"`
|
||||
IsCompilation bool `json:"isCompilation"`
|
||||
EditorialVideo struct {
|
||||
MotionDetailSquare struct {
|
||||
Video string `json:"video"`
|
||||
|
@ -54,6 +54,8 @@ type Config struct {
|
||||
ExplicitChoice string `yaml:"explicit-choice"`
|
||||
CleanChoice string `yaml:"clean-choice"`
|
||||
AppleMasterChoice string `yaml:"apple-master-choice"`
|
||||
DecryptM3u8Port string `yaml:"decrypt-m3u8-port"`
|
||||
GetM3u8Port string `yaml:"get-m3u8-port"`
|
||||
AtmosMax int `yaml:"atmos-max"`
|
||||
UseSongInfoForPlaylist bool `yaml:"use-songinfo-for-playlist"`
|
||||
DlAlbumcoverForPlaylist bool `yaml:"dl-albumcover-for-playlist"`
|
||||
@ -864,7 +866,7 @@ func writeM4a(w *mp4.Writer, info *SongInfo, meta *AutoGenerated, data []byte, t
|
||||
|
||||
func decryptSong(info *SongInfo, keys []string, manifest *AutoGenerated, filename string, trackNum, trackTotal int) error {
|
||||
//fmt.Printf("%d-bit / %d Hz\n", info.bitDepth, info.bitRate)
|
||||
conn, err := net.Dial("tcp", "127.0.0.1:10020")
|
||||
conn, err := net.Dial("tcp", config.DecryptM3u8Port)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -54,6 +54,8 @@ type Config struct {
|
||||
ExplicitChoice string `yaml:"explicit-choice"`
|
||||
CleanChoice string `yaml:"clean-choice"`
|
||||
AppleMasterChoice string `yaml:"apple-master-choice"`
|
||||
DecryptM3u8Port string `yaml:"decrypt-m3u8-port"`
|
||||
GetM3u8Port string `yaml:"get-m3u8-port"`
|
||||
AlacMax int `yaml:"alac-max"`
|
||||
UseSongInfoForPlaylist bool `yaml:"use-songinfo-for-playlist"`
|
||||
DlAlbumcoverForPlaylist bool `yaml:"dl-albumcover-for-playlist"`
|
||||
@ -917,7 +919,7 @@ func writeM4a(w *mp4.Writer, info *SongInfo, meta *AutoGenerated, data []byte, t
|
||||
|
||||
func decryptSong(info *SongInfo, keys []string, manifest *AutoGenerated, filename string, trackNum, trackTotal int) error {
|
||||
//fmt.Printf("%d-bit / %d Hz\n", info.bitDepth, info.bitRate)
|
||||
conn, err := net.Dial("tcp", "127.0.0.1:10020")
|
||||
conn, err := net.Dial("tcp", config.DecryptM3u8Port)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user