Removed Spaces CDN
This commit is contained in:
@ -1,13 +1,11 @@
|
||||
package episode
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/aerogo/aero"
|
||||
"github.com/animenotifier/notify.moe/arn"
|
||||
"github.com/animenotifier/notify.moe/components"
|
||||
minio "github.com/minio/minio-go/v7"
|
||||
)
|
||||
|
||||
// Get renders the anime episode.
|
||||
@ -32,10 +30,10 @@ func Get(ctx aero.Context) error {
|
||||
// Does the episode exist?
|
||||
uploaded := false
|
||||
|
||||
if arn.Spaces != nil {
|
||||
stat, err := arn.Spaces.StatObject(ctx.Request().Context(), "arn", fmt.Sprintf("videos/anime/%s/%d.webm", anime.ID, episode.Number), minio.StatObjectOptions{})
|
||||
uploaded = (err == nil) && (stat.Size > 0)
|
||||
}
|
||||
// if arn.Spaces != nil {
|
||||
// stat, err := arn.Spaces.StatObject(ctx.Request().Context(), "arn", fmt.Sprintf("videos/anime/%s/%d.webm", anime.ID, episode.Number), minio.StatObjectOptions{})
|
||||
// uploaded = (err == nil) && (stat.Size > 0)
|
||||
// }
|
||||
|
||||
_, episodeIndex := anime.Episodes().Find(episode.Number)
|
||||
|
||||
|
Reference in New Issue
Block a user