From 36bff0450efaa0b6ccfd722f5d445302fd00187f Mon Sep 17 00:00:00 2001 From: William McBrine Date: Fri, 11 Jul 2008 07:31:52 -0400 Subject: [PATCH] Uppercase the template names. --- plugins/music/music.py | 8 ++++---- plugins/photo/photo.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/music/music.py b/plugins/music/music.py index 6ad9233..88966ca 100644 --- a/plugins/music/music.py +++ b/plugins/music/music.py @@ -36,8 +36,8 @@ durre = re.compile(r'.*Duration: (.{2}):(.{2}):(.{2})\.(.),').search # Preload the templates tfname = os.path.join(SCRIPTDIR, 'templates', 'container.tmpl') tpname = os.path.join(SCRIPTDIR, 'templates', 'm3u.tmpl') -folder_template = file(tfname, 'rb').read() -playlist_template = file(tpname, 'rb').read() +FOLDER_TEMPLATE = file(tfname, 'rb').read() +PLAYLIST_TEMPLATE = file(tpname, 'rb').read() # XXX BIG HACK # subprocess is broken for me on windows so super hack @@ -245,10 +245,10 @@ class Music(Plugin): return if os.path.splitext(subcname)[1].lower() in PLAYLISTS: - t = Template(playlist_template, filter=EncodeUnicode) + t = Template(PLAYLIST_TEMPLATE, filter=EncodeUnicode) t.files, t.total, t.start = self.get_playlist(handler, query) else: - t = Template(folder_template, filter=EncodeUnicode) + t = Template(FOLDER_TEMPLATE, filter=EncodeUnicode) t.files, t.total, t.start = self.get_files(handler, query, AudioFileFilter) t.files = map(media_data, t.files) diff --git a/plugins/photo/photo.py b/plugins/photo/photo.py index d1e1344..3e5dcab 100644 --- a/plugins/photo/photo.py +++ b/plugins/photo/photo.py @@ -51,7 +51,7 @@ exif_orient_m = \ # Preload the template tname = os.path.join(SCRIPTDIR, 'templates', 'container.tmpl') -photo_template = file(tname, 'rb').read() +PHOTO_TEMPLATE = file(tname, 'rb').read() class EncodeUnicode(Filter): def filter(self, val, **kw): @@ -284,7 +284,7 @@ class Photo(Plugin): self.media_data_cache[f.name] = item return item - t = Template(photo_template, filter=EncodeUnicode) + t = Template(PHOTO_TEMPLATE, filter=EncodeUnicode) t.name = subcname t.container = cname t.files, t.total, t.start = self.get_files(handler, query, -- 2.11.4.GIT