Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Commits

Ticket #7535: mythrename uses wrong charset to update database. Files with some special chars not playable after that.

 

 

MythTV commits RSS feed   Index | Next | Previous | View Threaded


mythtv at cvs

Nov 10, 2009, 10:14 AM

Post #1 of 5 (815 views)
Permalink
Ticket #7535: mythrename uses wrong charset to update database. Files with some special chars not playable after that.

#7535: mythrename uses wrong charset to update database. Files with some special
chars not playable after that.
------------------------------------+---------------------------------------
Reporter: fgunni@… | Owner: ijr
Type: defect | Status: new
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: 0.22
Severity: medium | Mlocked: 0
------------------------------------+---------------------------------------
If you have as example german umlauts (ä,ö,ü,ß) in shows, and use
mythrename, the filenames get updated, but in the database it seems
mythrename uses the wrong charset (looks to me, when using iso and
displaying utf or other way round)

So for "ä" there will be "ä" in the database as basename in table
recorded.
Updating the table for every wrong char with some sql like folowing works
around that for me:

UPDATE `recorded` SET basename=replace(basename,'ä','ä') WHERE
`basename` LIKE '%ä%'
UPDATE `recorded` SET basename=replace(basename,'ü','ü') WHERE
`basename` LIKE '%ü%'
UPDATE `recorded` SET basename=replace(basename,'ß','ß') WHERE
`basename` LIKE '%ß%'
UPDATE `recorded` SET basename=replace(basename,'ö','ö') WHERE
`basename` LIKE '%ö%'

Solution: Charset handling should be corrected in mythrename.pl Dont know
anything of perl, otherwise i would sure make a patch.

--
Ticket URL: <http://svn.mythtv.org/trac/ticket/7535>
MythTV <http://www.mythtv.org/>
MythTV
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-commits


mythtv at cvs

Nov 10, 2009, 10:23 AM

Post #2 of 5 (768 views)
Permalink
Re: Ticket #7535: mythrename uses wrong charset to update database. Files with some special chars not playable after that. [In reply to]

#7535: mythrename uses wrong charset to update database. Files with some special
chars not playable after that.
------------------------------------+---------------------------------------
Reporter: fgunni@… | Owner: ijr
Type: defect | Status: new
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: 0.22
Severity: medium | Mlocked: 0
------------------------------------+---------------------------------------

Comment(by anonymous):

Oh. One additional Info. This helps only for mythfrontend. In mythweb the
files are still not playable.

--
Ticket URL: <http://svn.mythtv.org/trac/ticket/7535#comment:1>
MythTV <http://www.mythtv.org/>
MythTV
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-commits


mythtv at cvs

Nov 27, 2009, 10:59 AM

Post #3 of 5 (685 views)
Permalink
Re: Ticket #7535: mythrename uses wrong charset to update database. Files with some special chars not playable after that. [In reply to]

#7535: mythrename uses wrong charset to update database. Files with some special
chars not playable after that.
------------------------------------+---------------------------------------
Reporter: fgunni@… | Owner: mdean
Type: defect | Status: accepted
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: 0.22
Severity: medium | Mlocked: 0
------------------------------------+---------------------------------------
Changes (by mdean):

* owner: ijr => mdean
* status: new => accepted


--
Ticket URL: <http://svn.mythtv.org/trac/ticket/7535#comment:2>
MythTV <http://www.mythtv.org/>
MythTV
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-commits


mythtv at cvs

Feb 4, 2010, 2:46 PM

Post #4 of 5 (576 views)
Permalink
Re: Ticket #7535: mythrename uses wrong charset to update database. Files with some special chars not playable after that. [In reply to]

#7535: mythrename uses wrong charset to update database. Files with some special
chars not playable after that.
------------------------------------+---------------------------------------
Reporter: fgunni@… | Owner: mdean
Type: defect | Status: accepted
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: 0.22
Severity: medium | Mlocked: 0
------------------------------------+---------------------------------------

Comment(by mdean):

(In [23474]) Remove the file-renaming support from mythrename.pl. Trying
to automatically rename recording files based on listings-provided data is
causing problems and isn't really necessary. Instead of renaming files,
users should create symlink (with this script--to be renamed mythlink.pl
after this change) or FUSE-based (with contrib/exports/mythfs.py) views of
recordings. If there is any strong reason to support "human-readable"
file names, such support should probably be added to mythbackend.

After this change, mythrename.pl (soon to be mythlink.pl) with no
arguments will create pretty-formatted symlinks under the "show_names"
directory of the first storage group directory. Typically the program
will be called with the --link or --dest argument (as before) to specify a
destination for the symlinks. (However, this change means that the
default behavior of the script is non-destructive.)

The file-renaming support was changed to only support renaming files back
to their default file names and is only used when the --rename argument is
specified. Any --format argument is ignored when the --rename argument is
specified.

Though this change looks very invasive in the diff, it mostly just moved
the "else" handling renaming to its own subroutine and unshifted code that
was previously in an if conditional. Though the separate subroutine means
there is redundant code for setting up and looping over the recordings,
the structure will allow easy removal of the "rename to default" code
after a release version or so.

Refs #4932. Refs #7535.

--
Ticket URL: <http://svn.mythtv.org/trac/ticket/7535#comment:3>
MythTV <http://www.mythtv.org/>
MythTV
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-commits


mythtv at cvs

Feb 4, 2010, 3:02 PM

Post #5 of 5 (570 views)
Permalink
Re: Ticket #7535: mythrename uses wrong charset to update database. Files with some special chars not playable after that. [In reply to]

#7535: mythrename uses wrong charset to update database. Files with some special
chars not playable after that.
------------------------------------+---------------------------------------
Reporter: fgunni@… | Owner: mdean
Type: defect | Status: closed
Priority: minor | Milestone: 0.23
Component: MythTV - General | Version: 0.22
Severity: medium | Resolution: wontfix
Mlocked: 0 |
------------------------------------+---------------------------------------
Changes (by mdean):

* status: accepted => closed
* resolution: => wontfix
* milestone: unknown => 0.23


Comment:

After [23474], mythrename.pl no longer renames recording files (and after
23475 is called mythlink.pl). Safely supporting renaming files regardless
of system and file system configurations with all possible characters that
may appear in program listings is very difficult, and likely not worth the
effort as other (safer) options exist. Users should instead use symlink
(created with mythlink.pl) or FUSE-based (with
mythtv/contrib/exports/mythfs.py ) views of recordings files, rather than
renaming the actual files.

If you had previously renamed files, you may revert them to default file
names with: mythlink.pl --rename

--
Ticket URL: <http://svn.mythtv.org/trac/ticket/7535#comment:4>
MythTV <http://www.mythtv.org/>
MythTV
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-commits

MythTV commits RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.