Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 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"?>
<addon id="plugin.video.jlom" version="0.1.12" name="Just Lists Of Movies" provider-name="lbnt">
<addon id="plugin.video.jlom" version="0.1.13" name="Just Lists Of Movies" provider-name="lbnt">
<requires>
<import addon="xbmc.python" version="3.0.1"/>
<import addon="script.module.requests"/>
Expand All @@ -19,6 +19,7 @@
<icon>resources/images/icon.png</icon>
<screenshot>resources/images/screenshot.jpg</screenshot>
</assets>
<news>0.1.13 add option to hide movies not found in local library</news>
<news>0.1.12 add local lists, add genre to movies not found in the library </news>
</extension>
</addon>
14 changes: 11 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,9 @@ def list_movies(movie_list):
movies = movie_list["movies"]
ordered_by = movie_list["ordered_by"]

# Read the "hide not in library" setting once for the whole list
hide_not_in_library = Addon().getSettingBool('hide_not_in_library')

# Set subtitle
xbmcplugin.setPluginCategory(HANDLE, movie_list['title'])
# Set plugin content
Expand All @@ -275,6 +278,14 @@ def list_movies(movie_list):

# Iterate through movies.
for index, movie in enumerate(movies):

#try to find the movie in the local database using the tmdb index
local_id = tmdb_index.get(str(movie['id']))

# Skip movies not in the local library if the setting is enabled
if local_id is None and hide_not_in_library:
continue

# Create a list item with a text label
if ordered_by == "rank":
movie_label = str(index+1) + " - " + movie['title']
Expand All @@ -300,9 +311,6 @@ def list_movies(movie_list):
genres.append(GENRES.get(genre_id, "Unknown"))
info_tag.setGenres(genres)
info_tag.setPlot(movie['overview'])

#try to find the movie in the local database using the tmdb index
local_id = tmdb_index.get(str(movie['id']))

#if found, make it playable
if local_id != None :
Expand Down
8 changes: 8 additions & 0 deletions resources/language/resource.language.en_gb/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,18 @@ msgctxt "#30002"
msgid "Server url"
msgstr ""

msgctxt "#30010"
msgid "Options"
msgstr ""

msgctxt "#30050"
msgid "Use local lists"
msgstr ""

msgctxt "#30060"
msgid "Hide movies not in library"
msgstr ""

# Category Integrations
msgctxt "#30100"
msgid "Integrations"
Expand Down
7 changes: 7 additions & 0 deletions resources/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@
</dependencies>
</setting>
</group>
<group id="library" label="30010">
<setting id="hide_not_in_library" type="boolean" label="30060" help="">
<level>0</level>
<default>false</default>
<control type="toggle"/>
</setting>
</group>
</category>
<category id="integrations" label="30100" help="">
<group id="radarr" label="30101">
Expand Down