Adding new image and fix many things

This commit is contained in:
Apologieze
2025-03-12 15:37:23 -04:00
parent 298b631cf1
commit 7809282b88
8 changed files with 22 additions and 11 deletions

8
FyneApp.toml Normal file
View File

@@ -0,0 +1,8 @@
Website = "https://apologize.fr/benri"
[Details]
Icon = "Icon.png"
Name = "Benri"
ID = "fr.apologize.benri"
Version = "0.1.0"
Build = 1

View File

@@ -3,8 +3,8 @@ version: '3'
tasks:
package-w:
cmds:
- fyne package --sourceDir ./src/ -os windows -icon ../asset/icon.jpg -name Benri
- fyne package --sourceDir ./src/ -icon ../asset/Icon.png -os windows -name Benri
package-l:
cmds:
- fyne package --sourceDir ./src/ -os linux -icon ../asset/icon.jpg -name Benri
- fyne package --sourceDir ./src/ -os linux -icon ../asset/Icon.png -name Benri

BIN
asset/Change.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

BIN
asset/Icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

View File

Before

Width:  |  Height:  |  Size: 188 KiB

After

Width:  |  Height:  |  Size: 188 KiB

View File

@@ -58,12 +58,12 @@ func decodeProviderID(encoded string) string {
func extractLinks(provider_id string) map[string]interface{} {
allanime_base := "https://allanime.day"
url := allanime_base + provider_id
localUrl := allanime_base + provider_id
client := &http.Client{}
req, err := http.NewRequest("GET", url, nil)
req, err := http.NewRequest("GET", localUrl, nil)
var videoData map[string]interface{}
if err != nil {
Log(fmt.Sprint("Error creating request:", err), logFile)
log.Error(fmt.Sprint("Error creating request:", err))
return videoData
}
@@ -74,7 +74,7 @@ func extractLinks(provider_id string) map[string]interface{} {
// Send the request
resp, err := client.Do(req)
if err != nil {
Log(fmt.Sprint("Error sending request:", err), logFile)
log.Error(fmt.Sprint("Error sending request:", err))
return videoData
}
defer resp.Body.Close()
@@ -165,9 +165,9 @@ func GetEpisodeURL(config CurdConfig, id string, epNo int) ([]string, error) {
var wg sync.WaitGroup
resultChan := make(chan []string, 1) // Buffer for immediate return
for _, url := range response.Data.Episode.SourceUrls {
if len(url.SourceUrl) > 2 && unicode.IsDigit(rune(url.SourceUrl[2])) {
decodedProviderID := decodeProviderID(url.SourceUrl[2:])
for _, sourceURLS := range response.Data.Episode.SourceUrls {
if len(sourceURLS.SourceUrl) > 2 && unicode.IsDigit(rune(sourceURLS.SourceUrl[2])) {
decodedProviderID := decodeProviderID(sourceURLS.SourceUrl[2:])
wg.Add(1)
go func(id string) {

View File

@@ -289,7 +289,6 @@ func deleteTokenFile() {
func displayLocalProgress() {
localDbAnime := SearchFromLocalAniId(animeSelected.Media.ID)
fmt.Println(*animeSelected)
AnimeProgress := IntPointerFallback(animeSelected.Progress, 0)
AnimeEpisode := IntPointerFallback(animeSelected.Media.Episodes, 0)
@@ -320,6 +319,10 @@ func setPlayButtonVisibility() {
return
}
}
if animeSelected.Media.Episodes == nil {
playButton.Hide()
return
}
playButton.Show()
}

View File

@@ -331,5 +331,5 @@ func initMainApp() {
initMenuOption()
window.SetContent(fynetooltip.AddWindowToolTipLayer(container.NewBorder(nil, nil, nil, imageContainer, leftSide), window.Canvas()))
//window.Canvas().Focus(input)
window.Canvas().Focus(input)
}