From 4ee5f5f479f3b8ce929029ff45aa9d48c83c93be Mon Sep 17 00:00:00 2001 From: Yves Fischer Date: Tue, 23 Dec 2014 17:50:40 +0100 Subject: improve tags --- imdb-lookup/html/index-files/css/style.css | 22 +++++++++++++++------- imdb-lookup/html/index.html | 15 ++++++--------- imdb-lookup/imdbinfo.py | 18 +++++++++++------- 3 files changed, 32 insertions(+), 23 deletions(-) diff --git a/imdb-lookup/html/index-files/css/style.css b/imdb-lookup/html/index-files/css/style.css index 497333c..483d8bb 100644 --- a/imdb-lookup/html/index-files/css/style.css +++ b/imdb-lookup/html/index-files/css/style.css @@ -39,13 +39,6 @@ } .info table td { padding: .2em; } .details { padding: 0.5em; } -.files { - z-index: 10; - list-style: none; - padding-left: 0px; - font-size: 0.7em; - margin: 0px; -} .imdbid { font-family: monospace; padding: 3px; @@ -54,6 +47,14 @@ border-radius: 4px; } .title { font-size: 2em; } +.title a { + text-decoration: none; + color: inherit; +} +.title span { + font-size: 8pt; + vertical-align: center; +} .headline { font-size: 0.9em; color: 3e3e3e; } .plot { margin-top: 10px; } .consensus { margin-top: 10px; font-style: italic;} @@ -76,3 +77,10 @@ label { font-weight: bold; } +.movie-tag { + font-family: monospace; + padding: 3px; + background-color: #f0f0f0; + border: 1px solid #e0e0e0; + border-radius: 4px; +} diff --git a/imdb-lookup/html/index.html b/imdb-lookup/html/index.html index 53ceee7..cf9d102 100644 --- a/imdb-lookup/html/index.html +++ b/imdb-lookup/html/index.html @@ -80,7 +80,12 @@
- {{movie.title}} + + {{movie.title}} + + {{#each tag in movie.tags}} + {{tag}} + {{/each}}
{{movie.plot}}
@@ -104,14 +109,6 @@ - diff --git a/imdb-lookup/imdbinfo.py b/imdb-lookup/imdbinfo.py index 4c903ec..40be75a 100755 --- a/imdb-lookup/imdbinfo.py +++ b/imdb-lookup/imdbinfo.py @@ -316,13 +316,17 @@ def do_index(args, imdb_ids): if curfile.endswith("avi"): yield "AVI" for curdir in dirs: - if "german" in curdir: - yield "GERMAN" - if "1080" in curdir: - yield "1080p" - if "720p" in curdir: - yield "720p" - return list(set(find())) + tags = { "german" : "German", + "1080" : "1080p", "720" : "720p", + "bdrip" : "BlueRay", "blueray" : "BlueRay", + "hevc" : "HEVC" } + for (key, tag) in tags.items(): + if key in curdir.lower(): + yield tag + + l = list(set(find())) + l.sort() + return l def poster(imdb_id): data = db.poster_low(imdb_id) -- cgit v1.2.1