[mythtv-users] Excellent mythvidexport.py - issue with national chars

Raymond Wagner raymond at wagnerrp.com
Sat May 28 03:38:58 UTC 2011


On 5/26/2011 06:16, warpme wrote:
> Hi *
>
> I manage to resolve above issue by adding converssion from UTF-8 to 8bit.
> Line 83
>
> '%s - %s' % (self.rec.title, self.rec.subtitle))
>
> is changed to
>
> '%s - %s' % (self.rec.title.encode('utf-8'), self.rec.subtitle.encode('utf-8')))
>
> It seems like now script can handle shows having non-ascii chars in title/subtitle without above error.
>

Unicode has always been a pain dealing with in Python.  I'll take a look 
at it this weekend.

> Good.
> Unfortunatelly another little thing pop-ups:
> I want to move show which has following
> title:
> "Finansowa Historia..."
>
> subtitle:
> "Finansowa historia świata: Chimerica, odc. 6"
>
> description:
> "Finansowa historia świata: Chimerica, odc. 6
> Tematem odcinka jest 'Chimerica', gospodarczy mariaż Chińskiej Republiki Ludowej i Stanów Zjednoczonych Ameryki."
>
> Script correctly updates videometadata but rec. file now has<jobid>.mpg filename and is copied not into video/Movies subdir but to root of video dir. Filename is not big problem, but file location is, as I have dedicated subdir in video for all contnet stored on externally attached USB drive (mythadder.py solution).
>
> Is it possible to modify script in way were files will be always stored in given (e.g. Movies/) dir ?

Mythvidexport.py was designed with three different modes.  There is a TV 
mode, a Movie mode, and a Generic mode, each with their own format 
strings for where they place content.  Recordings with subtitles are 
assumed to be TV shows, while recordings without are movies.  Since that 
recording has a subtitle, it is processed as a TV show.  In any case, 
since it does not exist in either TheTVDB.com or TheMovieDB.org, either 
mode would fail and fall through to the generic mode, which defaults to 
'Videos/%TITLE%'.  If you want it to fall through to 'Movies/', use the 
'--gformat' command line argument to store a new string.


More information about the mythtv-users mailing list