mirror of
https://github.com/OPSnet/bencode-torrent.git
synced 2026-11-08 17:35:34 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
74929fdac8 |
No files matched your search
@@ -449,6 +449,10 @@ class BencodeTorrent {
|
||||
return $files;
|
||||
}
|
||||
|
||||
public function hasFiles(): bool {
|
||||
return isset($this->data['info']['files']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of strings formatted to be inserted into a Gazelle database into the table
|
||||
* torrents.FileList which is then used for displaying the table of files to the user when
|
||||
|
||||
@@ -310,6 +310,7 @@ class BencodeTorrentTest extends TestCase {
|
||||
['.mp3 s1234s 01 Test??.mp3 ÷', '.mp3 s2345s 03 Test.mp3 ÷'],
|
||||
$bencode->getGazelleFileList()
|
||||
);
|
||||
$this->assertTrue($bencode->hasFiles());
|
||||
}
|
||||
|
||||
public function testGetUtf8Name() {
|
||||
@@ -340,6 +341,7 @@ class BencodeTorrentTest extends TestCase {
|
||||
$bencode = new BencodeTorrent();
|
||||
$bencode->setData($data);
|
||||
$this->assertEquals(['.,!?)óÉ s1234s (test.,!?)óÉ ÷'], $bencode->getGazelleFileList());
|
||||
$this->assertFalse($bencode->hasFiles());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user