mirror of
https://git.sr.ht/~phw/scotty
synced 2025-06-05 04:58:33 +02:00
ScrobblerLog.ReadHeader now accepts io.Reader
This commit is contained in:
parent
97600d8190
commit
536fae6a46
2 changed files with 7 additions and 5 deletions
|
@ -17,7 +17,6 @@ Scotty. If not, see <https://www.gnu.org/licenses/>.
|
|||
package scrobblerlog
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"fmt"
|
||||
"os"
|
||||
"sort"
|
||||
|
@ -105,8 +104,7 @@ func (b *ScrobblerLogBackend) StartImport() error {
|
|||
b.append = false
|
||||
} else {
|
||||
// Verify existing file is a scrobbler log
|
||||
reader := bufio.NewReader(file)
|
||||
if err = b.log.ReadHeader(reader); err != nil {
|
||||
if err = b.log.ReadHeader(file); err != nil {
|
||||
file.Close()
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue