<commit_before><?php
class NzbHandler_Clientsabnzbd extends NzbHandler_abs
{
	private $_url = null;

	function __construct(SpotSettings $settings, array $nzbHandling)
	{
		parent::__construct($settings, 'SABnzbd', 'SAB', $nzbHandling);

		$sabnzbd = $nzbHandling['sabnzbd'];

		# prepare sabnzbd url
		$this->_url = $sabnzbd['url'] . 'sabnzbd/api?mode=addurl&apikey=' . $sabnzbd['apikey'] . '&output=text';
	} # __construct

	public function processNzb($fullspot, $nzblist)
	{
		// do nothing
	} # processNzb

	public function generateNzbHandlerUrl($spot, $spotwebApiParam)
	{
		$title = urlencode($this->cleanForFileSystem($spot['title']));
		$category = urlencode($this->convertCatToSabnzbdCat($spot));

		# yes, using a local variable instead of the member variable is intentional
		$url = htmlspecialchars($this->_url . '&nzbname=' . $title . '&cat=' . $category);
		$url .= '&name=' . urlencode($this->_settings->get('spotweburl') . '?page=getnzb&action=display&messageid=' . $spot['messageid']);
		$url .= $spotwebApiParam;

		return $url;<commit_msg>Zo wordt de URL iets mooier<commit_after><?php
class NzbHandler_Clientsabnzbd extends NzbHandler_abs
{
	private $_url = null;

	function __construct(SpotSettings $settings, array $nzbHandling)
	{
		parent::__construct($settings, 'SABnzbd', 'SAB', $nzbHandling);

		$sabnzbd = $nzbHandling['sabnzbd'];

		# prepare sabnzbd url
		$this->_url = $sabnzbd['url'] . 'sabnzbd/api?mode=addurl&apikey=' . $sabnzbd['apikey'] . '&output=text';
	} # __construct

	public function processNzb($fullspot, $nzblist)
	{
		// do nothing
	} # processNzb

	public function generateNzbHandlerUrl($spot, $spotwebApiParam)
	{
		$title = urlencode($this->cleanForFileSystem($spot['title']));
		$category = urlencode($this->convertCatToSabnzbdCat($spot));

		# yes, using a local variable instead of the member variable is intentional
		$url = htmlspecialchars($this->_url . '&nzbname=' . $title . '&cat=' . $category);
		$url .= '&name=' . urlencode($this->_settings->get('spotweburl') . '?page=getnzb&action=display&messageid=' . $spot['messageid'] . html_entity_decode($spotwebApiParam));
		return $url;
{'fraction_non_alphanumeric': 0.16510757717492985, 'fraction_numerical': 0.0, 'mean_word_length': 5.684375, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6071124', 'n_tokens_mistral': 805, 'n_tokens_neox': 745, 'n_words': 143}