From 821163b1efb9101dcba070a230d29a66533cdc7d Mon Sep 17 00:00:00 2001 From: milarin Date: Mon, 30 Jan 2023 21:28:25 +0100 Subject: [PATCH] removed unused code --- get_torrents.go | 2 +- local_file_check.go | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/get_torrents.go b/get_torrents.go index 3abf3d2..4b2a051 100644 --- a/get_torrents.go +++ b/get_torrents.go @@ -15,7 +15,7 @@ import ( var torrentLinkRegex = regexp.MustCompile(`https:\/\/nyaa\.si\/download\/(\d+?)\.torrent`) func GetTorrents() ([]model.Torrent, error) { - resp, err := http.Get("https://nyaa.si/?page=rss") + resp, err := http.Get("https://nyaa.si/?page=rss&f=0&c=1_0") if err != nil { return nil, ErrTorrentNotObtainable.Wrap(err, "torrent data acqusition failed") } diff --git a/local_file_check.go b/local_file_check.go index 32160ae..cca0c26 100644 --- a/local_file_check.go +++ b/local_file_check.go @@ -9,17 +9,6 @@ import ( "git.milar.in/nyaanime/model" ) -func AnimeEpExistsLocally(animeEp model.AnimeEpisode) bool { - animeEpPath := logic.GetAnimeEpFilepath(animeEp, "*") - - files, err := filepath.Glob(animeEpPath) - if err != nil { - panic(err) - } - - return len(files) > 0 -} - func IsCurrentlyDownloading(animeEp model.AnimeEpisode) bool { animeEpPath := logic.GetAnimeEpFilepath(animeEp, "lock") _, err := os.Stat(animeEpPath)