Skip to content

Commit

Permalink
Merge be93066 into 63d48ee
Browse files Browse the repository at this point in the history
  • Loading branch information
sy6sy2 committed Oct 15, 2018
2 parents 63d48ee + be93066 commit 064340c
Show file tree
Hide file tree
Showing 5 changed files with 117 additions and 11 deletions.
23 changes: 13 additions & 10 deletions script.module.codequick/lib/codequick/listing.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,12 @@
# Localized string Constants
RELATED_VIDEOS = 32201
RECENT_VIDEOS = 32002
RECENT_VIDEOS_PLOT = 32004
ALLVIDEOS = 32003
NEXT_PAGE = 33078
NEXT_PAGE_PLOT = 32005
SEARCH = 137
SEARCH_PLOT = 32006


class Params(MutableMapping):
Expand Down Expand Up @@ -154,7 +157,7 @@ def __setitem__(self, key, value): # type: (str, str) -> None
def local_thumb(self, image):
"""
Set the "thumbnail" image to a image file, located in the add-on "resources/media" directory.
:param str image: Filename of the image.
"""
# Here we can't be sure if 'image' only contains ascii characters, so ensure_native_str is needed
Expand All @@ -163,7 +166,7 @@ def local_thumb(self, image):
def global_thumb(self, image):
"""
Set the "thumbnail" image to a image file, located in the codequick "resources/media" directory.
The available global thumbnail images are.
* next.png - Arrow pointing to the right.
* videos.png - Circle with a play button in the middle.
Expand Down Expand Up @@ -264,10 +267,10 @@ def __setitem__(self, key, value):
def date(self, date, date_format):
"""
Set the date infolabel.
:param str date: The date for the listitem.
:param str date_format: The format of the date as a strftime directive e.g. "june 27, 2017" => "%B %d, %Y"
.. seealso:: The full list of directives can be found at:
https://docs.python.org/3.6/library/time.html#time.strftime
Expand Down Expand Up @@ -459,7 +462,7 @@ def related(self, callback, *args, **kwargs):
Convenient method to add a "Related Videos" context menu item.
All this really does is to call "context.container" and sets "label" for you.
:param callback: The function that will be called when menu item is activated.
:param args: [opt] "Positional" arguments that will be passed to the callback.
:param kwargs: [opt] "Keyword" arguments that will be passed to the callback.
Expand Down Expand Up @@ -548,9 +551,9 @@ def __init__(self, content_type="video"):
self.property = Property(listitem)
"""
Dictionary like object that allows you to add "listitem properties". e.g. "StartOffset".
Some of these are processed internally by Kodi, such as the "StartOffset" property,
which is the offset in seconds at which to start playback of an item. Others may be used
Some of these are processed internally by Kodi, such as the "StartOffset" property,
which is the offset in seconds at which to start playback of an item. Others may be used
in the skin to add extra information, such as "WatchedCount" for tvshow items.
:examples:
Expand Down Expand Up @@ -723,7 +726,7 @@ def recent(cls, callback, *args, **kwargs):
# Create listitem instance
item = cls()
item.label = bold(Script.localize(RECENT_VIDEOS))
item.info["plot"] = "Show the most recent videos."
item.info["plot"] = Script.localize(RECENT_VIDEOS_PLOT)
item.art.global_thumb("recent.png")
item.set_callback(callback, *args, **kwargs)
return item
Expand Down Expand Up @@ -754,7 +757,7 @@ def search(cls, callback, *args, **kwargs):
item = cls()
item.label = bold(Script.localize(SEARCH))
item.art.global_thumb("search.png")
item.info["plot"] = "Search for video content."
item.info["plot"] = Script.localize(SEARCH_PLOT)
item.set_callback(SavedSearches, route=callback.route.path, first_load=True, **kwargs)
return item

Expand Down
3 changes: 2 additions & 1 deletion script.module.codequick/lib/codequick/youtube.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
# Localized string Constants
ALLVIDEOS = 32003
PLAYLISTS = 136
PLAYLISTS_PLOT = 32007

# Youtube cache directory
CACHEFILE = os.path.join(Route.get_info("profile"), u"_youtube-cache.sqlite")
Expand Down Expand Up @@ -676,7 +677,7 @@ def run(self, contentid, pagetoken=None, enable_playlists=True, loop=False):
if enable_playlists and contentid.startswith("UC") and pagetoken is None:
item = Listitem()
item.label = u"[B]%s[/B]" % self.localize(PLAYLISTS)
item.info["plot"] = "Show all channel playlists."
item.info["plot"] = self.localize(PLAYLISTS_PLOT)
item.art["icon"] = "DefaultVideoPlaylists.png"
item.art.global_thumb("playlist.png")
item.set_callback(Playlists, channel_id=contentid, show_all=False)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,22 @@ msgctxt "#32003"
msgid "All Videos"
msgstr ""

msgctxt "#32004"
msgid "Show the most recent videos."
msgstr ""

msgctxt "#32005"
msgid "Show the next page of content."
msgstr ""

msgctxt "#32006"
msgid "Search for video content."
msgstr ""

msgctxt "#32007"
msgid "Show all channel playlists."
msgstr ""

######################################
# Context Menu String: 32200 - 32299 #
######################################
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Kodi Media Center language file
# Addon Name: CodeQuick
# Addon id: script.module.codequick
# Addon Provider: willforde
msgid ""
msgstr ""
"Project-Id-Version: Kodi Addons\n"
"Report-Msgid-Bugs-To: alanwww1@kodi.org\n"
"POT-Creation-Date: 2016-01-28 21:10+0000\n"
"PO-Revision-Date: 2017-08-01 04:17+0000\n"
"Last-Translator: Kodi Translation Team\n"
"Language-Team: English (http://www.transifex.com/projects/p/xbmc-addons/language/en/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: en\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

################################
# Addon Strings: 32000 - 32199 #
################################

msgctxt "#32001"
msgid "Youtube Channel"
msgstr "Chaîne Youtube"

msgctxt "#32002"
msgid "Recent Videos"
msgstr "Vidéos Résentes"

msgctxt "#32003"
msgid "All Videos"
msgstr "Toutes les Vidéos"

msgctxt "#32004"
msgid "Show the most recent videos."
msgstr "Afficher les vidéos les plus récentes."

msgctxt "#32005"
msgid "Show the next page of content."
msgstr "Afficher le contenu de la page suivante"

msgctxt "#32006"
msgid "Search for video content."
msgstr "Rechercher du contenu vidéo."

msgctxt "#32007"
msgid "Show all channel playlists."
msgstr "Afficher toutes les playlists de la chaîne."


######################################
# Context Menu String: 32200 - 32299 #
######################################

msgctxt "#32201"
msgid "Related Videos"
msgstr "Vidéos Similaires"

##################################
# Setting Strings: 32300 - 32399 #
##################################

################################
# Error Strings: 32400 - 32599 #
################################

msgctxt "#32401"
msgid "Unable to resolve url"
msgstr "Impossible de résoudre l'URL"
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,22 @@ msgctxt "#32003"
msgid "All Videos"
msgstr "כל קבצי הווידאו"

msgctxt "#32004"
msgid "Show the most recent videos."
msgstr ""

msgctxt "#32005"
msgid "Show the next page of content."
msgstr ""

msgctxt "#32006"
msgid "Search for video content."
msgstr ""

msgctxt "#32007"
msgid "Show all channel playlists."
msgstr ""

# ####################################
# Context Menu String: 32200 - 32299 #
# ####################################
Expand Down

0 comments on commit 064340c

Please sign in to comment.