Automatically rename and move new TV Show Episode files?
#31
Lightbulb 
If you're looking for a platform-independent TV renamer with GUI, you should definitly check out FileBot:

http://filebot.sourceforge.net

Have a look at the project page for a list of features.
Reply
#32
rednoah Wrote:If you're looking for a platform-independent TV renamer with GUI, you should definitly check out FileBot:

http://filebot.sourceforge.net

Have a look at the project page for a list of features.

I'll try it out tonight! It does what I'm looking for, easy renaming and batch subtitle downloading.
Reply
#33
Hi all,

did you reach any results in this? I read through the thread, but some of the mentioned applications won't work for me because they won't run on Linux, some of them won't fit for me because have GUI, and I would need a tool that runs silently in the background.
Does anyone have a solution that can co-operate with Transmission?
Reply
#34
I've made a simple, free, Snow Leopard tool to help with tv series renaming called Transmogrifier. I built it to scratch my own mac-ish sorting ich, but hopefully some other people out there find it useful, too Smile

It works out as much about your shows as it can from the filename and lets you enter the rest.Once it's got enough information, it fills in the episode names using TVDB.

It can automatically refresh the folders it's watching whenever it starts, but it wont move things until you tell it to. I think this strikes a good middle ground, allowing you to quickly review the information it's filled in before renaming everything.

You can set it up to sort your episodes to whatever file / folder naming scheme you want, and can use the split source / destination folders to pull media out of your downloads directory and drop it somewhere nice.

If you use it, and have problems, and the inbuilt help doesn't address them, don't hesitate to email me - scott at amongstbits.com. This is very much a 'beta' tool at the moment, and I will endeavour to fix any bugs that show up.

cheers,

Scott
Reply
#35
I run a linux NAS on my hacked MediaSmart Server. Love it!!

I needed a similar solution, something to move/rename tv show files into the correct directory as they were downloaded so that XBMC could pick them up.

I wrote a perl script to do the job. You can download it here:
http://rapidshare.com/files/434771673/sort-shows.pl


Here is the info at the top of the script:

### sort-shows.pl
###
### Author: Brian Conklin ([email protected])
###
### This script will query the directory set below (DOWNLOAD_DIR) for any
### files that look like movies or tv shows. The files will then be
### renamed and moved to the respective vieo directory. After all files
### are moved/renamed, the script will tell XBMC to update its video library.
###
### Details:
###
### IDENTIFICATION:
### TV Shows are identified if they have the S##E## notation (season/episode)
### Movies are identified if they contain any of the following keywords:
### dvdrip xvid divx h264 x264
### and have an avi or mkv extension. Subtitle files (sub/srt) are moved also.
###
### MOVE:
### Files are moved to the directory specified below (TVSHOWS_DIR or MOVIES_DIR)
### TV Shows are moved to:
### TVSHOWS_DIR/{show_name}/{show_name} - {season}/{file}
### Movies are moved to:
### MOVIES_DIR/{file}
###
### RENAME:
### TV Show file names are normalized to be recognized by XBMC:
### special characters are removed
### capitalization changed to first character of each word
### extra whitespace removed
### spaces are converted to periods (.)
### rest of name (after S##E##) is left alone (this can contain useful info)
### Movies are not renamed, only moved.

Update: The link above is dead, here is a new link on github:
https://github.com/dralthiace/sort-shows.pl
Reply
#36
(2010-05-19, 13:37)eMBi Wrote: Hi all,

did you reach any results in this? I read through the thread, but some of the mentioned applications won't work for me because they won't run on Linux, some of them won't fit for me because have GUI, and I would need a tool that runs silently in the background.
Does anyone have a solution that can co-operate with Transmission?
FileBot is great on cmdline as well. This should do:
http://filebot.sourceforge.net/forums/vi...=215#p3380
Reply
#37
Hi,

I thought I'll share how my automated setup works.

I use ShowRSS to monitor new torrents I want and pushes it to Transmission to download.

When the torrent is done Transmission run the following script that sends a mail, move the downloaded file and do some sorting.

Code:
#!/bin/sh
#Transmission server
TRANSSERVER=10.0.0.1:9091
#Directory to move completed torrents to
MOVEDIR=/home/torrent/done
#Location of sorted TV shows
TVDIR=/mnt/data/series/
NAIL=/usr/bin/mailx
SMTP_SERVER=*****************
TO_ADDR=franwilder@*************

SUBJECT="Torrent Done!"
FROM_ADDR="transmission@**********"
TMPFILE=`mktemp -t transmission.XXXXXXXXXX`
echo "Transmission finished downloading \"$TR_TORRENT_NAME\" on $TR_TIME_LOCALTIME" >$TMPFILE
$NAIL -v -S from="$FROM_ADDR" -S smtp -s "$SUBJECT" -S smtp=$SMTP_SERVER "$TO_ADDR" < $TMPFILE
rm $TMPFILE

## We move the torrent to the done folder
mv /home/torrent/\"$TR_TORRENT_NAME\".* /home/torrent/done
torrent -t $TORRENTID –move $MOVEDIR

## Mail is  done, now lets remove teh torrent from transmission
/usr/local/bin/torrent -t $TR_TORRENT_ID -r

## Now lets move, sort, rename and all that..
## But first some sanity tests
if [ -d $TVDIR ]
then
/usr/bin/perl /home/torrent/sorttv/sorttv.pl --directory-to-sort=$MOVEDIR --tv-directory=$TVDIR
else
echo 'Directory not found!'
fi

I use SortTV to rename and move and all that shit.

The script is put together from pieces I found all over the web and some of it is original. Its's a bit messy and needs to be cleaned.
It calls a script /usr/local/bin/torrent, that can all be build into one script.
Code:
transmission-remote 10.0.0.1:9091 -n ******:******* $1 $2 $3 $4 $5


Feel free to use it, or comment.
Reply
#38
Hey,

Have you tried XBMC Media Move?

It's a small tool that does a pretty good job! :o)
-----
XBMC Media Move easily completes your Media Center automated system.
Website: http://sourceforge.net/projects/xbmcmediamove/
Reply
#39
I use this to automatic rename film and series to kodi, after donwload. I put this script in the config of transmission after a download is complete.
I'm french, so pick your translator to understand comment.
You can inpirate this and update this to your config

#!/bin/bash
# La variable TR_TORRENT_DIR est le répertoire dans lequel les torrents sont téléchargés (le répertoire caché)
# La variable TR_TORRENT_NAME est le nom du torrent.

TR_TORRENT_DIR="/home/user/Téléchargements"
serveur="kodi@raptor"
SERIEBIS="/mnt/DD_STOCK/Vidéos/Séries"
FILMBIS="/mnt/DD_STOCK/Vidéos/Films"
Type=$(file -bi $TR_TORRENT_DIR/"$TR_TORRENT_NAME")


if echo $Type | grep -q -e directory -e video || echo $TR_TORRENT_NAME | grep -e .mkv ; then

if echo $TR_TORRENT_NAME | grep '[sS][0-9][0-9][eE][0-9][0-9]' ; then

# Lissage du nom de la série et récupération du numero de la saison
Nom_Serie=$(echo "$TR_TORRENT_NAME"| sed 's/20.*//i')
Nom_Serie=$(echo "$Nom_Serie"| sed 's/19.*//i')
Nom_Serie=$(echo "$Nom_Serie"| sed 's/S0.*//i')
Nom_Serie=$(echo "$Nom_Serie"| sed 's/DVD.*//i')
Nom_Serie=$(echo "$Nom_Serie"| sed 's/VOST.*//i')
Nom_Serie=$(echo "$Nom_Serie"| sed 's/[(].*//i')
Nom_Serie=$(echo "$Nom_Serie"| sed 's/[[].*//i')
Nom_Serie=$(echo "$Nom_Serie"| sed 's/FRENCH.*//i')
Nom_Serie=$(echo "$Nom_Serie"| sed 's/TRUEFRENCH.*//i')
Nom_Serie=$(echo "$Nom_Serie"| sed 's/MULTI.*//i')
Nom_Serie=$(echo "$Nom_Serie"| sed 's/[.]/ /g')
Nom_Serie=$(echo "$Nom_Serie"| sed 's/^[\ ]*//;s/\s\+$//')
SAISON=$(echo $TR_TORRENT_NAME | grep -o 'S[0-9][0-9]E[0-9][0-9]')
SAISON=$(echo $SAISON | cut -c 3)
SAISON=$(expr $SAISON - 0)

# Création répertoire de la série ainsi que celui de la saison et copie du fichier
ssh $serveur "mkdir -p '$SERIEBIS/$Nom_Serie/Saison $SAISON'"
rsync "$TR_TORRENT_DIR/$TR_TORRENT_NAME" -av "$serveur:'$SERIEBIS/$Nom_Serie/Saison $SAISON/'"

else

# Lissage du nom du film
Nom_Film=$(echo "$TR_TORRENT_NAME"| sed 's/VOST.*//i')
Nom_Film=$(echo "$Nom_Film"| sed 's/DVD.*//i')
Nom_Film=$(echo "$Nom_Film"| sed 's/[(].*//i')
Nom_Film=$(echo "$Nom_Film"| sed 's/[)].*//i')
Nom_Film=$(echo "$Nom_Film"| sed 's/[[].*//i')
Nom_Film=$(echo "$Nom_Film"| sed 's/[]].*//i')
Nom_Film=$(echo "$Nom_Film"| sed 's/TRUEFRENCH.*//i')
Nom_Film=$(echo "$Nom_Film"| sed 's/FRENCH.*//')
Nom_Film=$(echo "$Nom_Film"| sed 's/MULTI.*//')
Nom_Film=$(echo "$Nom_Film"| sed 's/MULTi.*//')
Nom_Film=$(echo "$Nom_Film"| sed 's/FANSUB.*//i')
Nom_Film=$(echo "$Nom_Film"| sed 's/BDRIP.*//i')
Nom_Film=$(echo "$Nom_Film"| sed 's/x264.*//i')
Nom_Film=$(echo "$Nom_Film"| sed 's/1080.*//')
Nom_Film=$(echo "$Nom_Film"| sed 's/EXTENDED.*//')
Nom_Film=$(echo "$Nom_Film"| sed 's/REPACK.*//')
Nom_Film=$(echo "$Nom_Film"| sed 's/UNRATED.*//')
Nom_Film=$(echo "$Nom_Film"| sed 's/720.*//')
Nom_Film=$(echo "$Nom_Film"| sed 's/avi.*//')
Nom_Film=$(echo "$Nom_Film"| sed 's/[.]/ /g')
Nom_Film=$(echo "$Nom_Film"| sed 's/^[\ ]*//;s/\s\+$//')

# Création du répertoire du film et copie du fichier video
if echo $Type | grep -q -e video || echo $TR_TORRENT_NAME | grep -e .mkv ; then
ssh $serveur "mkdir -p '$FILMBIS/$Nom_Film'"
extension=$(echo $TR_TORRENT_NAME| grep -o '[.][a-z][a-z][0-9a-z]$')
rsync "$TR_TORRENT_DIR/$TR_TORRENT_NAME" -av "$serveur:'$FILMBIS/$Nom_Film/$Nom_Film$extension'"

else

# Copie du répertoire
rsync "$TR_TORRENT_DIR/$TR_TORRENT_NAME" -av "$serveur:'$FILMBIS/'"
ssh $serveur "mv '$FILMBIS/$TR_TORRENT_NAME' '$FILMBIS/$Nom_Film'"
# On renomme le fichier video à l'interieur du repertoire
find "$TR_TORRENT_DIR/$TR_TORRENT_NAME" -print | awk -F "/" '{print $6}' | while read namein
do
Typein=$(file -bi "$TR_TORRENT_DIR/$TR_TORRENT_NAME/$namein")
if echo $Typein | grep -q -e video || echo "$namein" | grep -e .mkv ; then
extension=$(echo $namein| grep -o '[.][a-z][a-z][0-9a-z]$')
ssh $serveur "mv '$FILMBIS/$Nom_Film/$namein' '$FILMBIS/$Nom_Film/$Nom_Film$extension'"
fi
done
fi
fi
fi
exit
Reply

Logout Mark Read Team Forum Stats Members Help
Automatically rename and move new TV Show Episode files?0