mirror of
https://github.com/YGGverse/YGGtracker.git
synced 2025-01-09 06:27:56 +00:00
unify torrent filenames to prevent encoding issues on FTP connection
This commit is contained in:
parent
4f2879fdef
commit
258d206f2e
@ -2538,11 +2538,8 @@ class TorrentController extends AbstractController
|
|||||||
$response->headers->set(
|
$response->headers->set(
|
||||||
'Content-Disposition',
|
'Content-Disposition',
|
||||||
sprintf(
|
sprintf(
|
||||||
'attachment; filename="wanted#%s.%s.torrent";',
|
'attachment; filename="wanted#%s.torrent";',
|
||||||
$torrent->getId(),
|
$torrent->getId()
|
||||||
mb_strtolower(
|
|
||||||
$file->getName()
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -2784,10 +2781,9 @@ class TorrentController extends AbstractController
|
|||||||
$torrentService->copyToFtpStorage(
|
$torrentService->copyToFtpStorage(
|
||||||
$torrent->getId(),
|
$torrent->getId(),
|
||||||
sprintf(
|
sprintf(
|
||||||
'%s/torrents/wanted/all/wanted#%s.%s.torrent',
|
'%s/torrents/wanted/all/wanted#%s.torrent',
|
||||||
$this->getParameter('app.torrent.wanted.ftp.folder'),
|
$this->getParameter('app.torrent.wanted.ftp.folder'),
|
||||||
$torrent->getId(),
|
$torrent->getId()
|
||||||
$file->getName()
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -2797,10 +2793,9 @@ class TorrentController extends AbstractController
|
|||||||
$torrentService->copyToFtpStorage(
|
$torrentService->copyToFtpStorage(
|
||||||
$torrent->getId(),
|
$torrent->getId(),
|
||||||
sprintf(
|
sprintf(
|
||||||
'%s/torrents/wanted/sensitive/yes/wanted#%s.%s.torrent',
|
'%s/torrents/wanted/sensitive/yes/wanted#%s.torrent',
|
||||||
$this->getParameter('app.torrent.wanted.ftp.folder'),
|
$this->getParameter('app.torrent.wanted.ftp.folder'),
|
||||||
$torrent->getId(),
|
$torrent->getId()
|
||||||
$file->getName()
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -2810,10 +2805,9 @@ class TorrentController extends AbstractController
|
|||||||
$torrentService->copyToFtpStorage(
|
$torrentService->copyToFtpStorage(
|
||||||
$torrent->getId(),
|
$torrent->getId(),
|
||||||
sprintf(
|
sprintf(
|
||||||
'%s/torrents/wanted/sensitive/no/wanted#%s.%s.torrent',
|
'%s/torrents/wanted/sensitive/no/wanted#%s.torrent',
|
||||||
$this->getParameter('app.torrent.wanted.ftp.folder'),
|
$this->getParameter('app.torrent.wanted.ftp.folder'),
|
||||||
$torrent->getId(),
|
$torrent->getId()
|
||||||
$file->getName()
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -2824,11 +2818,10 @@ class TorrentController extends AbstractController
|
|||||||
$torrentService->copyToFtpStorage(
|
$torrentService->copyToFtpStorage(
|
||||||
$torrent->getId(),
|
$torrent->getId(),
|
||||||
sprintf(
|
sprintf(
|
||||||
'%s/torrents/wanted/locale/%s/wanted#%s.%s.torrent',
|
'%s/torrents/wanted/locale/%s/wanted#%s.torrent',
|
||||||
$this->getParameter('app.torrent.wanted.ftp.folder'),
|
$this->getParameter('app.torrent.wanted.ftp.folder'),
|
||||||
$locale,
|
$locale,
|
||||||
$torrent->getId(),
|
$torrent->getId()
|
||||||
$file->getName()
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -2841,29 +2834,26 @@ class TorrentController extends AbstractController
|
|||||||
/// All
|
/// All
|
||||||
$torrentService->removeFromFtpStorage(
|
$torrentService->removeFromFtpStorage(
|
||||||
sprintf(
|
sprintf(
|
||||||
'%s/torrents/wanted/all/wanted#%s.%s.torrent',
|
'%s/torrents/wanted/all/wanted#%s.torrent',
|
||||||
$this->getParameter('app.torrent.wanted.ftp.folder'),
|
$this->getParameter('app.torrent.wanted.ftp.folder'),
|
||||||
$torrent->getId(),
|
$torrent->getId()
|
||||||
$file->getName()
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
/// Sensitive
|
/// Sensitive
|
||||||
$torrentService->removeFromFtpStorage(
|
$torrentService->removeFromFtpStorage(
|
||||||
sprintf(
|
sprintf(
|
||||||
'%s/torrents/wanted/sensitive/yes/wanted#%s.%s.torrent',
|
'%s/torrents/wanted/sensitive/yes/wanted#%s.torrent',
|
||||||
$this->getParameter('app.torrent.wanted.ftp.folder'),
|
$this->getParameter('app.torrent.wanted.ftp.folder'),
|
||||||
$torrent->getId(),
|
$torrent->getId()
|
||||||
$file->getName()
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$torrentService->removeFromFtpStorage(
|
$torrentService->removeFromFtpStorage(
|
||||||
sprintf(
|
sprintf(
|
||||||
'%s/torrents/wanted/sensitive/no/wanted#%s.%s.torrent',
|
'%s/torrents/wanted/sensitive/no/wanted#%s.torrent',
|
||||||
$this->getParameter('app.torrent.wanted.ftp.folder'),
|
$this->getParameter('app.torrent.wanted.ftp.folder'),
|
||||||
$torrent->getId(),
|
$torrent->getId()
|
||||||
$file->getName()
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -2872,11 +2862,10 @@ class TorrentController extends AbstractController
|
|||||||
{
|
{
|
||||||
$torrentService->removeFromFtpStorage(
|
$torrentService->removeFromFtpStorage(
|
||||||
sprintf(
|
sprintf(
|
||||||
'%s/torrents/wanted/locale/%s/wanted#%s.%s.torrent',
|
'%s/torrents/wanted/locale/%s/wanted#%s.torrent',
|
||||||
$this->getParameter('app.torrent.wanted.ftp.folder'),
|
$this->getParameter('app.torrent.wanted.ftp.folder'),
|
||||||
$locale,
|
$locale,
|
||||||
$torrent->getId(),
|
$torrent->getId()
|
||||||
$file->getName()
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user