Hey all, I have a set of TV seasons (seasons 1-4 and Specials), all of which are in TVDB. The seasons get named correctly in Plex, but the specials do not.
“Star Wars Rebels - S0E101 - Extended Preview.mp4” gets named “Episode 101” instead of the title in the filename like the seasons do. Does anyone know why this is?
Plex does not use the file name. It will use the title returned from TheTVDB based on the season and episode numbers you’ve used. The special “Extended Preview” is listed as episode 1 so you need to name your file “S00E01”, not 101.
In Settings > Server > Agents > Shows > TheTVDB > Local Media Assets is third. I changed this a while back to fix another importing issue.
Also, I’m not sure if this is related but I can’t add this series to another playlist I have. The playlist includes videos of recap shows originally from YouTube. I don’t get the option to add the videos to an existing playlist, just to create a new one.
Man that Plex Dance is silly and is a result of very lazy coding. Part of what the checksum can consist of is the file size before it goes into the database. Here’s an example -
FileName SHA-CheckSum Size
Name - S00E01 - Trailer.m4v cf0ae9bf1cb661f080e27852d6f4e1a483360084 637504942
Name - S00E01 - Trailer.m4v d87f8a91eb15524f0988a1d8f3ad071e3766b2d5 7712174
I don’t wanna get too technical, but in this example, the second file would be replaced by the first (like if a date comparison is later than the first). The scanner should do it by date if the filenames are the same, not by the checksum. It’s not a true checksum if the date and filesize aren’t generated within the checksum before it goes into the database. I hope that made sense.
Plex does not extract episode titles from the filenames, never has. If the episodes do not exist in TheTVDB, you will need to add the title manually. Or if your files are MP4, you can add the name to the embedded title tag.
The naming convention is “Show Name - SxEx - Optional text”. I don’t know if it was ever considered to use the “optional text” as the title for unmatched episodes. Might actually be a good idea.
I don’t why not since that’s the only way to title a TV special that isn’t listed in THETVDB.
I’d be happy to add the content to THETVDB, but I don’t know what their rules are for TV extras. I put the list at https://pastebin.com/iHVFTewL - it’s basically just broken down into the seasons with interviews, deleted scenes, extras, etc for each season.
In a way I’m surprised these aren’t listed in THETVDB since Lost is such a popular series to have in Plex. I’m more surprised why Plex can’t simply get the title from the filename if it’s not in THETVDB especially when the naming convention is followed. It recognizes the episode fine, but not the title.
don’t be surprised…
(a) TheTVDB is very restrictive when it comes to what content they consider a special. They list specials but not DVD extras… admittedly there can be a fine line and some shows appear to slip some extras through below their radar – but that’s rare exceptions.
(b) as per MovieFan.Plex’s comment… the documentation clearly states that everything after the sXXeYY part is optional text to help you recognize files more easily outside Plex. you wishing it’d do more isn’t just making it happen.
you’d be surprised what kind of crazy *** people put into those file names.
If you feel that strongly about it… check out the approach @sGarver proposed earlier in this thread (mp4/m4v w/ episode name embedded in the file metadata).
Do you know of any bulk metadata editors that will do that? (I.E., take everything from the 2nd “-” part in the filename and put it in the metadata title)
@DJQuad said:
I don’t why not since that’s the only way to title a TV special that isn’t listed in THETVDB.
The idea is that if it’s a real special,. it should be on TheTVDB. What you are trying to add are more like extras. Unfortunately, we don’t support extras for TV shows like we do for movies.
@DJQuad said:
Do you know of any bulk metadata editors that will do that? (I.E., take everything from the 2nd “-” part in the filename and put it in the metadata title)
There isn’t any tool I’m aware of.
@“MovieFan.Plex” said:
The idea is that if it’s a real special,. it should be on TheTVDB.
That idea is dumb. There are SO many TV series that we rip from DVDs, as it’s supposed to be, right? The DVDs like Lost, Rebels, The Clone Wars, Stargate, etc that have all sorts of specials/extras. Those are “real” are they not?
Other than editing the individual metadata for hundreds if not thousands of files, there’s no way to do it even if the naming convection is followed.
I just wrote a little script (mp4title) to do this for me:
#!/bin/bash
# usage: find . -iname '*.mp4' -exec ./mp4title "{}" \;
# checking metadata: ffmpeg -i in.mp4 -f ffmetadata in.txt
set -e
MP4=$1
TITLE=$(echo "${MP4}" | perl -pe 's/.*s\d+e\d+[-.\s]+(.*)\.mp4$/$1/i or die "Filename does not match pattern\n"')
TMPFILE=$(mktemp)
ffmpeg -i "${MP4}" -codec copy -metadata title="${TITLE}" -loglevel warning -y -f mp4 "${TMPFILE}"
mv "${MP4}" "${MP4}.orig"
mv "${TMPFILE}" "${MP4}"
chmod 0755 "${MP4}"
echo "Embedded '${TITLE}' in '${MP4}'"
It looks for a SnnEnn marker in the filename, strips spaces, dots, and dashes after it, and then uses the remaining string (without .mp4 extension) as the title. Everything is matched case-insensitively.
Tested on OS X (you need to install ffmpeg first, e.g. via homebrew):
$ find . -iname '*.mp4' -exec mp4title "{}" \;
Embedded 'More Info' in './test - S12E13 - More Info.MP4'
Embedded 'Optional Info' in './test.S1E2.Optional Info.mp4'