# Naruto not recognized as series

**URL:** <https://forums.plex.tv/t/naruto-not-recognized-as-series/63512>\
**Category:** Dev/API Corner\
**Tags:** scanner-agent-dev\
**Created:** [April 13, 2014, 3:43pm UTC](https://forums.plex.tv/t/naruto-not-recognized-as-series/63512 "2014-04-13T15:43:44Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xa3r0](https://avatars.discourse-cdn.com/v4/letter/x/c77e96/32.png) [@Xa3r0](https://forums.plex.tv/u/Xa3r0)\
**Post date:** [April 13, 2014, 3:43pm UTC](https://forums.plex.tv/t/naruto-not-recognized-as-series/63512/1 "2014-04-13T15:43:44Z")

</div>

Hi there,

&nbsp;

I recently tried to add my Naruto Shippuden episodes to Plex, but somehow it doesn't work. When I create a new library TV-Shows, then it doesn't recognize any of the episodes. But somehow it recognizes them when I create a library movies. Is that correct? I don't really think so...because in this way I can't use BABS because of the number of episodes.

&nbsp;

My episodes are named in this way:

&nbsp;

"Naruto Shippuuden 003 - Results of Training.avi"

&nbsp;

Do I have to rename the episodes so that they count as a tv-show?

---

<div class="post-metadata">

**Author:** ![sander1](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@sander1](https://forums.plex.tv/u/sander1)\
**Post date:** [April 13, 2014, 5:07pm UTC](https://forums.plex.tv/t/naruto-not-recognized-as-series/63512/2 "2014-04-13T17:07:39Z")

</div>

Hi!

Yes, you have to rename the folder/files so they can be used as a TV series.

[Naming Series Based TV Shows](https://plexapp.zendesk.com/hc/en-us/articles/200220687-Naming-Series-Based-TV-Shows)

Another forum topic specifically about this TV show with useful information: [https://forums.plex.tv/topic/71151-episodes-of-one-series-going-into-another-and-disappearing/](https://forums.plex.tv/topic/71151-episodes-of-one-series-going-into-another-and-disappearing/)

---

<div class="post-metadata">

**Author:** ![Xa3r0](https://avatars.discourse-cdn.com/v4/letter/x/c77e96/32.png) [@Xa3r0](https://forums.plex.tv/u/Xa3r0)\
**Post date:** [April 13, 2014, 5:57pm UTC](https://forums.plex.tv/t/naruto-not-recognized-as-series/63512/3 "2014-04-13T17:57:40Z")

</div>

Ok, it's working now, thx a lot ;)

Just created some folders for the different seasons, it's working now.

Btw: The 2nd link didn't work :( No permission to access that forum

---

<div class="post-metadata">

**Author:** ![Jumbs](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/jumbs/32/11011_2.png) [@Jumbs](https://forums.plex.tv/u/Jumbs)\
**Post date:** [June 29, 2014, 11:37pm UTC](https://forums.plex.tv/t/naruto-not-recognized-as-series/63512/4 "2014-06-29T23:37:12Z")

</div>

A snippet of bash code i threw together to help myself. It doesnt do all the work, but it does most. &nbsp;It is not perfect, but it saved me hours of renaming, and the metadata came in after.

&nbsp;

Look up the seasons on TheTVDB, put them all into their own temp folders.

Then you can run the script on the folder.

&nbsp;

You tell the script the season, how far in to the file name ("\_" as the split) to place the season (and episode offset if needed). It will then go through the folder adding in SXXEXX to the files.

It will replace spaces with \_ so you dont have to worry.

&nbsp;

So if you ran the script on a folder with:

[GROUP]\_Anime\_Name\_123\_[Numbers].mp4

[GROUP]\_Anime\_Name\_124\_[Numbers].mp4

[GROUP]\_Anime\_Name\_125\_[Numbers].mp4

[GROUP]\_Anime\_Name\_126\_[Numbers].mp4

&nbsp;

with

&nbsp;

aniname 11 3 4

&nbsp;

It would change the files to

&nbsp;

[GROUP]\_Anime\_Name\_S11E04\_123\_[Numbers].mp4

[GROUP]\_Anime\_Name\_S11E05\_124\_[Numbers].mp4

[GROUP]\_Anime\_Name\_S11E06\_125\_[Numbers].mp4

[GROUP]\_Anime\_Name\_S11E07\_126\_[Numbers].mp4

&nbsp;

&nbsp;

**NOTE:**

**If there are double episodes, you will have to break there, do those&nbsp;separate, then run again with the offset.**

**If some files have a different number of &nbsp;"leading name chunks" before the drop point, you will have to do those&nbsp;separate&nbsp;as well&nbsp;**

&nbsp;

```
#!/bin/bash

#Input season like “01” or “11”  
season=$1

#If a start point isnt provided, starts at episode 1  
if [$# -eq 3]  
then  
num=$3  
else  
num=1  
fi

breakloc=$2  
declare -i breakloc  
declare -i num

#Replaces spaces with underscores in all files  
for i in \*  
do

```
CleanFile=`echo $i | sed 's/ /_/g'` 
diff <(echo "$i" ) <(echo "$CleanFile") >> /dev/null
if [$? -ne 0] ; then
	mv "$i" $CleanFile
fi

```

done

#Loops through all files folder script is executed from  
for i in \*  
do  
#Adds a trailing 0 to episode number if needed  
wordnum=`printf "%02d" $num`

```
#Breaks episode name into an array based on "_" as the split
IFS='_' 
read -ra ADDR <<< "$i"
IFS=' ' 

    Counter=0
declare -i Counter
newname=""

#Adds the pieces before the number to the new file name
    while [$Counter -lt $breakloc]
do
    	newname=${newname}${ADDR[$Counter]}_
    	let Counter=Counter+1 
    done

#Adds the Season and Episode Number
newname=${newname}S${season}E${wordnum}_

Counter=$breakloc
endname=${#ADDR[@]}
let endname=endname-1

#Adds the rest of the file name back in
while [$Counter -lt $endname]
do
    	newname=${newname}${ADDR[$Counter]}_
    	let Counter=Counter+1 
    done

#Adds the end of the file name without a trailing _
newname=${newname}${ADDR[$Counter]}

#Renames file
mv "$i" $newname

#Increments episode number for next file
num=$num+1

```

done
```

---

<div class="post-metadata">

**Author:** ![ResentedPoet](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@ResentedPoet](https://forums.plex.tv/u/ResentedPoet)\
**Post date:** [July 27, 2014, 1:07pm UTC](https://forums.plex.tv/t/naruto-not-recognized-as-series/63512/5 "2014-07-27T13:07:34Z")

</div>

> Ok, it's working now, thx a lot ;)
> 
> Just created some folders for the different seasons, it's working now.
> 
> Btw: The 2nd link didn't work :( No permission to access that forum

Hi,

What naming convention did you get to work with Plex for Naruto? I can't get Plex to recognize any of the 5 seasons right.&nbsp;

---

<div class="post-metadata">

**Author:** ![Jumbs](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/jumbs/32/11011_2.png) [@Jumbs](https://forums.plex.tv/u/Jumbs)\
**Post date:** [August 30, 2014, 10:54pm UTC](https://forums.plex.tv/t/naruto-not-recognized-as-series/63512/6 "2014-08-30T22:54:35Z")

</div>

I just compared it with TheTVDB site and matched the seasons into the file names

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [December 21, 2019, 1:50am UTC](https://forums.plex.tv/t/naruto-not-recognized-as-series/63512/7 "2019-12-21T01:50:28Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
