Be less strict when matching AVOD URLs
authorJeff Godin <jgodin@tadl.org>
Wed, 3 Oct 2012 18:19:22 +0000 (14:19 -0400)
committerJeff Godin <jgodin@tadl.org>
Wed, 3 Oct 2012 18:19:22 +0000 (14:19 -0400)
Some of our early AVOD records have two EZproxy prefixes. This
works, but the URLs look different.

Rely on the previous "is this going through EZproxy?" check, then
look for an AVOD url contained within.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
templates_tadlskin/opac/parts/misc_util.tt2

index f642f3d..a0b3c99 100644 (file)
                     args.uris.push(res);
                     IF res.href.match('^http://via.tadl.org/');
                         args.ezproxy = 1;
-                    END;
-                    IF (avod_xtid = res.href.match('^http://via.tadl.org/login\?url=http://avod.films.com/PortalPlaylists.aspx\?aid=\d+&xtid=(\d+)'));
-                        args.cover_url = 'https://secure.films.com/Common/FMGimages/' _ avod_xtid.0 _ '_full.jpg';
+                        IF (avod_xtid = res.href.match('url=http://avod.films.com/PortalPlaylists.aspx\?aid=\d+&xtid=(\d+)'));
+                            args.cover_url = 'https://secure.films.com/Common/FMGimages/' _ avod_xtid.0 _ '_full.jpg';
+                        END;
                     END;
                 END;
                 NEXT;