This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###/home/osmc/.kodi/addons/plugin.video.themoviedb.helper/resources/lib/player.py | |
def play(self, itemtype, tmdb_id, season=None, episode=None, force_dialog=False): | |
########### | |
# Attempt to play local file first | |
is_local = False | |
# if self.details and self.itemtype == 'movie': | |
# is_local = self.playmovie() | |
# if self.details and self.itemtype == 'episode': | |
# is_local = self.playepisode() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##kodi-send --action='RunPlugin(plugin://plugin.video.themoviedb.helper?info=play2&type=episode&tmdb_id=95&season=1&episode=1)' | |
###/home/osmc/.kodi/addons/plugin.video.themoviedb.helper/resources/lib/container.py | |
if self.params.get('info') == 'play2': | |
import os | |
addon_handle = self.handle | |
xbmc.log(str(xbmcgui.getCurrentWindowDialogId())+'===>TMDBHelper', level=xbmc.LOGNOTICE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
@plugin.route('/play_stream/<label>') | |
def play_stream(label): | |
import sys | |
import xbmcplugin | |
import xbmcgui | |
import os | |
addon_handle = int(sys.argv[1]) | |
xbmc.log(str(xbmcgui.getCurrentWindowDialogId())+'===>OPENMETA', level=xbmc.LOGNOTICE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###/home/osmc/.kodi/addons/plugin.video.themoviedb.helper/resources/lib/player.py | |
# return self.play_external(force_dialog=True) # Ask user to select a different player | |
###/home/osmc/.kodi/addons/plugin.video.themoviedb.helper/resources/lib/container.py | |
elif self.params.get('info') == 'trakt_collection2': | |
items = TraktAPI(tmdb='tv', login=True).get_collection2('tv', utils.try_parse_int(self.params.get('page', 1))) | |
if self.params.get('info') == 'strm_pl': | |
# xbmc.log(str(xbmc.getInfoLabel('System.CurrentControl')) + 'CONTROL===>OPENINFO', level=xbmc.LOGNOTICE) | |
# xbmc.executebuiltin('ActivateWindow(busydialognocancel)') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://kodi.wiki/view/List_of_built-in_functions | |
https://kodi.wiki/view/Databases/MyVideos | |
https://www.reddit.com/r/Addons4Kodi/comments/c4szk4/next_playlist_next_up_episodes_playlist/ | |
https://henryjfry.github.io/repository.nextup/repo/ | |
import sqlite3 | |
con = sqlite3.connect('/home/osmc/.kodi/userdata/Database/MyVideos116.db') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import xml.etree.ElementTree as ET | |
import sys | |
_genreids = { | |
"Action": 28, "Adventure": 12, "Animation": 16, "Comedy": 35, "Crime": 80, "Documentary": 99, "Drama": 18, | |
"Family": 10751, "Fantasy": 14, "History": 36, "Horror": 27, "Kids": 10762, "Music": 10402, "Mystery": 9648, | |
"News": 10763, "Reality": 10764, "Romance": 10749, "Science Fiction": 878, "Sci-Fi & Fantasy": 10765, "Soap": 10766, | |
"Talk": 10767, "TV Movie": 10770, "Thriller": 53, "War": 10752, "War & Politics": 10768, "Western": 37} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kodi-send --action='RunPlugin(plugin://plugin.video.themoviedb.helper?info=trakt_collection_tv)' | |
###~/.kodi/addons/plugin.video.themoviedb.helper/resources/lib/container.py | |
def router(self): | |
# ROUTER LIST FUNCTIONS | |
if self.params.get('info') == 'stream': | |
from resources.lib.player import Player | |
xbmcplugin.setResolvedUrl(self.handle, True, xbmcgui.ListItem(path=str())) | |
params = self.params.copy() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kodi-send --action='RunPlugin(plugin://plugin.video.themoviedb.helper?info=trakt_collection2)' | |
####/home/osmc/.kodi/addons/plugin.video.themoviedb.helper/resources/lib/container.py | |
def list_traktcollection2(self): | |
items = TraktAPI(tmdb='tv', login=True).get_collection2('tv', utils.try_parse_int(self.params.get('page', 1))) | |
### | |
def list_play(self): | |
if not self.params.get('type') or not self.params.get('tmdb_id'): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Usage: clone_all_repos.sh [organization] <output directory> | |
ORG=$1 | |
PER_PAGE=100 | |
GIT_OUTPUT_DIRECTORY=${2:-"/tmp/${ORG}_repos"} | |
if [ -z "$GITHUB_TOKEN" ]; then | |
echo -e "Variable GITHUB_TOKEN isn't set! Please specify your GitHub token.\n\nMore info: https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/" | |
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo systemctl stop mediacenter | |
##addon.xml | |
<item library="context3.py"> | |
<label>TMDB Helper - Play</label> | |
<visible>String.IsEqual(ListItem.dbtype,movie) | String.IsEqual(ListItem.dbtype,episode)</visible> | |
</item> | |
##addon.xml |
NewerOlder