fix(subsonic): send valid content-type with http.ServeStream
This commit is contained in:
@@ -277,7 +277,7 @@ func (s *Scanner) scanDir(tx *db.DB, c *Context, musicDir string, absPath string
|
||||
cover = item.Name()
|
||||
continue
|
||||
}
|
||||
if mime := mime.FromExtension(ext(item.Name())); mime != "" {
|
||||
if mime := mime.TypeByAudioExtension(filepath.Ext(item.Name())); mime != "" {
|
||||
tracks = append(tracks, item.Name())
|
||||
continue
|
||||
}
|
||||
@@ -578,13 +578,6 @@ func (s *Scanner) cleanGenres(c *Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func ext(name string) string {
|
||||
if ext := filepath.Ext(name); len(ext) > 0 {
|
||||
return ext[1:]
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func isCover(name string) bool {
|
||||
switch path := strings.ToLower(name); path {
|
||||
case
|
||||
|
||||
Reference in New Issue
Block a user