dbr/tvnamer — pull request #83 by averissimo (2013-09-12 17:44:16+00:00)
Title: One operation for renaming and file move & fixe for episodes without seasons

This will fix two bugs that were affecting me.

**1. Fallback to season 0 for episodes without a defined season**

For anime episodes that don't have a registered season it was returning a bug instead of falling back to no episode at all. This will fallback to season 0

**2. One step for renaming and moving**

If the configuration was set to rename and move files this would be done in a two step operation, first rename on the file's original directory and then move to the new path

This poses a problem when leaving symlinks behind as it would leave two symlinks in the original directory and a another symlink in the destination path (if run twice)

Example:
/original/path/Naruto Shippuuden - 323 [1080p].mkv

First run would result on (with always_move, leave_symlink and always_rename = true):
*(symlink)* /original/path/Naruto Shippuuden - 323 [1080p].mkv
*(symlink)* /original/path/Naruto Shippuuden - 323 - The Five Kage Assemble [1080p].mkv
(file) /new/path/Naruto Shippuuden - 323 [1080p].mkv

Second run would also create the following symlink:
*(symlink)* /new/path/Naruto Shippuuden - 323 - The Five Kage Assemble [1080p].mkv

ps. I wasn't able to separate these two pull requests after looking up documentation. If someone could show me how I can separate these