Project

General

Profile

Apostrophe Character in Recording Title (')

Added by Dave Gaspari over 2 years ago

The Apostrophe character does not seem to be coded properly in the Title of the Recording. Here is an example of the issue:

In guide.xml file:
-----------------
<title lang="en">America&apos;s Test Kitchen From Cook&apos;s Illustrated</title>

In Tvheadend:
------------
Tvheadend display's the title correctly on Electronic Program Guide tab and on Digital Video Recorder tab, the Title is displayed as, "America's Test Kitchen from Cook's Illustrated".

In File System (recording folder and file):
------------------------------------------
In the recordings folder, the title of the folder and the title of the file is shown as "America's Test Kitchen From Cook's Illustrated".

Setup:
-----
WebGrab+Plus is capturing EPG data from SchedulesDirect.org and saving tv listings in guide.xml. Tvheadend EPG Grabber Module is setup to use Internal XMLTV to read guide.xml via tv_grab_file. Under the Configuration/Recording/Digital Video Recorder Profiles, the Parameters window has the following format string for Full pathname specification: "$t/$t$-e$-s.$x". All this works fine, but as shown above, the folder name and file name of the recording seems to use a code for the apostrophe character. Is this a character escape issue? If so, is there a change I can make to one of the configuration files to fix it?

I spent a lot of time setting all this up and almost as much time again trying to figure out how to fix this one issue. Thanks for any suggestions.


Replies (4)

RE: Apostrophe Character in Recording Title (&apos;) - Added by Dave Gaspari over 2 years ago

Sorry: Under the heading in my post above, "In File System (recording folder and file), my typed text was re-coded by the forum software to show the "America's Test Kitchen From Cook's Illustrated" as a human would read it. In actuality, the issue is that the title for the folder and file has the ' in the folder name and filename. As if this question wasn't confusing enough. Frustrating.

RE: Apostrophe Character in Recording Title (&apos;) - Added by Hiro Protagonist over 2 years ago

It's not clear from your post what the problem is that you're trying to solve.

Have you tried 'Remove all unsafe characters from filename' in the recording profile?

RE: Apostrophe Character in Recording Title (&apos;) - Added by Dave Gaspari over 2 years ago

Sorry for the confusion. I have solved the issue on my own after some more research. I am using webgrab+plus to get TV listings for Tvheadend. The issue was that Schedules Direct provides tv listings with the apostrophe characters coded as &pos ; as shown in the title of this post. I was able to resolve the issue by adding a line to the site.init file for Schedules Direct that replaces the code with an actual apostrophe character.

Line Added to schedulesdirect.org.ini file:
------------------------------------------
index_title.modify {replace|'|'}

Now the TV Listings from Schedules Direct that are stored in the guide.xml file have the apostrophe character codes as ' just like we are used to seeing as humans :)

Good to go now.

RE: Apostrophe Character in Recording Title (&apos;) - Added by Dave Gaspari over 2 years ago

Correction:

Line Added to schedulesdirect.org.ini file:
------------------------------------------
index_title.modify {replace|&pos ;|'}

As I mentioned in my earlier reply, it has been extremely confusing to try and post about this issue because whenever I type the sequence of characters &pos ; on this forum, it gets converted to the apostrophe character '
That is why I had to post this correction for the line added to the schedulesdirect.org.ini file. Soooo, to be able to type up a description of the issue on this forum, I have typed &pos ; with an extra space between the s and ; characters. That space should not be there, but it is the only way I can post without the characters being converted to an apostrophe. If someone needs to use that line in their site.ini file, please remove the extra space. Geez, could this get any more confusing. Anyway, it's all good now.

    (1-4/4)