Go to file
2020-05-11 14:12:26 +02:00
gtk Change variable linux to unix_names 2020-04-16 15:11:46 +02:00
rapidjson@8f4c021fa2 Replace 3rd party libraries with submodules 2020-04-15 13:32:59 +00:00
sqlite-amalgamation@1757028edf Replace 3rd party libraries with submodules 2020-04-15 13:32:59 +00:00
tests Add tests and fix errors tests have discovered 2020-05-08 21:11:51 +00:00
translations CLI+GTK: show progress when cleaning database 2020-04-13 19:58:57 +02:00
unix Add tests and fix errors tests have discovered 2020-05-08 21:11:51 +00:00
win32 Restructure source tree 2020-04-16 15:02:33 +02:00
windows Add tests and fix errors tests have discovered 2020-05-08 21:11:51 +00:00
.clang-format Include sorting causes problems on windows 2020-04-15 11:45:10 +02:00
.gitignore Updated gitignore 2020-04-16 15:07:37 +02:00
.gitlab-ci.yml Add tests and fix errors tests have discovered 2020-05-08 21:11:51 +00:00
.gitmodules Replace 3rd party libraries with submodules 2020-04-15 13:32:59 +00:00
filesystem.hpp Add tests and fix errors tests have discovered 2020-05-08 21:11:51 +00:00
functions.cpp functions.cpp: fix linux dir divider being used instead of platform specific dir divider 2020-05-11 14:12:26 +02:00
functions.hpp Change variable linux to unix_names 2020-04-16 15:11:46 +02:00
LICENSE Guess I should set a license 2018-10-08 20:51:52 +00:00
main.cpp Use UTF-8 in windows console 2020-04-15 10:53:37 +02:00
Makefile Add tests and fix errors tests have discovered 2020-05-08 21:11:51 +00:00
network.hpp Slight code cleanup 2020-04-16 13:23:02 +02:00
progress.cpp Add tests and fix errors tests have discovered 2020-05-08 21:11:51 +00:00
progress.hpp Slight code cleanup 2020-04-16 13:23:02 +02:00
README.md Updated README 2020-05-10 00:51:16 +02:00
resources_linux.h CLI+GTK: show progress when cleaning database 2020-04-13 19:58:57 +02:00
resources_windows.h CLI+GTK: show progress when cleaning database 2020-04-13 19:58:57 +02:00
small.ico New icon 2019-05-18 13:45:36 +02:00
sqlitepp.hpp Remove useless variable declaration 2020-04-16 13:44:54 +02:00
tv_rename_gui.desktop Fix desktop file, add uninstall to Makefile 2019-05-18 15:05:06 +02:00
tv_rename_gui.ico New icon 2019-05-18 13:45:36 +02:00
tv_rename_stringtable.rc CLI+GTK: show progress when cleaning database 2020-04-13 19:58:57 +02:00
tv_rename.cpp Add tests and fix errors tests have discovered 2020-05-08 21:11:51 +00:00
tv_rename.hpp Add tests and fix errors tests have discovered 2020-05-08 21:11:51 +00:00
tv_rename.rc Resource and rc files make a triumphant return 2020-04-01 13:58:01 +02:00
tv_rename.svg Add desktop file for linux 2019-05-18 13:45:46 +02:00

pipeline status Codacy Badge Codacy Badge

Rename TV Show files

This program downloads information about TV show episodes from http://thetvdb.com and renames episode files according to supplied name pattern.

For this to work your file needs to contain the season and episode number (in accordance to thetvdb) in this format: S#E# (doesn't matter if lower or upper case)

Usage

You can either just rename files in a directory (this is done recursively, so you can enter a directory with multiple seasons, but all the files have to be from a single show). Or you can add a directory to local database, so when you add a new episode to the directory you just need to run database update for the file to be renamed.

Arguments:

-s, --show - Name of the show

-n, --season - Seasons to be renamed (numbers separated by space or 'all' for all seasons in the directory and sub directories)

-d, --dvd - use DVD ordering instead of aired ordering

-c, --correct-path - Don't ask if path is correct

-t, --trust - Don't prompt before changing file names

-x, --linux - Don't replace characters that are illegal in NTFS

-l, --lang - Language of the episode titles

--print_langs - Print available languages

--name-pattern - Pattern by which the files should be renamed

  • %filename - original filename
  • %show - show name from thetvdb
  • %epname - episode name from thetvdb
  • %season - season number, possible to specify leading 0 like this: %2season (number means how many leading zeros)
  • %episode - episode number, possible to specify leading 0 like this: %3season (number means how many leading zeros)

--db-add - Add path to database

--db-refresh - Refresh episode names for all paths in the database

--db-update - Check all paths in the database, if they contain new files, rename them

--db-name-pattern - Change name pattern used for files managed by the database

--db-clean - Remove deleted files from the database

--db-remove - Remove path from the database

Installation

For installation of command line version you'll need:

  • libcurl-dev (or your distro's equivalent)
  • sqlite-dev (or your distro's equivalent)
  • some sort of C++ compiler (clang++ for example)
  • make

When you have all prerequisites installed you need to do this sequence of commands:

git clone 'https://gitlab.com/zvon/tv_rename.git'
cd tv_rename_cpp
git submodule update --init
make
sudo make install

For installation of GUI version you'll need:

  • libcurl-dev (or your distro's equivalent)
  • sqlite-dev (or your distro's equivalent)
  • libgtkmm-dev (or your distro's equivalent)
  • some sort of C++ compiler (clang++ for example)
  • make

When you have all prerequisites installed you need to do this sequence of commands:

git clone 'https://gitlab.com/zvon/tv_rename_cpp'
cd tv_rename_cpp
git submodule update --init
make gui
sudo make install_gui

You can uninstall both versions by running either sudo make uninstall or sudo make uninstall_gui

3rd party libraries

This project uses the following 3rd party libraries: