Issue 35: Find best series match in tv_shows_post_path_mode
Status:  Fixed
Owner:
Closed:  Jan 2012
Project Member Reported by login...@gmail.com, Dec 11, 2011
§§§§§§§§§§§§§§§§§§§§§§§§§§
tv_shows_post="no"
tv_shows_post_path="/share/Video/Series"
tv_shows_post_path_mode="sss"
tv_shows_fix_numbering="yes"
repack_handling="no"
§§§§§§§§§§§§§§§§§§§§§§§§§§

What steps will reproduce the problem?
/share/Apps/TorrentExpander/bin/torrentexpander.sh /share/Download/The.Big.Bang.Theory.4x21.avi

What is the expected output? 
/share/Download/Expanded/The Big Bang Theory/Season 04/The Big Bang Theory S04E21.avi

What do you see instead?
/share/Download/Expanded/The Big Bang Theory S04E21.avi

Additional problem:
ls -al /share/Video/Series/
drwxr-xr-x    3 root     root          4096 Dec 11 10:34 The Big Bang Theory

Dec 11, 2011
Project Member #2 login...@gmail.com
What is the expected output? 
/share/Download/Expanded/The Big Bang Theory/Season 04/The Big Bang Theory S04E21.jpg
/share/Download/Expanded/The Big Bang Theory/Season 04/The Big Bang Theory S04E21.fanart.jpg
Dec 11, 2011
Project Member #3 addicted...@gmail.com
IMDB search feature is only available for movies. It will remain that way until we find the best approach when it comes to TV series. IMDB may not be the best choice when it comes to new TV shows and episode summaries.

§§§§§§§§§§§§§§§§§§§§§§§§§§
tv_shows_post="copy"
tv_shows_post_path="/share/Video/Series"
tv_shows_post_path_mode="sss"
tv_shows_fix_numbering="yes"
repack_handling="no"
§§§§§§§§§§§§§§§§§§§§§§§§§§

/share/Apps/TorrentExpander/bin/torrentexpander.sh /share/Download/The.Big.Bang.Theory.4x21.avi

Expected result is
/share/Download/Expanded/The Big Bang Theory/Season 04/The Big Bang Theory S04E21.avi
and also
/share/Video/Series/The Big Bang Theory/Season 04/The Big Bang Theory S04E21.avi

But if a specific series folder exists and is not written exactly the same way, depending on what the name of the folder, results may also be :
/share/Video/Series/Big Bang Theory/Season 04/The Big Bang Theory S04E21.avi
/share/Video/Series/big bang theory/Season 04/The Big Bang Theory S04E21.avi
/share/Video/Series/Big Bang Theory 2007/Season 04/The Big Bang Theory S04E21.avi
/share/Video/Series/The Big Bang Theory 2007/Season 04/The Big Bang Theory S04E21.avi
If no approximate match is found, the script will then switch back to 
/share/Video/Series/The Big Bang Theory/Season 04/The Big Bang Theory S04E21.avi
Dec 11, 2011
Project Member #5 login...@gmail.com
Ok, i have never tryed before series scan. So IMDB implementation it's not a bug. (But is a future request, lol)

But tv_shows_post_path_mode="sss" works only if tv_shows_post="copy" ? I think it may work even if tv_shows_post="no". It's a bug or not?

I have also tryed intelligent recognition, it' very good and is working. 
Improvements:

-> Always Capitalize output series folder.

GOOD: /share/Video/Series/Big Bang Theory/
BAD: /share/Video/Series/big bang theory/
BAD+: /share/Video/Series/Big bang Theory/

-> 'Series part' of episode's name must match series folder name  :
(A.K.A. The output files must be renamed according existing directory)

GOOD: /share/Video/Series/The Big Bang Theory/Season 04/The Big Bang Theory S04E21.avi
BAD: /share/Video/Series/The Big Bang Theory/Season 04/Big Bang Theory 2007 S04E21.avi
Dec 11, 2011
Project Member #6 addicted...@gmail.com
tv_shows_post_path_mode="s", "ss" or "sss" is only used in tv_shows_post="copy" or "move" mode. This is not a bug and I intend to keep it that way due to the way the script workflow is designed.

Capitalization will always be there if torrentexpander creates the series folder. If the series folder is already there, torrentexpander will do its best to find it.

Matching the series folder name would be the next step, but first we'll need to make sure torrentexpander always picks up the right match.
Summary: Find best series match in tv_shows_post_path_mode
Labels: -Type-Defect -Priority-Critical Type-Enhancement Priority-Medium
Dec 11, 2011
Project Member #7 login...@gmail.com
OK.
Jan 5, 2012
Project Member #8 login...@gmail.com
I suspect that this user has permission problem listed on comment 1 under 'Additional problem'

http://www.networkedmediatank.com/showthread.php?tid=57935
Jan 5, 2012
Project Member #9 addicted...@gmail.com
You're probably right
Looks like files moved by torrentexpander inherited permissions issues from folders created previously
Torrentexpander can only solve that when run by root

This means we'll need to replace these lines in the installer
mkdir /share/Download/Expanded -m 777
mkdir /share/Video/Movies -m 777
mkdir /share/Video/Series -m 777
by
mkdir -p /share/Download/Expanded
chmod -R 777 /share/Download/Expanded
chown -R nmt:nmt /share/Download/Expanded
mkdir -p /share/Video/Movies
chmod -R 777 /share/Video/Movies
chown -R nmt:nmt /share/Video/Movies
mkdir -p /share/Video/Series
chmod -R /share/Video/Series
chown -R nmt:nmt /share/Video/Series

Also I just noticed the chown nmt:nmt applied to these directories. chown -R should be used instead

What's weird is that unless Transmission was run by the root user, then torrentexpande shouldn't have been able to write to these directories
Jan 5, 2012
Project Member #10 login...@gmail.com
The user has not this bug. Script edited.

chmod -R /share/Video/Series ?? (missing 777 ?)
Jan 5, 2012
Project Member #11 login...@gmail.com
Opened  Issue 43  to focus on this bug.
Jan 5, 2012
Project Member #12 login...@gmail.com
(No comment was entered for this change.)
Status: Fixed