Skip to content

Commit

Permalink
fix #473;
Browse files Browse the repository at this point in the history
  • Loading branch information
bigretromike committed Nov 7, 2021
1 parent d24eb4b commit 7ef2234
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 6 deletions.
2 changes: 1 addition & 1 deletion addon.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.nakamori" name="Nakamori" version="4.0.0-b13" provider-name="BigRetroMike, SteveMavic, da3dsoul">
<addon id="plugin.video.nakamori" name="Nakamori" version="4.0.0-b14" provider-name="BigRetroMike, SteveMavic, da3dsoul">
<requires>
<import addon="xbmc.python" version="3.0.0"/>
<import addon="script.module.routing" version="0.2.3"/>
Expand Down
15 changes: 11 additions & 4 deletions models/kodi_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,11 +461,18 @@ def set_art(li: ListItem, art: api2models.ArtCollection, overwrite_image: str =

else:
if len(art.fanart) > 0:
li.setArt({'fanart': set_pic_url(art.fanart[0].url), 'clearart': set_pic_url(art.fanart[0].url)})
if plugin_addon.getSettingBool('replace_404') and art.fanart[0].url == '/api/v2/image/support/plex_404.png':
li.setArt({'fanart': os.path.join(plugin_img_path, 'backgrounds', '404.png')})
else:
li.setArt({'fanart': set_pic_url(art.fanart[0].url), 'clearart': set_pic_url(art.fanart[0].url)})
if len(art.thumb) > 0:
li.setArt({'thumb': set_pic_url(art.thumb[0].url)})
li.setArt({'icon': set_pic_url(art.thumb[0].url)})
li.setArt({'poster': set_pic_url(art.thumb[0].url)})
if plugin_addon.getSettingBool('replace_404') and art.thumb[0].url == '/api/v2/image/support/plex_404.png':
li.setArt({'thumb': os.path.join(plugin_img_path, 'thumb', '404.png')})
li.setArt({'poster': os.path.join(plugin_img_path, 'thumb', '404.png')})
else:
li.setArt({'thumb': set_pic_url(art.thumb[0].url)})
li.setArt({'icon': set_pic_url(art.thumb[0].url)})
li.setArt({'poster': set_pic_url(art.thumb[0].url)})
if len(art.banner) > 0:
li.setArt({'banner': set_pic_url(art.banner[0].url)})

Expand Down
5 changes: 5 additions & 0 deletions resources/language/resource.language.en_GB/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -1212,6 +1212,11 @@ msgctxt "#30243"
msgid "Use Series art for episode grouping instead of Image/IconPack"
msgstr "Use Series art for episode grouping instead of Image/IconPack"

#: settings.xml #
msgctxt "#30244"
msgid "Replace missing images with those from Image/IconPack"
msgstr "Replace missing images with those from Image/IconPack"

##################################

#: wizard.xml #
Expand Down
Binary file added resources/media/backgrounds/404.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/media/thumb/404.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 7 additions & 1 deletion resources/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2570,7 +2570,7 @@
<default>true</default>
<control type="toggle"/>
</setting>
<!-- show continue: 0 -->
<!-- show eptypes: 0 -->
<setting label="30240" type="boolean" id="show_eptypes">
<level>0</level>
<default>true</default>
Expand All @@ -2585,6 +2585,12 @@
<dependency type="enable" operator="is" setting="show_eptypes">true</dependency>
</dependencies>
</setting>
<!-- replace 404 images: 0 -->
<setting label="30244" type="boolean" id="replace_404">
<level>0</level>
<default>true</default>
<control type="toggle"/>
</setting>
</group>

<!-- context menu settings: 3 -->
Expand Down

0 comments on commit 7ef2234

Please sign in to comment.