Bugzilla – Attachment 48643 Details for
Bug 14168
enhance streaming cataloging to include youtube
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14168: (followup) require WWW::YouTube::Download only when syspref enabled
Bug-14168-followup-require-WWWYouTubeDownload-only.patch (text/plain), 1.45 KB, created by
Jesse Weaver
on 2016-03-03 17:24:06 UTC
(
hide
)
Description:
Bug 14168: (followup) require WWW::YouTube::Download only when syspref enabled
Filename:
MIME Type:
Creator:
Jesse Weaver
Created:
2016-03-03 17:24:06 UTC
Size:
1.45 KB
patch
obsolete
>From eca049cded5cd1b63cb8e9e2dfb8ccce3204c12c Mon Sep 17 00:00:00 2001 >From: Mirko Tietgen <mirko@abunchofthings.net> >Date: Thu, 3 Mar 2016 07:58:55 +0100 >Subject: [PATCH] Bug 14168: (followup) require WWW::YouTube::Download only > when syspref enabled > >This patch fixes the problem of missing WWW::YouTube::Download breaking >record detail views. Instead of a general 'use', the module is only >required if the related syspref is enabled. > >Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com> >--- > C4/HTML5Media.pm | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/C4/HTML5Media.pm b/C4/HTML5Media.pm >index 7c2b174..b438933 100644 >--- a/C4/HTML5Media.pm >+++ b/C4/HTML5Media.pm >@@ -23,7 +23,6 @@ use warnings; > use C4::Context; > use MARC::Field; > use Koha::Upload; >-use WWW::YouTube::Download qw(playback_url); > > =head1 HTML5Media > >@@ -101,6 +100,8 @@ sub gethtml5media { > $HTML5Media{srcblock} = $HTML5Media_field->subfield('u'); > if (grep /youtube/, $HTML5Media_field->subfield('u') ) { # TODO is there an official YT URL shortener? Can we use that too? > if ($HTML5MediaYouTube == 1) { >+ require WWW::YouTube::Download; >+ import WWW::YouTube::Download qw(playback_url); > my $youtube = WWW::YouTube::Download->new; > $HTML5Media{srcblock} = $youtube->playback_url( > $HTML5Media_field->subfield('u'), { >-- >2.7.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 14168
:
45331
|
45333
|
45339
|
47327
|
47369
|
47403
|
47459
|
47460
|
48542
|
48586
|
48587
|
48637
| 48643 |
48644