mirror of
https://github.com/Apologieze/Benri.git
synced 2026-01-18 17:17:21 +01:00
Added score
This commit is contained in:
1
TODO.md
1
TODO.md
@@ -19,3 +19,4 @@
|
||||
- [x] Watching last episode should refresh data
|
||||
|
||||
- [ ] Having an indicator if new ep is out
|
||||
- [ ] Show anime score on completed
|
||||
|
||||
@@ -53,10 +53,11 @@ type playingVideo struct {
|
||||
}
|
||||
|
||||
type User struct {
|
||||
Token string
|
||||
Username string
|
||||
Id int
|
||||
AnimeList AnimeList
|
||||
Token string
|
||||
Username string
|
||||
ScoreFormat string
|
||||
Id int
|
||||
AnimeList AnimeList
|
||||
}
|
||||
|
||||
// AniListAnime is the struct for the API response
|
||||
|
||||
@@ -15,7 +15,7 @@ var fields = []verniy.MediaListGroupField{
|
||||
verniy.MediaListFieldID,
|
||||
verniy.MediaListFieldMediaID,
|
||||
verniy.MediaListFieldStatus,
|
||||
verniy.MediaListFieldScore,
|
||||
verniy.MediaListFieldCustomScore,
|
||||
verniy.MediaListFieldProgress,
|
||||
verniy.MediaListFieldMedia(
|
||||
verniy.MediaFieldID,
|
||||
|
||||
@@ -350,7 +350,17 @@ func displayLocalProgress() {
|
||||
fmt.Println("Current Ep:", currentEp)
|
||||
|
||||
defer setPlayButtonVisibility()
|
||||
|
||||
if animeSelected.Score != nil && (*animeSelected.Status != verniy.MediaListStatusCurrent) {
|
||||
if *animeSelected.Score != 0 {
|
||||
episodeLastPlayback.SetText(fmt.Sprint("Your score: ", *animeSelected.Score, "/10"))
|
||||
episodeLastPlayback.Show()
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if localDbAnime != nil {
|
||||
|
||||
if localDbAnime.Ep.Number == AnimeProgress {
|
||||
if localDbAnime.Ep.Player.PlaybackTime == 0 {
|
||||
episodeLastPlayback.SetText(fmt.Sprintf("Just finished Episode %d", localDbAnime.Ep.Number))
|
||||
@@ -364,6 +374,7 @@ func displayLocalProgress() {
|
||||
}
|
||||
}
|
||||
}
|
||||
//log.Info("No local data found")
|
||||
episodeLastPlayback.Hide()
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ var (
|
||||
|
||||
func main() {
|
||||
appW = app.NewWithID(AppID)
|
||||
|
||||
appW.Settings()
|
||||
config.CreateConfig(appW.Preferences())
|
||||
if config.Setting.TrayIcon {
|
||||
// Initialize lockfile
|
||||
|
||||
@@ -1543,6 +1543,7 @@ const (
|
||||
MediaListFieldMediaID MediaListField = "mediaId"
|
||||
MediaListFieldStatus MediaListField = "status"
|
||||
MediaListFieldScore MediaListField = "score" // TODO: with param
|
||||
MediaListFieldCustomScore MediaListField = "score(format: POINT_10_DECIMAL)"
|
||||
MediaListFieldProgress MediaListField = "progress"
|
||||
MediaListFieldProgressVolumes MediaListField = "progressVolumes"
|
||||
MediaListFieldRepeat MediaListField = "repeat"
|
||||
|
||||
Reference in New Issue
Block a user