MS-144
---
**Test plan:**
1. import new title hierarchy - delete episode title - reimport with the same media item - ok(new episode is created and added to existing hierarchy)
2. delete season title - reimport the same csv - new season&episode titles are created, along with metadata, virtual folders and media items
3. delete series title - reimport the same csv - new series&season&episode titles are created, along with metadata, virtual folders and media items
4. import Feature Film title - delete - reimport the same csv - ok (new feature film title is created)
5. check metadata/virtual folders/media/tags are added to the new title
6. import csv with multiple rows for the same (deleted) title (feature film type, different media items) - title is recreated with all data from csv, no duplicates
7. delete media items - reimport csv with the same (deleted) media items - they are recreated/ingested (behaviour already existing in plugin)
---
**Current behaviour/limitations**:
- tags are not being updated, if existing media items are attached to the new title, for example
- metadata/virtual folders are recreated from scratch for the new title, using only csv data (no old info is kept)
- if the deleted title had media items attached, they must be in the csv in order to be added to the new title
- if season or series title is deleted, the children will remain orphan; when reimporting the csv, new titles are created (even if they have the same name as the deleted ones), so new children are created and added to the hierarchy. If the media items already exists and are attached to the first episode title, they are added to the new episode title at reimport.
e.g.
*Screenshots:*
[duplicate episodes](https://i.imgur.com/ed8mTlw.png)
[title hierarchy after deleting season & second import](https://i.imgur.com/Hdg13CA.png)
[first imported episode](https://i.imgur.com/thRSWIQ.png)
[delete series & reimport](https://i.imgur.com/C2zyMA9.png)
---