|
|
|
@ -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 |
|
|
|
|
} |
|
|
|
@ -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) |
|
|
|
|
} |
|
|
|
|