diff --git a/db/migrations.go b/db/migrations.go
index 763cec86..9739b7c7 100644
--- a/db/migrations.go
+++ b/db/migrations.go
@@ -5,11 +5,13 @@ import (
"errors"
"fmt"
"log"
+ "os"
"path/filepath"
"strings"
"time"
"github.com/jinzhu/gorm"
+ "go.senan.xyz/gonic/fileutil"
"go.senan.xyz/gonic/playlist"
"go.senan.xyz/gonic/server/ctrlsubsonic/specid"
"gopkg.in/gormigrate.v1"
@@ -59,6 +61,7 @@ func (db *DB) Migrate(ctx MigrationContext) error {
construct(ctx, "202307281628", migrateAlbumArtistsMany2Many),
construct(ctx, "202309070009", migrateDeleteArtistCoverField),
construct(ctx, "202309131743", migrateArtistInfo),
+ construct(ctx, "202309161411", migratePlaylistsPaths),
}
return gormigrate.
@@ -478,11 +481,11 @@ func migratePlaylistsToM3U(tx *gorm.DB, ctx MigrationContext) error {
return track.AbsPath()
case specid.PodcastEpisode:
var pe PodcastEpisode
- tx.Where("id=?", id.Value).Find(&pe)
- if pe.Path == "" {
+ tx.Where("id=?", id.Value).Preload("Podcast").Find(&pe)
+ if pe.Filename == "" {
return ""
}
- return filepath.Join(ctx.PodcastsPath, pe.Path)
+ return filepath.Join(ctx.PodcastsPath, fileutil.Safe(pe.Podcast.Title), pe.Filename)
}
return ""
}
@@ -613,3 +616,97 @@ func migrateArtistInfo(tx *gorm.DB, _ MigrationContext) error {
).
Error
}
+
+func migratePlaylistsPaths(tx *gorm.DB, ctx MigrationContext) error {
+ if !tx.Dialect().HasColumn("podcast_episodes", "path") {
+ return nil
+ }
+ if !tx.Dialect().HasColumn("podcasts", "image_path") {
+ return nil
+ }
+
+ step := tx.Exec(`
+ ALTER TABLE podcasts RENAME COLUMN image_path TO image
+ `)
+ if err := step.Error; err != nil {
+ return fmt.Errorf("step drop podcast_episodes path: %w", err)
+ }
+
+ step = tx.AutoMigrate(
+ Podcast{},
+ PodcastEpisode{},
+ )
+ if err := step.Error; err != nil {
+ return fmt.Errorf("step auto migrate: %w", err)
+ }
+
+ var podcasts []*Podcast
+ if err := tx.Find(&podcasts).Error; err != nil {
+ return fmt.Errorf("step load: %w", err)
+ }
+
+ for _, p := range podcasts {
+ p.Image = filepath.Base(p.Image)
+ if err := tx.Save(p).Error; err != nil {
+ return fmt.Errorf("saving podcast for cover %d: %w", p.ID, err)
+ }
+
+ oldPath, err := fileutil.First(
+ filepath.Join(ctx.PodcastsPath, fileutil.Safe(p.Title)),
+ filepath.Join(ctx.PodcastsPath, strings.ReplaceAll(p.Title, string(filepath.Separator), "_")), // old safe func
+ filepath.Join(ctx.PodcastsPath, p.Title),
+ )
+ if err != nil {
+ return fmt.Errorf("find old podcast path: %w", err)
+ }
+ newPath := filepath.Join(ctx.PodcastsPath, fileutil.Safe(p.Title))
+ p.RootDir = newPath
+ if err := tx.Save(p).Error; err != nil {
+ return fmt.Errorf("saving podcast %d: %w", p.ID, err)
+ }
+ if oldPath == newPath {
+ continue
+ }
+ if err := os.Rename(oldPath, newPath); err != nil {
+ return fmt.Errorf("rename podcast path: %w", err)
+ }
+ }
+
+ var podcastEpisodes []*PodcastEpisode
+ if err := tx.Preload("Podcast").Find(&podcastEpisodes, "status=? OR status=?", PodcastEpisodeStatusCompleted, PodcastEpisodeStatusDownloading).Error; err != nil {
+ return fmt.Errorf("step load: %w", err)
+ }
+ for _, pe := range podcastEpisodes {
+ if pe.Filename == "" {
+ continue
+ }
+ oldPath, err := fileutil.First(
+ filepath.Join(pe.Podcast.RootDir, fileutil.Safe(pe.Filename)),
+ filepath.Join(pe.Podcast.RootDir, strings.ReplaceAll(pe.Filename, string(filepath.Separator), "_")), // old safe func
+ filepath.Join(pe.Podcast.RootDir, pe.Filename),
+ )
+ if err != nil {
+ return fmt.Errorf("find old podcast episode path: %w", err)
+ }
+ newName := fileutil.Safe(filepath.Base(oldPath))
+ pe.Filename = newName
+ if err := tx.Save(pe).Error; err != nil {
+ return fmt.Errorf("saving podcast episode %d: %w", pe.ID, err)
+ }
+ newPath := filepath.Join(pe.Podcast.RootDir, newName)
+ if oldPath == newPath {
+ continue
+ }
+ if err := os.Rename(oldPath, newPath); err != nil {
+ return fmt.Errorf("rename podcast episode path: %w", err)
+ }
+ }
+
+ step = tx.Exec(`
+ ALTER TABLE podcast_episodes DROP COLUMN path
+ `)
+ if err := step.Error; err != nil {
+ return fmt.Errorf("step drop podcast_episodes path: %w", err)
+ }
+ return nil
+}
diff --git a/db/model.go b/db/model.go
index 2087ba2f..ade2c5f1 100644
--- a/db/model.go
+++ b/db/model.go
@@ -8,7 +8,6 @@ package db
import (
"fmt"
- "path"
"path/filepath"
"sort"
"strings"
@@ -134,7 +133,7 @@ func (t *Track) AbsPath() string {
if t.Album == nil {
return ""
}
- return path.Join(
+ return filepath.Join(
t.Album.RootDir,
t.Album.LeftPath,
t.Album.RightPath,
@@ -146,7 +145,7 @@ func (t *Track) RelPath() string {
if t.Album == nil {
return ""
}
- return path.Join(
+ return filepath.Join(
t.Album.LeftPath,
t.Album.RightPath,
t.Filename,
@@ -354,10 +353,11 @@ type Podcast struct {
Title string
Description string
ImageURL string
- ImagePath string
+ Image string
Error string
Episodes []*PodcastEpisode
AutoDownload PodcastAutoDownload
+ RootDir string
}
func (p *Podcast) SID() *specid.ID {
@@ -387,11 +387,10 @@ type PodcastEpisode struct {
Bitrate int
Length int
Size int
- Path string
Filename string
Status PodcastEpisodeStatus
Error string
- AbsP string `gorm:"-"` // TODO: not this. instead we need some consistent way to get the AbsPath for both tracks and podcast episodes. or just files in general
+ Podcast *Podcast
}
func (pe *PodcastEpisode) AudioLength() int { return pe.Length }
@@ -418,7 +417,10 @@ func (pe *PodcastEpisode) MIME() string {
}
func (pe *PodcastEpisode) AbsPath() string {
- return pe.AbsP
+ if pe.Podcast == nil {
+ return ""
+ }
+ return filepath.Join(pe.Podcast.RootDir, pe.Filename)
}
type Bookmark struct {
diff --git a/fileutil/fileutil.go b/fileutil/fileutil.go
new file mode 100644
index 00000000..8ad23ff5
--- /dev/null
+++ b/fileutil/fileutil.go
@@ -0,0 +1,56 @@
+// TODO: this package shouldn't really exist. we can usually just attempt our normal filesystem operations
+// and handle errors atomically. eg.
+// - Safe could instead be try create file, handle error
+// - Unique could be try create file, on err create file (1), etc
+package fileutil
+
+import (
+ "fmt"
+ "os"
+ "path/filepath"
+ "regexp"
+ "strings"
+)
+
+var nonAlphaNumExpr = regexp.MustCompile("[^a-zA-Z0-9_.]+")
+
+func Safe(filename string) string {
+ filename = nonAlphaNumExpr.ReplaceAllString(filename, "")
+ return filename
+}
+
+// try to find a unqiue file (or dir) name. incrementing like "example (1)"
+func Unique(base, filename string) (string, error) {
+ return unique(base, filename, 0)
+}
+
+func unique(base, filename string, count uint) (string, error) {
+ var suffix string
+ if count > 0 {
+ suffix = fmt.Sprintf(" (%d)", count)
+ }
+ path := base + suffix
+ if filename != "" {
+ noExt := strings.TrimSuffix(filename, filepath.Ext(filename))
+ path = filepath.Join(base, noExt+suffix+filepath.Ext(filename))
+ }
+ _, err := os.Stat(path)
+ if os.IsNotExist(err) {
+ return path, nil
+ }
+ if err != nil {
+ return "", err
+ }
+ return unique(base, filename, count+1)
+}
+
+func First(path ...string) (string, error) {
+ var err error
+ for _, p := range path {
+ _, err = os.Stat(p)
+ if err == nil {
+ return p, nil
+ }
+ }
+ return "", err
+}
diff --git a/fileutil/fileutil_test.go b/fileutil/fileutil_test.go
new file mode 100644
index 00000000..88c552c3
--- /dev/null
+++ b/fileutil/fileutil_test.go
@@ -0,0 +1,56 @@
+package fileutil
+
+import (
+ "os"
+ "path/filepath"
+ "testing"
+
+ "github.com/stretchr/testify/require"
+)
+
+func TestUniquePath(t *testing.T) {
+ unq := func(base, filename string, count uint) string {
+ r, err := unique(base, filename, count)
+ require.NoError(t, err)
+ return r
+ }
+
+ require.Equal(t, "test/wow.mp3", unq("test", "wow.mp3", 0))
+ require.Equal(t, "test/wow (1).mp3", unq("test", "wow.mp3", 1))
+ require.Equal(t, "test/wow (2).mp3", unq("test", "wow.mp3", 2))
+
+ require.Equal(t, "test", unq("test", "", 0))
+ require.Equal(t, "test (1)", unq("test", "", 1))
+
+ base := filepath.Join(t.TempDir(), "a")
+
+ require.NoError(t, os.MkdirAll(base, os.ModePerm))
+
+ next := base + " (1)"
+ require.Equal(t, next, unq(base, "", 0))
+
+ require.NoError(t, os.MkdirAll(next, os.ModePerm))
+
+ next = base + " (2)"
+ require.Equal(t, next, unq(base, "", 0))
+
+ _, err := os.Create(filepath.Join(base, "test.mp3"))
+ require.NoError(t, err)
+ require.Equal(t, filepath.Join(base, "test (1).mp3"), unq(base, "test.mp3", 0))
+}
+
+func TestFirst(t *testing.T) {
+ base := t.TempDir()
+ name := filepath.Join(base, "test")
+ _, err := os.Create(name)
+ require.NoError(t, err)
+
+ p := func(name string) string {
+ return filepath.Join(base, name)
+ }
+
+ r, err := First(p("one"), p("two"), p("test"), p("four"))
+ require.NoError(t, err)
+ require.Equal(t, p("test"), r)
+
+}
diff --git a/podcasts/podcasts.go b/podcasts/podcasts.go
index b2e83681..5fc02c9c 100644
--- a/podcasts/podcasts.go
+++ b/podcasts/podcasts.go
@@ -10,7 +10,6 @@ import (
"os"
"path"
"path/filepath"
- "regexp"
"strconv"
"strings"
"time"
@@ -19,6 +18,7 @@ import (
"github.com/mmcdole/gofeed"
"go.senan.xyz/gonic/db"
+ "go.senan.xyz/gonic/fileutil"
"go.senan.xyz/gonic/mime"
"go.senan.xyz/gonic/scanner/tags"
)
@@ -35,45 +35,6 @@ type Podcasts struct {
}
func New(db *db.DB, base string, tagger tags.Reader) *Podcasts {
- // Walk podcast path making filenames safe. Phase 1: Files
- err := filepath.WalkDir(base, func(path string, d os.DirEntry, err error) error {
- if (path == base) || d.IsDir() {
- return nil
- }
- if err != nil {
- return err
- }
- localBase := d.Name()
- dir := filepath.Dir(path)
- safeBase := safeFilename(localBase)
- if localBase == safeBase {
- return nil
- }
- return os.Rename(strings.Join([]string{dir, localBase}, "/"), strings.Join([]string{dir, safeBase}, "/"))
- })
- if err != nil {
- log.Fatalf("error making podcast episode filenames safe: %v\n", err)
- }
- // Phase 2: Directories
- err = filepath.WalkDir(base, func(path string, d os.DirEntry, err error) error {
- var pathError *os.PathError
- if (path == base) || !d.IsDir() || errors.As(err, &pathError) { // Spurious path errors after move
- return nil
- }
- if err != nil {
- return err
- }
- localBase := d.Name()
- dir := filepath.Dir(path)
- safeBase := safeFilename(localBase)
- if localBase == safeBase {
- return nil
- }
- return os.Rename(strings.Join([]string{dir, localBase}, "/"), strings.Join([]string{dir, safeBase}, "/"))
- })
- if err != nil {
- log.Fatalf("error making podcast directory names safe: %v\n", err)
- }
return &Podcasts{
db: db,
baseDir: base,
@@ -132,15 +93,19 @@ func (p *Podcasts) GetNewestPodcastEpisodes(count int) ([]*db.PodcastEpisode, er
}
func (p *Podcasts) AddNewPodcast(rssURL string, feed *gofeed.Feed) (*db.Podcast, error) {
+ rootDir, err := fileutil.Unique(filepath.Join(p.baseDir, fileutil.Safe(feed.Title)), "")
+ if err != nil {
+ return nil, fmt.Errorf("find unique podcast dir: %w", err)
+
+ }
podcast := db.Podcast{
Description: feed.Description,
ImageURL: feed.Image.URL,
Title: feed.Title,
URL: rssURL,
+ RootDir: rootDir,
}
- podPath := absPath(p.baseDir, &podcast)
- err := os.Mkdir(podPath, 0755)
- if err != nil && !os.IsExist(err) {
+ if err := os.Mkdir(podcast.RootDir, 0755); err != nil && !os.IsExist(err) {
return nil, err
}
if err := p.db.Save(&podcast).Error; err != nil {
@@ -150,7 +115,7 @@ func (p *Podcasts) AddNewPodcast(rssURL string, feed *gofeed.Feed) (*db.Podcast,
return nil, err
}
go func() {
- if err := p.downloadPodcastCover(podPath, &podcast); err != nil {
+ if err := p.downloadPodcastCover(&podcast); err != nil {
log.Printf("error downloading podcast cover: %v", err)
}
}()
@@ -379,6 +344,7 @@ func (p *Podcasts) DownloadEpisode(episodeID int) error {
podcastEpisode := db.PodcastEpisode{}
podcast := db.Podcast{}
err := p.db.
+ Preload("Podcast").
Where("id=?", episodeID).
First(&podcastEpisode).
Error
@@ -417,13 +383,16 @@ func (p *Podcasts) DownloadEpisode(episodeID int) error {
}
filename = path.Base(audioURL.Path)
}
- filename = p.findUniqueEpisodeName(&podcast, &podcastEpisode, safeFilename(filename))
- audioFile, err := os.Create(path.Join(absPath(p.baseDir, &podcast), filename))
+ path, err := fileutil.Unique(podcast.RootDir, fileutil.Safe(filename))
+ if err != nil {
+ return fmt.Errorf("find unique path: %w", err)
+ }
+ _, filename = filepath.Split(path)
+ audioFile, err := os.Create(filepath.Join(podcast.RootDir, filename))
if err != nil {
return fmt.Errorf("create audio file: %w", err)
}
podcastEpisode.Filename = filename
- podcastEpisode.Path = path.Join(safeFilename(podcast.Title), filename)
p.db.Save(&podcastEpisode)
go func() {
if err := p.doPodcastDownload(&podcastEpisode, audioFile, resp.Body); err != nil {
@@ -433,37 +402,13 @@ func (p *Podcasts) DownloadEpisode(episodeID int) error {
return nil
}
-func (p *Podcasts) findUniqueEpisodeName(podcast *db.Podcast, podcastEpisode *db.PodcastEpisode, filename string) string {
- podcastPath := path.Join(absPath(p.baseDir, podcast), filename)
- if _, err := os.Stat(podcastPath); os.IsNotExist(err) {
- return filename
- }
- titlePath := fmt.Sprintf("%s%s", safeFilename(podcastEpisode.Title), filepath.Ext(filename))
- podcastPath = path.Join(absPath(p.baseDir, podcast), titlePath)
- if _, err := os.Stat(podcastPath); os.IsNotExist(err) {
- return titlePath
- }
- // try to find a filename like FILENAME (1).mp3 incrementing
- return findEpisode(absPath(p.baseDir, podcast), filename, 1)
-}
-
-func findEpisode(base, filename string, count int) string {
- noExt := strings.TrimSuffix(filename, filepath.Ext(filename))
- testFile := fmt.Sprintf("%s (%d)%s", noExt, count, filepath.Ext(filename))
- podcastPath := path.Join(base, testFile)
- if _, err := os.Stat(podcastPath); os.IsNotExist(err) {
- return testFile
- }
- return findEpisode(base, filename, count+1)
-}
-
func getContentDispositionFilename(header string) (string, bool) {
_, params, _ := mime.ParseMediaType(header)
filename, ok := params["filename"]
return filename, ok
}
-func (p *Podcasts) downloadPodcastCover(podPath string, podcast *db.Podcast) error {
+func (p *Podcasts) downloadPodcastCover(podcast *db.Podcast) error {
imageURL, err := url.Parse(podcast.ImageURL)
if err != nil {
return fmt.Errorf("parse image url: %w", err)
@@ -483,10 +428,10 @@ func (p *Podcasts) downloadPodcastCover(podPath string, podcast *db.Podcast) err
if ext == "" {
contentHeader := resp.Header.Get("content-disposition")
filename, _ := getContentDispositionFilename(contentHeader)
- ext = path.Ext(filename)
+ ext = filepath.Ext(filename)
}
- coverPath := path.Join(podPath, "cover"+ext)
- coverFile, err := os.Create(coverPath)
+ cover := "cover" + ext
+ coverFile, err := os.Create(filepath.Join(podcast.RootDir, cover))
if err != nil {
return fmt.Errorf("creating podcast cover: %w", err)
}
@@ -494,7 +439,7 @@ func (p *Podcasts) downloadPodcastCover(podPath string, podcast *db.Podcast) err
if _, err := io.Copy(coverFile, resp.Body); err != nil {
return fmt.Errorf("writing podcast cover: %w", err)
}
- podcast.ImagePath = path.Join(safeFilename(podcast.Title), fmt.Sprintf("cover%s", ext))
+ podcast.Image = fmt.Sprintf("cover%s", ext)
if err := p.db.Save(podcast).Error; err != nil {
return fmt.Errorf("save podcast: %w", err)
}
@@ -507,8 +452,7 @@ func (p *Podcasts) doPodcastDownload(podcastEpisode *db.PodcastEpisode, file *os
}
defer file.Close()
stat, _ := file.Stat()
- podcastPath := path.Join(p.baseDir, podcastEpisode.Path)
- podcastTags, err := p.tagger.Read(podcastPath)
+ podcastTags, err := p.tagger.Read(podcastEpisode.AbsPath())
if err != nil {
log.Printf("error parsing podcast audio: %e", err)
podcastEpisode.Status = db.PodcastEpisodeStatusError
@@ -531,7 +475,11 @@ func (p *Podcasts) DeletePodcast(podcastID int) error {
if err != nil {
return err
}
- if err := os.RemoveAll(absPath(p.baseDir, &podcast)); err != nil {
+ if podcast.RootDir == "" {
+ return fmt.Errorf("podcast has no root dir")
+ }
+
+ if err := os.RemoveAll(podcast.RootDir); err != nil {
return fmt.Errorf("delete podcast directory: %w", err)
}
err = p.db.
@@ -546,13 +494,13 @@ func (p *Podcasts) DeletePodcast(podcastID int) error {
func (p *Podcasts) DeletePodcastEpisode(podcastEpisodeID int) error {
episode := db.PodcastEpisode{}
- err := p.db.First(&episode, podcastEpisodeID).Error
+ err := p.db.Preload("Podcast").First(&episode, podcastEpisodeID).Error
if err != nil {
return err
}
episode.Status = db.PodcastEpisodeStatusDeleted
p.db.Save(&episode)
- if err := os.Remove(filepath.Join(p.baseDir, episode.Path)); err != nil {
+ if err := os.Remove(episode.AbsPath()); err != nil {
return err
}
return err
@@ -566,6 +514,7 @@ func (p *Podcasts) PurgeOldPodcasts(maxAge time.Duration) error {
Where("created_at < ?", expDate).
Where("updated_at < ?", expDate).
Where("modified_at < ?", expDate).
+ Preload("Podcast").
Find(&episodes).
Error
if err != nil && !errors.Is(err, gorm.ErrRecordNotFound) {
@@ -576,20 +525,12 @@ func (p *Podcasts) PurgeOldPodcasts(maxAge time.Duration) error {
if err := p.db.Save(episode).Error; err != nil {
return fmt.Errorf("save new podcast status: %w", err)
}
- if err := os.Remove(filepath.Join(p.baseDir, episode.Path)); err != nil {
+ if episode.Podcast == nil {
+ return fmt.Errorf("episode %d has no podcast", episode.ID)
+ }
+ if err := os.Remove(episode.AbsPath()); err != nil {
return fmt.Errorf("remove podcast path: %w", err)
}
}
return nil
}
-
-var nonAlphaNum = regexp.MustCompile("[^a-zA-Z0-9_.]+")
-
-func safeFilename(filename string) string {
- filename = nonAlphaNum.ReplaceAllString(filename, "")
- return filename
-}
-
-func absPath(base string, p *db.Podcast) string {
- return filepath.Join(base, safeFilename(p.Title))
-}
diff --git a/podcasts/podcasts_test.go b/podcasts/podcasts_test.go
index 279d96ae..dc4fc570 100644
--- a/podcasts/podcasts_test.go
+++ b/podcasts/podcasts_test.go
@@ -1,20 +1,69 @@
package podcasts
import (
- "os"
+ "bytes"
+ _ "embed"
+ "path/filepath"
"testing"
"time"
"github.com/mmcdole/gofeed"
+ "github.com/stretchr/testify/require"
+ "go.senan.xyz/gonic/db"
+ "go.senan.xyz/gonic/mockfs"
)
-func TestGetMoreRecentEpisodes(t *testing.T) {
+//go:embed testdata/rss.new
+var testRSS []byte
+
+func TestPodcastsAndEpisodesWithSameName(t *testing.T) {
+ t.Skip("requires network access")
+
+ m := mockfs.New(t)
+ require := require.New(t)
+
+ base := t.TempDir()
+ podcasts := New(m.DB(), base, m.TagReader())
+
fp := gofeed.NewParser()
- newFile, err := os.Open("testdata/rss.new")
+ newFeed, err := fp.Parse(bytes.NewReader(testRSS))
if err != nil {
- t.Fatalf("open test data: %v", err)
+ t.Fatalf("parse test data: %v", err)
}
- newFeed, err := fp.Parse(newFile)
+
+ podcast, err := podcasts.AddNewPodcast("file://testdata/rss.new", newFeed)
+ require.NoError(err)
+
+ require.Equal(podcast.RootDir, filepath.Join(base, "InternetBox"))
+
+ podcast, err = podcasts.AddNewPodcast("file://testdata/rss.new", newFeed)
+ require.NoError(err)
+
+ // check we made a unique podcast name
+ require.Equal(podcast.RootDir, filepath.Join(base, "InternetBox (1)"))
+
+ podcastEpisodes, err := podcasts.GetNewestPodcastEpisodes(10)
+ require.NoError(err)
+ require.Greater(len(podcastEpisodes), 0)
+
+ var pe []*db.PodcastEpisode
+ require.NoError(m.DB().Order("id").Find(&pe, "podcast_id=? AND title=?", podcast.ID, "Episode 126").Error)
+ require.Len(pe, 2)
+
+ require.NoError(podcasts.DownloadEpisode(pe[0].ID))
+ require.NoError(podcasts.DownloadEpisode(pe[1].ID))
+
+ require.NoError(m.DB().Order("id").Preload("Podcast").Find(&pe, "podcast_id=? AND title=?", podcast.ID, "Episode 126").Error)
+ require.Len(pe, 2)
+
+ // check we made a unique podcast episode names
+ require.Equal("InternetBoxEpisode126.mp3", pe[0].Filename)
+ require.Equal("InternetBoxEpisode126 (1).mp3", pe[1].Filename)
+}
+
+func TestGetMoreRecentEpisodes(t *testing.T) {
+ fp := gofeed.NewParser()
+ newFeed, err := fp.Parse(bytes.NewReader(testRSS))
if err != nil {
t.Fatalf("parse test data: %v", err)
}
diff --git a/podcasts/testdata/rss.new b/podcasts/testdata/rss.new
index 64f85c05..086207a6 100644
--- a/podcasts/testdata/rss.new
+++ b/podcasts/testdata/rss.new
@@ -2,7 +2,7 @@