Prepare transcode method

To be able to transcode via the context menu
This commit is contained in:
angelblue05 2016-09-27 02:27:06 -05:00
parent 04d4865074
commit 55438749bb
2 changed files with 11 additions and 2 deletions

View file

@ -183,6 +183,7 @@
<string id="30409">Delete item from the server</string> <string id="30409">Delete item from the server</string>
<string id="30410">Refresh this item</string> <string id="30410">Refresh this item</string>
<string id="30411">Set custom song rating (0-5)</string> <string id="30411">Set custom song rating (0-5)</string>
<string id="30412">Transcode</string>
<!-- add-on settings --> <!-- add-on settings -->
<string id="30500">Verify Host SSL Certificate</string> <string id="30500">Verify Host SSL Certificate</string>

View file

@ -24,7 +24,8 @@ OPTIONS = {
'Addon': lang(30408), 'Addon': lang(30408),
'AddFav': lang(30405), 'AddFav': lang(30405),
'RemoveFav': lang(30406), 'RemoveFav': lang(30406),
'RateSong': lang(30407) 'RateSong': lang(30407),
'Transcode': lang(30412)
} }
################################################################################################# #################################################################################################
@ -103,6 +104,10 @@ class ContextMenu(object):
userdata = self.api.get_userdata() userdata = self.api.get_userdata()
options = [] options = []
if self.item_type in ("movie", "episode", "song"):
#options.append(OPTIONS['Transcode'])
pass
if userdata['Favorite']: if userdata['Favorite']:
# Remove from emby favourites # Remove from emby favourites
options.append(OPTIONS['RemoveFav']) options.append(OPTIONS['RemoveFav'])
@ -136,7 +141,10 @@ class ContextMenu(object):
selected = self._selected_option selected = self._selected_option
if selected == OPTIONS['Refresh']: if selected == OPTIONS['Transcode']:
pass
elif selected == OPTIONS['Refresh']:
self.emby.refreshItem(self.item_id) self.emby.refreshItem(self.item_id)
elif selected == OPTIONS['AddFav']: elif selected == OPTIONS['AddFav']: