Repository: pymedusa/Medusa

Issue:
When adding a new existing show, Default EP Status selection not respected and not doing initial scan of files
**Describe the bug**
When adding a new existing show (have the files already in a folder) via home page > Shows > Add Shows > Add Existing Shows there are a couple issues that have cropped up recently. This used to work without these problems in previous versions, but I have noticed them recently, perhaps starting with v0.5.0 and the new method to add shows. 

The first is that the "Status for all future episodes" option is not being respected. I have it set for "Wanted" but the show always gets added with that option set to "Skipped". I have tried this multiple times and it happens every time.

The other thing that I've noticed is that it does not kick off an auto-scan/refresh of the files when it adds the show. I don't know if that is intentional, but it used to do a file refresh when adding an existing show so you could see your files in there immediately.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to home page > Shows > Add Shows > Add Existing Shows
2. Find a show to add, click Add and follow the prompts. When asked for the "Status for all future episodes" option, select Wanted and optionally set that as your default
3. Finish adding the show, then go back to the home page, find the show, and click on it to see the show's page
4. Notice that a) the Default EP Status is set to Skipped, rather than Wanted as had been selected in the Add dialogue and b) a file scan/refresh is not run so your files are not initially imported and you have to run a Re-scan Files manually to see them

**Expected behavior**
I'd expect the Default EP Status to be set to Wanted since that is what I select in the Add Show dialogue. By having it set to Skipped, people are going to miss grabbing new episodes unless they notice and change it manually in the show's settings themselves.

I also expect, when adding an existing show where you are already expected to have at least some of the files there, for the initial creation of the show to import said files into medusa.

**Screenshots**
If applicable, add screenshots to help explain your problem.
![image](https://user-images.githubusercontent.com/11891866/103071370-1039ed80-4589-11eb-8316-43fc60017ea9.png)

![image](https://user-images.githubusercontent.com/11891866/103071506-568f4c80-4589-11eb-8612-91480f2b167d.png)


**Medusa (please complete the following information):**
 - OS: Linux-4.19.107-Unraid-x86_64-with => unRAID v6.8.3 using docker container by linuxserver.io
 - Branch: master
 - Commit: 918cfe7ce01808499585ffe6c1356fd5ed369f76
 - Version: 0.5.1
 - Python version: 3.8.5 (default, Jul 20 2020, 23:11:29) [GCC 9.3.0]
 - Database version: 44.17

**Debug logs (at least 50 lines):**
General > Advanced Settings > Enable debug
<details>

```
2020-12-24 01:40:51 INFO	SHOWQUEUE-ADD :: [918cfe7] Building internal name cache for Attention Please
2020-12-24 01:40:51 INFO	SHOWQUEUE-ADD :: [918cfe7] Finished processing 3448 scene exceptions.
2020-12-24 01:40:51 INFO	SHOWQUEUE-ADD :: [918cfe7] Updating exception_cache and exception_season_cache
2020-12-24 01:40:51 INFO	SHOWQUEUE-ADD :: [918cfe7] Cache check completed
2020-12-24 01:40:49 INFO	SHOWQUEUE-ADD :: [918cfe7] Could not find any banner images on TMDB for Attention Please
2020-12-24 01:40:49 INFO	SHOWQUEUE-ADD :: [918cfe7] Selected poster for series 84745 (score=0.8513656979257314, score_bay=0.7027313958514626, rating=1, votes=1, res=680x1000): https://www.thetvdb.com/banners/posters/84745-1.jpg
2020-12-24 01:40:49 INFO	SHOWQUEUE-ADD :: [918cfe7] Selected fanart for series 84745 (score=1.0, score_bay=1.0, rating=1, votes=1, res=1920x1080): https://www.thetvdb.com/banners/fanart/original/84745-1.jpg
2020-12-24 01:40:48 INFO	SHOWQUEUE-ADD :: [918cfe7] 84745: Updating NFOs for show with new indexer info
2020-12-24 01:40:48 INFO	SHOWQUEUE-ADD :: [918cfe7] Setting all previously aired episodes to the specified status: Skipped
2020-12-24 01:40:44 INFO	SHOWQUEUE-ADD :: [918cfe7] 84745: Unable to find the show in the database
2020-12-24 01:40:44 INFO	SHOWQUEUE-ADD :: [918cfe7] Starting to add show by show_dir: /tv/tv shows/Attention Please
2020-12-24 01:39:29 INFO	APIv2-Thread-2 :: [918cfe7] Broken providers found: ['']
2020-12-24 01:26:12 INFO	SEARCHQUEUE-DAILY-SEARCH :: [918cfe7] No needed episodes found
2020-12-24 01:26:12 INFO	SEARCHQUEUE-DAILY-SEARCH :: Zooqle :: [918cfe7] Ignoring LEGO.Star.Wars.The.Freemaker.Adventures.S01E11.720p.WEB-DL.x264 based on required words filter: ['TVSmash']
2020-12-24 01:26:12 INFO	SEARCHQUEUE-DAILY-SEARCH :: Zooqle :: [918cfe7] Episodes [11] of season 1 are needed with this quality for LEGO Star Wars
2020-12-24 01:26:12 INFO	SEARCHQUEUE-DAILY-SEARCH :: Zooqle :: [918cfe7] Quality of LEGO.Star.Wars.The.Freemaker.Adventures.S01E11.720p.WEB-DL.x264 is 720p WEB-DL
2020-12-24 01:26:12 INFO	SEARCHQUEUE-DAILY-SEARCH :: Zooqle :: [918cfe7] Ignoring LEGO.Star.Wars.The.Freemaker.Adventures.S01E11.720p.WEB-DL.x264 based on required words filter: ['TVSmash']
2020-12-24 01:26:12 INFO	SEARCHQUEUE-DAILY-SEARCH :: Zooqle :: [918cfe7] Episodes [11] of season 1 are needed with this quality for LEGO Star Wars
2020-12-24 01:26:12 INFO	SEARCHQUEUE-DAILY-SEARCH :: Zooqle :: [918cfe7] Quality of LEGO.Star.Wars.The.Freemaker.Adventures.S01E11.720p.WEB-DL.x264 is 720p WEB-DL
2020-12-24 01:26:12 INFO	SEARCHQUEUE-DAILY-SEARCH :: Zooqle :: [918cfe7] Ignoring LEGO.Star.Wars.The.Freemaker.Adventures.S01E11.720p.WEB-DL.x264 based on required words filter: ['TVSmash']
2020-12-24 01:26:12 INFO	SEARCHQUEUE-DAILY-SEARCH :: Zooqle :: [918cfe7] Episodes [11] of season 1 are needed with this quality for LEGO Star Wars
2020-12-24 01:26:12 INFO	SEARCHQUEUE-DAILY-SEARCH :: Zooqle :: [918cfe7] Quality of LEGO.Star.Wars.The.Freemaker.Adventures.S01E11.720p.WEB-DL.x264 is 720p WEB-DL
2020-12-24 01:26:12 INFO	SEARCHQUEUE-DAILY-SEARCH :: Zooqle :: [918cfe7] Ignoring LEGO.Star.Wars.The.Freemaker.Adventures.S01E11.720p.WEB-DL.x264 based on required words filter: ['TVSmash']
```
</details>

**Additional context**
Add any other context about the problem here.



Discussion:
So this is only Reproducable when using addExisting. Not when you use addNew? 
Tried adding new show:

![image](https://user-images.githubusercontent.com/11891866/103129290-d5ee5000-465d-11eb-999d-40205f56954b.png)

Appears to have the same issue, Default EP Status is set to Skipped.

![image](https://user-images.githubusercontent.com/11891866/103129349-0930df00-465e-11eb-8531-b5fc7b347754.png)

Of course there are no files to scan so can't say anything about that issue related to adding a new show.

Here are the debug logs from the add:

```
2020-12-25 03:04:35 INFO	SHOWQUEUE-ADD :: [918cfe7] Building internal name cache for Bridgerton
2020-12-25 03:04:35 INFO	SHOWQUEUE-ADD :: [918cfe7] Finished processing 3450 scene exceptions.
2020-12-25 03:04:35 INFO	SHOWQUEUE-ADD :: [918cfe7] Updating exception_cache and exception_season_cache
2020-12-25 03:04:35 INFO	SHOWQUEUE-ADD :: [918cfe7] Cache check completed
2020-12-25 03:04:27 INFO	SHOWQUEUE-ADD :: [918cfe7] Selected poster for series 366668 (score=1.5887611253357434, score_bay=2.177522250671487, rating=3, votes=3, res=680x1000): https://www.thetvdb.com/banners/series/366668/posters/5fa12abed5681.jpg
2020-12-25 03:04:27 INFO	SHOWQUEUE-ADD :: [918cfe7] Selected fanart for series 366668 (score=1.22517332456842, score_bay=1.45034664913684, rating=2, votes=2, res=1920x1080): https://www.thetvdb.com/banners/series/366668/backgrounds/5fa12a6a662c5.jpg
2020-12-25 03:04:26 INFO	SHOWQUEUE-ADD :: [918cfe7] 366668: Updating NFOs for show with new indexer info
2020-12-25 03:04:21 INFO	SHOWQUEUE-ADD :: [918cfe7] Setting all previously aired episodes to the specified status: Skipped
2020-12-25 03:04:16 INFO	SHOWQUEUE-ADD :: [918cfe7] 366668: Unable to find the show in the database
2020-12-25 03:04:16 INFO	SHOWQUEUE-ADD :: [918cfe7] Starting to add show by Indexer Id: 366668
```

Resolving patch:
diff --git a/medusa/queues/show_queue.py b/medusa/queues/show_queue.py
--- a/medusa/queues/show_queue.py
+++ b/medusa/queues/show_queue.py
@@ -439,7 +439,7 @@ def message_step(new_step):
                 series.load_episodes_from_indexer(tvapi=api)
                 # If we provide a default_status_after through the apiv2 series route options object.
                 # set it after we've added the episodes.
-                self.default_ep_status = self.options['default_status_after'] or app.STATUS_DEFAULT_AFTER
+                series.default_ep_status = self.options['default_status_after'] or app.STATUS_DEFAULT_AFTER
 
             except IndexerException as error:
                 log.warning('Unable to load series episodes from indexer: {0!r}'.format(error))


Test patch: