mirror of
https://github.com/issadarkthing/gomu.git
synced 2025-04-26 13:49:21 +08:00
cleanup debug code
This commit is contained in:
parent
f304407b60
commit
efc3a43ef8
@ -1,17 +1,11 @@
|
||||
package lyric
|
||||
|
||||
import (
|
||||
// "encoding/json"
|
||||
"fmt"
|
||||
// "net/url"
|
||||
"io"
|
||||
"os"
|
||||
"strconv"
|
||||
|
||||
"github.com/asmcos/requests"
|
||||
"github.com/martinlindhe/subtitles"
|
||||
// "github.com/gocolly/colly"
|
||||
// r "github.com/solos/requests"
|
||||
)
|
||||
|
||||
// GetLyricOptionsChinese queries available song lyrics. It returns map of title and
|
||||
@ -76,24 +70,12 @@ func GetLyricChinese(lyricID string, serviceProvider string) (string, error) {
|
||||
}
|
||||
lyric = dataMap["lyric"].(string)
|
||||
if looksLikeLRC(lyric) {
|
||||
//Fixme
|
||||
filename := "/home/tramhao/1.lrc"
|
||||
file, _ := os.Create(filename)
|
||||
io.WriteString(file, lyric)
|
||||
file.Close()
|
||||
|
||||
var tmpSubtitle subtitles.Subtitle
|
||||
tmpSubtitle, err = NewFromLRC(lyric)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
lyric = tmpSubtitle.AsSRT()
|
||||
//Fixme
|
||||
filename = "/home/tramhao/1.srt"
|
||||
file, _ = os.Create(filename)
|
||||
io.WriteString(file, lyric)
|
||||
file.Close()
|
||||
|
||||
}
|
||||
return lyric, nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user