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

Mailing List Archive: MythTV: Commits

Ticket #6869: Subtitles not working for avi with multiple dots in filename

 

 

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


mythtv at cvs

Aug 19, 2009, 2:02 AM

Post #1 of 10 (1467 views)
Permalink
Ticket #6869: Subtitles not working for avi with multiple dots in filename

#6869: Subtitles not working for avi with multiple dots in filename
----------------------------------------------+-----------------------------
Reporter: Paul Kendall <paul [at] kcbbs> | Owner: ijr
Type: defect | Status: new
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: unknown
Severity: medium | Mlocked: 0
----------------------------------------------+-----------------------------
If you have an avi file such as a.b.avi and subtitle file a.b.srt, the
subtitle file is not found.

The code in revision [20879] has a small bug using the QFileInfo::baseName
instead of ::fileName. The docs for ::baseName say that it is up to the
first '.'. There is also code after that call to file the last '.', which
will then never be used.

Either use the ::baseName call passing 'true' and remove the magic remove
the extension or just call ::fileName.

--
Ticket URL: <http://svn.mythtv.org/trac/ticket/6869>
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

Aug 19, 2009, 2:10 AM

Post #2 of 10 (1385 views)
Permalink
Re: Ticket #6869: Subtitles not working for avi with multiple dots in filename [In reply to]

#6869: Subtitles not working for avi with multiple dots in filename
----------------------------------------------+-----------------------------
Reporter: Paul Kendall <paul [at] kcbbs> | Owner: ijr
Type: defect | Status: new
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: unknown
Severity: medium | Resolution:
Mlocked: 0 |
----------------------------------------------+-----------------------------

Comment(by Paul Kendall <paul [at] kcbbs>):

Looks like the ::baseName call with a parameter is no longer supported, so
the patch provided seems to be the best solution.

--
Ticket URL: <http://svn.mythtv.org/trac/ticket/6869#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

Aug 19, 2009, 3:09 AM

Post #3 of 10 (1380 views)
Permalink
Re: Ticket #6869: Subtitles not working for avi with multiple dots in filename [In reply to]

#6869: Subtitles not working for avi with multiple dots in filename
----------------------------------------------+-----------------------------
Reporter: Paul Kendall <paul [at] kcbbs> | Owner: danielk
Type: defect | Status: assigned
Priority: trivial | Milestone: unknown
Component: MythTV - General | Version: head
Severity: low | Resolution:
Mlocked: 0 |
----------------------------------------------+-----------------------------
Changes (by danielk):

* owner: ijr => danielk
* priority: minor => trivial
* version: unknown => head
* status: new => assigned
* severity: medium => low


Comment:

We want to continue strip at least the last extension, so the patch and
suggestions don't work. But if someone comes up with a patch that doesn't
break existing mythtv setups and allows multiple dots in the filename I'll
consider it. Should be easy enough with QString::lastIndexOf(".") &
QString::left() calls; just deal with the corner cases.

--
Ticket URL: <http://svn.mythtv.org/trac/ticket/6869#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

Aug 19, 2009, 3:21 AM

Post #4 of 10 (1385 views)
Permalink
Re: Ticket #6869: Subtitles not working for avi with multiple dots in filename [In reply to]

#6869: Subtitles not working for avi with multiple dots in filename
----------------------------------------------+-----------------------------
Reporter: Paul Kendall <paul [at] kcbbs> | Owner: danielk
Type: defect | Status: assigned
Priority: trivial | Milestone: unknown
Component: MythTV - General | Version: head
Severity: low | Resolution:
Mlocked: 0 |
----------------------------------------------+-----------------------------

Comment(by stuartm):

QString::section() with a negative (reverse search) would be the simplest
solution.

--
Ticket URL: <http://svn.mythtv.org/trac/ticket/6869#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

Aug 19, 2009, 9:44 PM

Post #5 of 10 (1361 views)
Permalink
Re: Ticket #6869: Subtitles not working for avi with multiple dots in filename [In reply to]

#6869: Subtitles not working for avi with multiple dots in filename
----------------------------------------------+-----------------------------
Reporter: Paul Kendall <paul [at] kcbbs> | Owner: danielk
Type: defect | Status: assigned
Priority: trivial | Milestone: unknown
Component: MythTV - General | Version: head
Severity: low | Resolution:
Mlocked: 0 |
----------------------------------------------+-----------------------------

Comment(by Paul Kendall <paul [at] kcbbs>):

Actually, the patch does work. By using fileName instead of baseName you
get the full filename and the code under the path strips of the part after
and including the last dot.

The current code works if there is only a single dot because the baseName
call returns the name less the extension and the second part of the code
is never executed!

So, the patch won't break existing setups either.

--
Ticket URL: <http://svn.mythtv.org/trac/ticket/6869#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 at cvs

Nov 11, 2009, 3:10 PM

Post #6 of 10 (1251 views)
Permalink
Re: Ticket #6869: Subtitles not working for avi with multiple dots in filename [In reply to]

#6869: Subtitles not working for avi with multiple dots in filename
----------------------------------------------+-----------------------------
Reporter: Paul Kendall <paul@…> | Owner: danielk
Type: defect | Status: closed
Priority: trivial | Milestone: unknown
Component: MythTV - General | Version: head
Severity: low | Resolution: fixed
Mlocked: 0 |
----------------------------------------------+-----------------------------
Changes (by danielk):

* status: assigned => closed
* resolution: => fixed


Comment:

(In [22800]) Fixes #6869. Allow multiple dots in external subtitle
filenames.

--
Ticket URL: <http://svn.mythtv.org/trac/ticket/6869#comment:5>
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 16, 2009, 12:26 PM

Post #7 of 10 (1213 views)
Permalink
Re: Ticket #6869: Subtitles not working for avi with multiple dots in filename [In reply to]

#6869: Subtitles not working for avi with multiple dots in filename
----------------------------------------------+-----------------------------
Reporter: Paul Kendall <paul@…> | Owner: danielk
Type: defect | Status: closed
Priority: trivial | Milestone: unknown
Component: MythTV - General | Version: head
Severity: low | Resolution: fixed
Mlocked: 0 |
----------------------------------------------+-----------------------------

Comment(by S2):

Replying to [comment:4 Paul Kendall <paul@…>]:
> Actually, the patch does work.

I can confirm that the patch works on 0.22-fixes branch.

--
Ticket URL: <http://svn.mythtv.org/trac/ticket/6869#comment:6>
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

Jan 8, 2010, 5:07 PM

Post #8 of 10 (1077 views)
Permalink
Re: Ticket #6869: Subtitles not working for avi with multiple dots in filename [In reply to]

#6869: Subtitles not working for avi with multiple dots in filename
----------------------------------------------+-----------------------------
Reporter: Paul Kendall <paul@…> | Owner: danielk
Type: defect | Status: closed
Priority: trivial | Milestone: unknown
Component: MythTV - General | Version: head
Severity: low | Resolution: fixed
Mlocked: 0 |
----------------------------------------------+-----------------------------

Comment(by leipzig@…):

Hi there,

I have had some trouble with the subtitling. The patch solved the multidot
filenames issue, but it seems that for files with "[" "]" characters there
is one more problem.

The substitution in the filter pattern works fine in order to find files
on QDir, but now baseName contains the /replaced/ version too
(http://qt.nokia.com/doc/4.6/qstring.html#replace), so this code


{{{
257 QFileInfo fi(dirName + "/" + baseName + (*cit).right(4));
}}}


looks for a file with "?" characters on it, which does not exist.

I have replaced that line with


{{{
257 QFileInfo fi(dirName + "/" + *cit);
}}}


and now my compilation seems to work fine.

What do you think?

--Héctor

--
Ticket URL: <http://svn.mythtv.org/trac/ticket/6869#comment:7>
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

Jan 10, 2010, 4:52 AM

Post #9 of 10 (1020 views)
Permalink
Re: Ticket #6869: Subtitles not working for avi with multiple dots in filename [In reply to]

#6869: Subtitles not working for avi with multiple dots in filename
----------------------------------------------+-----------------------------
Reporter: Paul Kendall <paul@…> | Owner: danielk
Type: defect | Status: closed
Priority: trivial | Milestone: unknown
Component: MythTV - General | Version: head
Severity: low | Resolution: fixed
Mlocked: 0 |
----------------------------------------------+-----------------------------

Comment(by leipzig@…):

By the way, this patch has not made its way to 0.22-fixes yet!

--
Ticket URL: <http://svn.mythtv.org/trac/ticket/6869#comment:8>
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

Jan 10, 2010, 5:12 AM

Post #10 of 10 (1020 views)
Permalink
Re: Ticket #6869: Subtitles not working for avi with multiple dots in filename [In reply to]

#6869: Subtitles not working for avi with multiple dots in filename
----------------------------------------------+-----------------------------
Reporter: Paul Kendall <paul@…> | Owner: danielk
Type: defect | Status: closed
Priority: trivial | Milestone: unknown
Component: MythTV - General | Version: head
Severity: low | Resolution: fixed
Mlocked: 1 |
----------------------------------------------+-----------------------------
Changes (by stuartm):

* mlocked: 0 => 1


--
Ticket URL: <http://svn.mythtv.org/trac/ticket/6869#comment:9>
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.