mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 21:46:11 +05:00
add log
This commit is contained in:
@@ -137,6 +137,9 @@ func loadDB() {
|
||||
|
||||
log.TLogln("Index rutor db")
|
||||
torrsearch.NewIndex(torrs)
|
||||
log.TLogln("Torrents count:", len(torrs))
|
||||
log.TLogln("Indexed words:", len(torrsearch.GetIDX()))
|
||||
|
||||
} else {
|
||||
log.TLogln("Error load rutor db:", err)
|
||||
}
|
||||
|
||||
@@ -18,6 +18,10 @@ func Search(text string) []int {
|
||||
return idx.search(text)
|
||||
}
|
||||
|
||||
func GetIDX() Index {
|
||||
return idx
|
||||
}
|
||||
|
||||
func (idx Index) add(torrs []*models.TorrentDetails) {
|
||||
for ID, torr := range torrs {
|
||||
for _, token := range analyze(torr.Title) {
|
||||
|
||||
Reference in New Issue
Block a user