Kapitan 5a97d610a7
Some checks failed
Gitea/kapitanbooru-uploader/pipeline/head There was a failure building this commit
actually works
Now with tagger

Miejsce na zdjęcie

Linki do wiki

Zapis ustawień

Tagger działa w tle

Kolorujemy pliki po ratingu

Tagger cache

Tagi w bazie

Pobranie implikacji tagów

Autocomplete

Podział na pliki i skrypty + nowe API

Structure for package

Version 0.1.0
2025-02-25 00:05:13 +01:00

16 lines
485 B
Python

# Klasa pomocnicza do monitorowania postępu uploadu
class ProgressFile:
def __init__(self, f, callback, total_size):
self.f = f
self.callback = callback
self.total_size = total_size
self.read_bytes = 0
def read(self, size=-1):
data = self.f.read(size)
self.read_bytes += len(data)
self.callback(self.read_bytes, self.total_size)
return data
def __getattr__(self, attr):
return getattr(self.f, attr)