[mythtv-users] "Internal Server Error" for specific recordings only from specific channels
Douglas Paul
doug at bogon.ca
Mon Dec 2 17:14:21 UTC 2019
Hello,
On Mon, Dec 02, 2019 at 05:43:34PM +0100, Miroslav Pavlovic wrote:
> ok, me again...
>
> Is this a Bug ?
> I mean, that mythweb is adding the newlines into the table ?
> I do not have an account for raising Bugs.
>
> Any idea?
I don't think mythweb is inserting the bad data in the database.
To me, this seems to be a bug in two places:
1) EIT (I assume that's where the program info is coming from) -- it
probably should sanitize things before it puts them in the database
2) Mythweb - should be more robust against questionable data in the
database
I don't use either so I can't really recommend a good fix or test one.
You should be able to create an account to raise a bug.
Using grep, it seems to me the issue you are hitting is in
mythweb/modules/stream/stream_asx.pl in mythweb (because in the other
cases, there is whitespace around the - between title and subtitle).
You might be able to hack it to sanitize the suggested filename a bit in
that file -- you might need to adjust the other scripts too though.
Something like this may work: (completely untested)
# Print out the HTML headers and the ASX file itself
## *add this*
$title =~ s/\W/_/g;
$subtitle =~ s/\W/_/g;
## *end add this*
print header(-type => 'video/x-ms-asf',
-Content_length => length($file),
-Content_disposition => " attachment; filename=\"$title-$subtitle.asx\"",
),
$file;
--
Douglas Paul
More information about the mythtv-users
mailing list