Skip to content

GoNamer is a powerful media file renaming tool that uses the TMDB API to automatically organize and rename your movie and TV show files based on accurate metadata.

License

Notifications You must be signed in to change notification settings

sametakofficial/GoNamer

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

66 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

This fork have improved these;

1 |

Include Not Fount Usage

If you make include_not_found value false, there will be litteraly no more questions when you run rename command

2 |

TV Shows Folder Structure

If you add folder insturcutions in your config.yml tvshow pattern, they will be implemented (like folder creation - changin folder), just like filebot's system. For example, if you make your TV Show and Movie pattern like this;

  patterns:
    movie: "/media/ProcessedMovies/{name} ({year})/{name} ({year}){extension}"
    tvshow: "/media/ProcessedSeries/{name}/Season {season}/{name} - S{season}E{episode}{extension}"

It will automaticly create folders that doesn't exist and move the episode or movie into existing or new created folder.

3 |

New function added to prevent same tmdb id episodes or movies (for example diffrent qualities or codecs etc.) to overwrite.

Now if a file name dublicates, it automaticly adds ...(1) / ...(2) to end of the file name. No logs yet, but there will be

4 |

New strategy added to improve intelligence of the scaning regex

For example if you put a file that has a name like "peaky.blinders.s01/peaky.blinders.episode.1.1080p.dpp5" , it will automaticly understand season and episode number.

5 |

You can now add delete_keywords value to the config.yml to apply the words you spesificly want to erase from the file name and help the algorithm to not understand them as episode or movie name

You can add your custom regex values like this;

scanner:  # delete_keywords will be under scanner config
  delete_keywords:
    - '1080p'
    - '720p'
    - '2160p'
    - '4K'
    - 'WEB[- ]?DL'
    - 'WEBDL'
    - 'BluRay'
    - 'BRRip'
    - 'DVDRip'
    - 'PROPER'
    - 'UHD'
    - '10bit'
    - 'HDTV'
    - 'BDRip'
    - 'Extended'
    - 'DDP[2-7]'
    - 'DD\+?5'
    - 'DD[2-7]'
    - 'DTS'
    - 'AC3'
    - 'AAC[0-9]?(\.[0-9])?'
    - 'Atmos'
    - 'H\.?264'
    - 'x264'
    - 'HEVC'
    - 'x265'
    - 'DUAL'
    - 'SPARKS'
    - 'TURG'
    - 'TRsub'
    - 'MAX'
    - 'iTunes'
    - 'CHD'
    - 'TR'
    - 'EN'
    - 'NF'
    - 'AMZN'
    - 'DSNP'
    - 'TOD'
    - 'EXXEN'
    - 'BLUTV'
    - 'Dublaj'
    - 'TR-EN'
    - 'x265'
    - 'AC3'
    - 'HEVC'
    - 'WEBRip'
    - 'xvid'
    - 'h265'
    - 'cam'
    - 'hdrip'
    - 'hdcam'
    - 'brrip'
    - 'mpeg'
    - 'rip'
    - 'rarbg'
    - 'yify'
    - '1080i'
    - '1080p'
    - '720i'
    - 'web-dl'
    - 'web'
    - 'bluray'
    - 'unrated'
    - 'multi'
    - 'dual-audio'
    - 'audiobook'
    - 'subbed'
    - 'dubbed'
    - 'hevc'
    - '3d'
    - 'brrip'
    - 'dvdscr'
    - 'dvdrip'
    - 'web-dl'
    - 'hdtv'
    - 'h264'

GoNamer

Go Report Card Go Reference Go Version License: MIT

Build Status Tests Lint Security

Release Issues Pull Requests Contributors Lines of Code Last Commit

GoNamer is a powerful media file renaming tool that uses the TMDB API to automatically organize and rename your movie and TV show files based on accurate metadata.

Features

  • ๐ŸŽฌ Automatic movie and TV show recognition
  • ๐Ÿ” Smart title detection with fuzzy matching
  • ๐Ÿ“บ Episode and season number detection
  • ๐ŸŽฏ TMDB API integration for accurate metadata
  • ๐Ÿ”„ Concurrent processing for better performance
  • ๐Ÿ’พ Integrated caching system
  • ๐Ÿ“ Customizable naming patterns
  • ๐Ÿš€ Dry-run mode for safe testing
  • ๐ŸŒ Multi-language support
  • ๐Ÿ”’ Safe renaming with conflict prevention

Installation

Using Go

go install github.com/nouuu/gonamer/cmd@latest

From Source

git clone https://github.com/nouuu/gonamer.git
cd gonamer
make install

Package Managers

Coming soon:

  • Homebrew
  • APT
  • RPM
  • AUR

Quick Start

  1. Set your TMDB API key:
export TMDB_API_KEY=your_api_key
  1. Run GoNamer:
gonamer /path/to/media

Configuration

GoNamer can be configured using environment variables or a configuration file (coming soon):

TMDB_API_KEY=your_key       # Required
MEDIA_PATH=./              # Path to scan
RECURSIVE=true            # Scan subdirectories
INCLUDE_NOT_FOUND=false  # Include unmatched files
DRY_RUN=true            # Test without renaming
MOVIE_PATTERN="{name} - {year}{extension}"
TVSHOW_PATTERN="{name} - {season}x{episode}{extension}"
TYPE=movie             # movie or tvshow
MAX_RESULTS=5         # Max suggestions per file
QUICK_MODE=false     # Skip confirmation

Usage Examples

Movies

# Scan movies with default pattern
gonamer /path/to/movies

# Custom pattern with dry run
DRY_RUN=true MOVIE_PATTERN="{name} ({year}){extension}" gonamer /movies

TV Shows

# Scan TV shows
TYPE=tvshow gonamer /path/to/shows

# Custom episode pattern
TVSHOW_PATTERN="{name} - S{season}E{episode} - {episode_title}{extension}" gonamer /shows

Development

Prerequisites

  • Go 1.22 or higher
  • Make
  • TMDB API key

Building

make build

Testing

make test

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'feat: Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Roadmap ๐Ÿ—บ๏ธ

โœ… Completed Features

  • Basic CLI interface
  • TMDB API integration
  • Movie renaming support
  • TV show renaming support
  • Environment-based configuration
  • Cache system with Ristretto
  • Concurrent file processing
  • Custom naming patterns
  • Interactive mode
  • Dry-run support

๐Ÿš€ Current Focus

  • Prepare for Github with CI implementation
    • Setup GitHub Actions workflows
    • Implement comprehensive testing
    • Add security checks
    • Configure automated releases
  • Migrate from .env to config.yml file
    • Design YAML configuration structure
    • Implement configs file loading
    • Add validation layer
  • Enhance CLI with Cobra framework
    • Migrate to Cobra commands
    • Add command documentation
    • Implement config path override
  • Improve TV Show Processing
    • Implement folder-based processing
    • Add season folder structure support
    • Improve episode detection

๐Ÿ”ฎ Future Improvements

  • Enhanced User Experience

    • Better suggestion selection UI
    • Progress bars for batch operations
    • Preview mode with detailed changes
    • Summary report after operations
  • ย Web interface

    • A better UI with web interface
  • Docker image ?

  • Advanced File Management

    • Cache for previously processed files
    • Handling of subtitle files
    • Support for multi-episode files
    • Automatic creation of season folders
  • Pattern System Enhancement

    • Visual pattern builder
    • More naming variables (quality, audio, etc.)
    • Per-folder pattern configuration
    • Pattern validation and testing
  • API Integration

    • Support for additional APIs (IMDB, TVMaze)
    • Automatic API failover
    • Better metadata matching
    • Extended language support

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Built with love using Go
  • Powered by TMDB API
  • Inspired by the need for better media organization

Made with โค๏ธ by nouuu

About

GoNamer is a powerful media file renaming tool that uses the TMDB API to automatically organize and rename your movie and TV show files based on accurate metadata.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 95.4%
  • Makefile 3.9%
  • Other 0.7%