Implements GET for images

This commit is contained in:
2016-01-25 15:59:45 +01:00
parent 21e6b41f95
commit 6ecaabf955
5 changed files with 59 additions and 23 deletions

View File

@@ -106,8 +106,8 @@ func (a *Album) String() string {
var rxExt = regexp.MustCompile(`\.([0-9]+)([a-zA-Z]+)\z`)
func (a *Album) CoverExt() string {
ext := path.Ext(a.CoverURL)
func AlbumCoverExt(URL string) string {
ext := path.Ext(URL)
m := rxExt.FindStringSubmatch(ext)
if m != nil {
ext = "." + m[2]