Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid filename characters in episode titles causes renaming to fail #59

Closed
IrishPrime opened this issue Feb 12, 2018 · 0 comments
Closed
Assignees
Labels

Comments

@IrishPrime
Copy link
Owner

Traceback (most recent call last):
  File "/home/irish/.local/bin/nielsen", line 11, in <module>
    load_entry_point('Nielsen==1.0.3', 'console_scripts', 'nielsen')()
  File "/home/irish/.local/lib/python3.6/site-packages/Nielsen-1.0.3-py3.6.egg/nielsen/api.py", line 266, in main
  File "/home/irish/.local/lib/python3.6/site-packages/Nielsen-1.0.3-py3.6.egg/nielsen/api.py", line 184, in process_file
FileNotFoundError: [Errno 2] No such file or directory: 'Brooklyn Nine-Nine/Season 02/Brooklyn.Nine-Nine.S02E20.HDTV.x264-ASAP.mp4' -> 'Brooklyn Nine-Nine/Season 02/Brooklyn Nine-Nine -02.20- AC/DC.mp4'

The forward slash in the episode title (AC/DC) causes the file rename operation to fail because a filename cannot have a path separator character in it. Invalid filename characters should be filtered in some way, either by removing them or replacing them with a different character (a hyphen would probably be fine in nearly all circumstances).

@IrishPrime IrishPrime added the bug label Feb 12, 2018
@IrishPrime IrishPrime self-assigned this Feb 12, 2018
IrishPrime added a commit that referenced this issue May 19, 2018
- Add `nielsen.filter_filename()` to replace any characters which cannot
  appear in a filename (based on the operating system) with hyphens.
- Add a test for `nielsen.filter_filename()`.
- Replace instances of `file_name` with `filename` for consistency.
- Use quotes more consistently throughout.
- Resolves #59.
IrishPrime added a commit that referenced this issue May 19, 2018
- Add `nielsen.filter_filename()` to replace any characters which cannot
  appear in a filename (based on the operating system) with hyphens.
- Add a test for `nielsen.filter_filename()`.
- Replace instances of `file_name` with `filename` for consistency.
- Use quotes more consistently throughout.
- Resolves #59.
IrishPrime added a commit that referenced this issue Feb 23, 2019
- Add `nielsen.filter_filename()` to replace any characters which cannot
  appear in a filename (based on the operating system) with hyphens.
- Add a test for `nielsen.filter_filename()`.
- Replace instances of `file_name` with `filename` for consistency.
- Use quotes more consistently throughout.
- Resolves #59.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant