Repository: Flexget/Flexget

Issue:
transmission-rpc and "skip_files" option skipped everything
### Expected behaviour:
Only skipped the files in the list.

### Actual behaviour:
All files are skipped, thus the torrent is immediately put into seeding mode with no file selected. Removing the `skip_files` option resolved the issue.

This issue start after I updated flexget and it requires `transmission-rpc`. After uninstalling `transmissionrpc` and installed `transmission-rpc` this issue is seen because I have the `skip_files` option in `transmission`

### Steps to reproduce:
- Step 1: Add the following and run
```
    transmission:
      ratio: 0
      skip_files:
        - 'RARBG.mp4'
        - 'RARBG.txt'
        - 'RARBG.com.txt'
        - 'RARBG.COM.mp4'
        - 'RARBG.COM.txt'
        - 'RARBG.COM.exe'
        - '[sS]ample'
```

#### Config:
```
  transmissionRPC:
    transmission:
      host: '{? transmission.host ?}'
      port: '{? transmission.port ?}'
      username: '{? transmission.usr ?}'
      password: '{? transmission.pwd ?}'
      ratio: 0
      skip_files:
        - 'RARBG.mp4'
        - 'RARBG.txt'
        - 'RARBG.com.txt'
        - 'RARBG.COM.mp4'
        - 'RARBG.COM.txt'
        - 'RARBG.COM.exe'
        - '[sS]ample'
```
  
### Additional information:

- FlexGet version: 3.1.98
- Python version: 3.7.7
- Installation method: pip
- Using daemon (yes/no): yes
- OS and version: synology dsm 6


Discussion:
Hmm. Likely something I messed up when translating to the new api https://github.com/Flexget/Flexget/commit/ee4cbff2441be3038206b4f831c1d1839ddede96 Would be great if someone with transmission could troubleshoot.
Are you able to use python 3? Flexget 3 requires 3.6 or newer
> 
> 
> Are you able to use python 3? Flexget 3 requires 3.6 or newer

Ah sorry for my mistake. I'm running flexget with python 3.7.7. There are a few python versions installed in my DSM that I sometimes forget which one is used for flexget.

Resolving patch:
diff --git a/flexget/plugins/clients/transmission.py b/flexget/plugins/clients/transmission.py
--- a/flexget/plugins/clients/transmission.py
+++ b/flexget/plugins/clients/transmission.py
@@ -579,7 +579,7 @@ def on_task_output(self, task, config):
                     if options['post'].get('main_file_only') and main_id is not None:
                         # Set Unwanted Files
                         options['change']['files_unwanted'] = [
-                            x for x in file_list if x not in dl_list
+                            x for x in range(len(file_list)) if x not in dl_list
                         ]
                         options['change']['files_wanted'] = dl_list
                         logger.debug(
@@ -600,7 +600,7 @@ def on_task_output(self, task, config):
                         else:
                             options['change']['files_unwanted'] = skip_list
                             options['change']['files_wanted'] = [
-                                x for x in file_list if x not in skip_list
+                                x for x in range(len(file_list)) if x not in skip_list
                             ]
                             logger.debug(
                                 'Downloading {} of {} files in torrent.',


Test patch: