mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-04 18:09:12 +03:00
[Issue]: Special character [:] in OTA program guide title causes invalid path/file name error. #5637
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @chibiconsulting on GitHub (Apr 26, 2024).
Please describe your bug
OTA TV show names than include the [:] colon character cause recordings to fail on Samba file systems & probably other file systems as well with System.IO.IOException: Invalid argument.
Some recent examples include:
Law & Order: Organized Crime
Law & Order: Special Victims Unit
NCIS: Hawai'i
RFDS: Royal Flying Doctor Service
A quick web search on Samba invalid characters shows all of these problematic characters that should be removed from file paths and names in Samba file systems.
: colon
< less than
> greater than
“ double quote
/ forward slash
\ backslash
| vertical bar or pipe
? question mark
* asterisk
Additionally, these special characters are also listed as bad for Samba, but, do seem to work in show names. It is still possible these could cause issues elsewhere.
‘ single quote or apostrophe
! exclamation mark
I was not able to test all of these other characters with OTA shows; however, if any of these are present in a title, it would be possible to have failures.
A quick look at the code in Jellyfin-master/Emby.Naming/TV indicates that there are several parsers that seem to be dealing with handling naming of TV shows being recorded; (EpisodePathParser.cs, SeasonPathParser.cs, & SeriesPathParser.cs) and there is a section in each which already seems to deal with removing some special characters. Perhaps this could be a starting point to address these invalid characters.
Specifically:
EpisodePathParser.cs, Line 87
.Trim('_', '.', '-')SeasonPathParser.cs, Line 111:
var parts = filename.Split(new[] { '.', '_', ' ', '-' }, StringSplitOptions.RemoveEmptyEntries);SeriesPathParser.cs, Line 35:
result.SeriesName = result.SeriesName.Trim(' ', '_', '.', '-');Reproduction Steps
Initiate an OTA recording either by schedule or while watching the channel for a show name that includes the [:] colon character and the recording will fail with a System.IO.IOException: Invalid argument.
Jellyfin Version
10.8.13
if other:
No response
Environment
Jellyfin logs
FFmpeg logs
Please attach any browser or client logs here
N/A
Please attach any screenshots here
No response
Code of Conduct
@jellyfin-bot commented on GitHub (Apr 26, 2024):
Hi, it seems like your issue report has the following item(s) that need to be addressed:
This is an automated message, currently under testing. Please file an issue here if you encounter any problems.
@chibiconsulting commented on GitHub (Apr 30, 2024):
Here are the changes proposed:
EpisodePathParser.cs, Line 87
.Trim('_', '.', '-', ':', '<', '>', '|', '?', '*')SeasonPathParser.cs, Line 111:
var parts = filename.Split(new[] { '.', '_', ' ', '-', ':', '<', '>', '|', '?', '*' }, StringSplitOptions.RemoveEmptyEntries);SeriesPathParser.cs, Line 35:
result.SeriesName = result.SeriesName.Trim(' ', '_', '.', '-', ':', '<', '>', '|', '?', '*');Issue11442.tar.gz
@jellyfin-bot commented on GitHub (Aug 29, 2024):
This issue has gone 120 days without an update and will be closed within 21 days if there is no new activity. To prevent this issue from being closed, please confirm the issue has not already been fixed by providing updated examples or logs.
If you have any questions you can use one of several ways to contact us.
@felix920506 commented on GitHub (Sep 2, 2024):
If you already have an idea on how to fix it, please just open a PR.
@chibiconsulting commented on GitHub (Dec 18, 2024):
After testing with several Linux native format drives, it appears to only affect SAMBA shares so I have moved away from using SAMBA.
If anyone requires titles that do not work with SAMBA, the best work around would be to use XML to import the TV schedules and while processing the schedule in XML, remove any offending characters in titles that affect you.
For example, this simply removes the ":" character.
sed -i 's/NCIS:/NCIS/g' ota.xml
sed -i 's/Order:/Order/g' ota.xml