mirror of
https://github.com/YGGverse/YGGtracker.git
synced 2026-03-31 17:15:38 +00:00
add info hash to torrent keywords index
This commit is contained in:
parent
f45bda4e58
commit
60503becdf
1 changed files with 13 additions and 1 deletions
|
|
@ -154,7 +154,9 @@ class TorrentService
|
||||||
{
|
{
|
||||||
$keywords = [];
|
$keywords = [];
|
||||||
|
|
||||||
foreach ($this->readTorrentFileByFilepath($filepath)->getFileList() as $file)
|
$file = $this->readTorrentFileByFilepath($filepath);
|
||||||
|
|
||||||
|
foreach ($file->getFileList() as $file)
|
||||||
{
|
{
|
||||||
$words = explode(
|
$words = explode(
|
||||||
' ',
|
' ',
|
||||||
|
|
@ -182,6 +184,16 @@ class TorrentService
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($hash = $file->getInfoHashV1(false))
|
||||||
|
{
|
||||||
|
$keywords[] = $hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($hash = $file->getInfoHashV2(false))
|
||||||
|
{
|
||||||
|
$keywords[] = $hash;
|
||||||
|
}
|
||||||
|
|
||||||
$keywords = array_merge($keywords, $words);
|
$keywords = array_merge($keywords, $words);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue