first working prototype
This commit is contained in:
parent
7d855c7d4d
commit
a21faec8ff
3 changed files with 4 additions and 3 deletions
0
.db/complete
Executable file
0
.db/complete
Executable file
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,2 +1,3 @@
|
||||||
podcasts.toml
|
podcasts.toml
|
||||||
db/*
|
db/*
|
||||||
|
podcatch-bin
|
||||||
|
|
|
@ -102,7 +102,7 @@ func downloadCasts(podcast Podcast) {
|
||||||
}
|
}
|
||||||
func podcastDownloaded(item Item) bool {
|
func podcastDownloaded(item Item) bool {
|
||||||
if len(donefile) < 1 {
|
if len(donefile) < 1 {
|
||||||
content, err := ioutil.ReadFile("db/complete")
|
content, err := ioutil.ReadFile(".db/complete")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
@ -150,7 +150,7 @@ func createNFO(item Item, file string) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
func markAsReceived(item Item) {
|
func markAsReceived(item Item) {
|
||||||
file, err := os.OpenFile("db/complete", os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0755)
|
file, err := os.OpenFile(".db/complete", os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0755)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println(err)
|
log.Println(err)
|
||||||
}
|
}
|
||||||
|
@ -161,7 +161,7 @@ func markAsReceived(item Item) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
func markAsErrored(item Item) {
|
func markAsErrored(item Item) {
|
||||||
file, err := os.OpenFile("db/error", os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0755)
|
file, err := os.OpenFile(".db/error", os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0755)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println(err)
|
log.Println(err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue