Skip to content
This repository has been archived by the owner on Jun 25, 2020. It is now read-only.

Commit

Permalink
changed back to progressive line naming; [fhd] in the filename look…
Browse files Browse the repository at this point in the history
…s ugly as hell...
  • Loading branch information
ssttevee committed May 11, 2016
1 parent e83c888 commit 4b343e9
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ func doDownload(cmd *flag.FlagSet) {
continue
}

fname := fmt.Sprintf("s%de%v - %s [%s][%s].mp4", episode.SeasonNumber(), episode.EpisodeNumber(), episode.Title(), eq.String(), el)
fname := fmt.Sprintf("s%de%v - %s [%s][%s].mp4", episode.SeasonNumber(), episode.EpisodeNumber(), episode.Title(), qualityToProgressiveLines(eq), el)
fname = strings.Map(func(r rune) (rune) {
if r == '\\' || r == '/' || r == ':' || r == '*' || r == '?' || r == '"' || r == '<' || r == '>' || r == '|' {
return -1
Expand Down Expand Up @@ -374,3 +374,15 @@ func doDownload(cmd *flag.FlagSet) {
}
}
}

func qualityToProgressiveLines(EpisodeQuality q) string {
if q == funimation.StandardDefinition {
return "480p"
} else if q == funimation.HighDefinition {
return "720p"
} else if q == funimation.FullHighDefinition {
return "1080p"
}

return "?"
}

0 comments on commit 4b343e9

Please sign in to comment.