Browse Source

Merge pull request #198 from MindTooth/transmission_url

Transmission: Added custom URL
pull/203/head
KodeStar 6 years ago
committed by GitHub
parent
commit
46f7a3d4f3
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      app/SupportedApps/Transmission.php
  2. 4
      resources/views/supportedapps/transmission.blade.php

9
app/SupportedApps/Transmission.php

@ -158,9 +158,12 @@ class Transmission implements Contracts\Applications, Contracts\Livestats
private function getApiUrl() private function getApiUrl()
{ {
$url = $this->config->url; $config = $this->config;
$url = $config->url;
$url = rtrim($url, '/'); $url = rtrim($url, '/');
$apiUrl = $url.'/transmission/rpc'; $api_url = $url.'/transmission/rpc';
return $apiUrl;
return $api_url;
} }
} }

4
resources/views/supportedapps/transmission.blade.php

@ -2,6 +2,10 @@
<div class="items"> <div class="items">
<input type="hidden" name="config[enabled]" value="1" /> <input type="hidden" name="config[enabled]" value="1" />
<input type="hidden" data-config="type" class="config-item" name="config[type]" value="\App\SupportedApps\Transmission" /> <input type="hidden" data-config="type" class="config-item" name="config[type]" value="\App\SupportedApps\Transmission" />
<div class="input">
<label>{{ strtoupper(__('app.url')) }}</label>
{!! Form::text('config[override_url]', null, array('placeholder' => __('app.apps.override'), 'id' => 'override_url', 'class' => 'form-control')) !!}
</div>
<div class="input"> <div class="input">
<label>{{ __('app.apps.username') }}</label> <label>{{ __('app.apps.username') }}</label>
{!! Form::text('config[username]', null, array('placeholder' => __('app.apps.username'), 'data-config' => 'username', 'class' => 'form-control config-item')) !!} {!! Form::text('config[username]', null, array('placeholder' => __('app.apps.username'), 'data-config' => 'username', 'class' => 'form-control config-item')) !!}

Loading…
Cancel
Save