Compare commits
2 commits
9c778bb7de
...
b1ca39ff2b
| Author | SHA1 | Date | |
|---|---|---|---|
| b1ca39ff2b | |||
| 59da950a20 |
2 changed files with 12 additions and 5 deletions
|
|
@ -28,13 +28,18 @@ def render_poster(data, poster):
|
||||||
|
|
||||||
def get_oxdb_color(oxdb_id, series=False):
|
def get_oxdb_color(oxdb_id, series=False):
|
||||||
i = int(round((int(oxdb_id[2:10], 16) * 762 / pow(2, 32))))
|
i = int(round((int(oxdb_id[2:10], 16) * 762 / pow(2, 32))))
|
||||||
if data.get('type') == ["Original"]:
|
type = data.get('type')
|
||||||
|
if type:
|
||||||
|
type = data.get('type')[0].lower()
|
||||||
|
if type == "original":
|
||||||
i = 0
|
i = 0
|
||||||
elif data.get('type') == ["Background"]:
|
elif type == "background":
|
||||||
i = 200
|
i = 200
|
||||||
elif data.get('type') == ["Foreground"]:
|
elif type == "foreground":
|
||||||
i = 400
|
i = 400
|
||||||
elif data.get('type') == ["Annimation"]:
|
elif type == "foreground2":
|
||||||
|
i = 500
|
||||||
|
elif type == "annimation":
|
||||||
i = 600
|
i = 600
|
||||||
|
|
||||||
if i < 127:
|
if i < 127:
|
||||||
|
|
|
||||||
|
|
@ -574,11 +574,13 @@ pandora.ui.infoView = function(data, isMixed) {
|
||||||
pandora.api.find(request, function(response) {
|
pandora.api.find(request, function(response) {
|
||||||
response.data.items.forEach(item => {
|
response.data.items.forEach(item => {
|
||||||
if (item.id != data.id) {
|
if (item.id != data.id) {
|
||||||
|
var type = item.type ? item.type[0] : 'Unknown'
|
||||||
$element.append(
|
$element.append(
|
||||||
` <a href="/${item.id}/info">${item.type[0]}</a>`
|
` <a href="/${item.id}/info">${type}</a>`
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
$element.append(`[<a href="/grid/created/title=${pandora.escapeQueryValue(title)}">all</a>]`)
|
||||||
pandora.createLinks($element)
|
pandora.createLinks($element)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue