mirror of
https://github.com/jellyfin/jellycon.git
synced 2024-11-23 05:59:57 +00:00
Remove unused and commented out code
This commit is contained in:
parent
95f8dc8eb3
commit
2d20dc4282
@ -16,6 +16,3 @@ if log_timing_data:
|
||||
log.debug("About to enter mainEntryPoint()")
|
||||
|
||||
main_entry_point()
|
||||
|
||||
# clear done and exit.
|
||||
# sys.modules.clear()
|
||||
|
@ -43,7 +43,6 @@ class DataManager:
|
||||
addon_dir = xbmc.translatePath(xbmcaddon.Addon().getAddonInfo('profile'))
|
||||
|
||||
def __init__(self, *args):
|
||||
# log.debug("DataManager __init__")
|
||||
pass
|
||||
|
||||
@timer
|
||||
@ -66,10 +65,6 @@ class DataManager:
|
||||
url_hash = m.hexdigest()
|
||||
cache_file = os.path.join(self.addon_dir, "cache_" + url_hash + ".pickle")
|
||||
|
||||
# changed_url = url + "&MinDateLastSavedForUser=" + urllib.unquote("2019-09-16T13:45:30")
|
||||
# results = self.GetContent(changed_url)
|
||||
# log.debug("DataManager Changes Since Date : {0}", results)
|
||||
|
||||
item_list = None
|
||||
total_records = 0
|
||||
baseline_name = None
|
||||
@ -135,7 +130,6 @@ class DataManager:
|
||||
cache_item.total_records = total_records
|
||||
|
||||
cache_thread.cached_item = cache_item
|
||||
# copy.deepcopy(item_list)
|
||||
|
||||
if not use_cache:
|
||||
cache_thread = None
|
||||
@ -171,7 +165,6 @@ class CacheManagerThread(threading.Thread):
|
||||
def run(self):
|
||||
|
||||
log.debug("CacheManagerThread : Started")
|
||||
# log.debug("CacheManagerThread : Cache Item : {0}", self.cached_item.__dict__)
|
||||
|
||||
home_window = HomeWindow()
|
||||
is_fresh = False
|
||||
|
@ -106,13 +106,6 @@ def get_content(url, params):
|
||||
url = url + "&StartIndex=" + str(start_index) + "&Limit=" + str(page_limit)
|
||||
log.debug("ADDING NEXT URL: {0}".format(url_next))
|
||||
|
||||
# use the data manager to get the data
|
||||
# result = dataManager.GetContent(url)
|
||||
|
||||
# total_records = 0
|
||||
# if result is not None and isinstance(result, dict):
|
||||
# total_records = result.get("TotalRecordCount", 0)
|
||||
|
||||
use_cache = params.get("use_cache", "true") == "true"
|
||||
|
||||
dir_items, detected_type, total_records = process_directory(url, progress, params, use_cache)
|
||||
@ -381,7 +374,6 @@ def process_directory(url, progress, params, use_cache_data=False):
|
||||
series_url = ('{server}/Shows/' + first_season_item.series_id +
|
||||
'/Episodes'
|
||||
'?userId={userid}' +
|
||||
# '&seasonId=' + season_id +
|
||||
'&IsVirtualUnAired=false' +
|
||||
'&IsMissing=false' +
|
||||
'&Fields=SpecialEpisodeNumbers,{field_filters}' +
|
||||
|
@ -125,11 +125,9 @@ def main_entry_point():
|
||||
elif mode == "WIDGET_CONTENT_CAST":
|
||||
get_widget_content_cast(int(sys.argv[1]), params)
|
||||
elif mode == "SHOW_CONTENT":
|
||||
# plugin://plugin.video.jellycon?mode=SHOW_CONTENT&item_type=Movie|Series
|
||||
check_server()
|
||||
show_content(params)
|
||||
elif mode == "SEARCH":
|
||||
# plugin://plugin.video.jellycon?mode=SEARCH
|
||||
xbmcplugin.setContent(int(sys.argv[1]), 'files')
|
||||
show_search()
|
||||
elif mode == "NEW_SEARCH":
|
||||
@ -614,7 +612,6 @@ def show_menu(params):
|
||||
dialog.ok("Error", "Error getting safe delete confirmation")
|
||||
|
||||
elif selected_action == "show_extras":
|
||||
# "http://localhost:8096/Users/3138bed521e5465b9be26d2c63be94af/Items/78/SpecialFeatures"
|
||||
u = "{server}/Users/{userid}/Items/" + item_id + "/SpecialFeatures"
|
||||
action_url = ("plugin://plugin.video.jellycon/?url=" + quote(u) + "&mode=GET_CONTENT&media_type=Videos")
|
||||
built_in_command = 'ActivateWindow(Videos, ' + action_url + ', return)'
|
||||
|
@ -155,7 +155,6 @@ def add_to_playlist(play_info):
|
||||
icon="special://home/addons/plugin.video.jellycon/icon.png")
|
||||
return
|
||||
|
||||
# play_session_id = id_generator()
|
||||
play_session_id = playback_info.get("PlaySessionId")
|
||||
|
||||
# select the media source to use
|
||||
@ -951,7 +950,6 @@ def prompt_for_stop_actions(item_id, data):
|
||||
settings = xbmcaddon.Addon()
|
||||
current_position = data.get("current_position", 0)
|
||||
duration = data.get("duration", 0)
|
||||
# media_source_id = data.get("source_id")
|
||||
next_episode = data.get("next_episode")
|
||||
item_type = data.get("item_type")
|
||||
can_delete = data.get("can_delete", False)
|
||||
|
@ -128,7 +128,6 @@ def get_server_details():
|
||||
|
||||
message = b"who is JellyfinServer?"
|
||||
multi_group = ("<broadcast>", 7359)
|
||||
# multi_group = ("127.0.0.1", 7359)
|
||||
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||
sock.settimeout(4.0)
|
||||
@ -144,7 +143,6 @@ def get_server_details():
|
||||
xbmc.sleep(1000)
|
||||
server_count = 0
|
||||
|
||||
# while True:
|
||||
try:
|
||||
sock.sendto(message, multi_group)
|
||||
while True:
|
||||
|
@ -130,7 +130,6 @@ def clone_skin():
|
||||
def update_kodi_settings():
|
||||
log.debug("Settings Kodi Settings")
|
||||
|
||||
# set_value("screensaver.mode", "script.screensaver.logoff")
|
||||
set_value("videoplayer.seekdelay", 0)
|
||||
set_value("filelists.showparentdiritems", False)
|
||||
set_value("filelists.showaddsourcebuttons", False)
|
||||
|
@ -239,7 +239,6 @@ class WebSocketClient(threading.Thread):
|
||||
|
||||
def run(self):
|
||||
|
||||
# websocket.enableTrace(True)
|
||||
download_utils = downloadutils.DownloadUtils()
|
||||
|
||||
token = None
|
||||
|
@ -1,15 +0,0 @@
|
||||
|
||||
$string_ids = @()
|
||||
|
||||
Select-String -path resources\language\resource.language.en_gb\strings.po -pattern "msgctxt " | select Line | ForEach {
|
||||
$id = [regex]::match($_.Line.ToString(), '\"#([0-9]+)\"').Groups[1].Value
|
||||
if($string_ids -contains $id)
|
||||
{
|
||||
Write-Host "ERROR: String ID Already Exists : " $id
|
||||
}
|
||||
else
|
||||
{
|
||||
$string_ids += $id
|
||||
Get-ChildItem *.py,settings.xml,resources\language\resource.language.en_gb\strings.po -recurse | Select-String -pattern $id | group Pattern | where {$_.Count -eq 1} | select Name, Count
|
||||
}
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
|
||||
del /F /Q /S %HOMEPATH%\AppData\Roaming\Kodi\addons\plugin.video.jellycon
|
||||
rmdir /Q /S %HOMEPATH%\AppData\Roaming\Kodi\addons\plugin.video.jellycon
|
||||
|
||||
xcopy /Y addon.xml %HOMEPATH%\AppData\Roaming\Kodi\addons\plugin.video.jellycon\
|
||||
xcopy /Y default.py %HOMEPATH%\AppData\Roaming\Kodi\addons\plugin.video.jellycon\
|
||||
xcopy /Y fanart.jpg %HOMEPATH%\AppData\Roaming\Kodi\addons\plugin.video.jellycon\
|
||||
xcopy /Y icon.png %HOMEPATH%\AppData\Roaming\Kodi\addons\plugin.video.jellycon\
|
||||
xcopy /Y kodi.png %HOMEPATH%\AppData\Roaming\Kodi\addons\plugin.video.jellycon\
|
||||
xcopy /Y service.py %HOMEPATH%\AppData\Roaming\Kodi\addons\plugin.video.jellycon\
|
||||
|
||||
xcopy /E /Y resources %HOMEPATH%\AppData\Roaming\Kodi\addons\plugin.video.jellycon\resources\
|
||||
|
||||
cd "%programfiles%\Kodi"
|
||||
kodi.exe
|
@ -1,45 +0,0 @@
|
||||
import xml.etree.ElementTree as ET
|
||||
import subprocess
|
||||
from shutil import copy2, copytree, rmtree
|
||||
import os
|
||||
import sys
|
||||
|
||||
package_path = "package"
|
||||
|
||||
def ignore_files(path, item_list):
|
||||
return [".idea", ".git", ".gitignore", "scripts", package_path]
|
||||
|
||||
zip_path = "c:\\Program Files\\7-Zip\\7z.exe"
|
||||
addon_path = sys.argv[1]
|
||||
|
||||
tree = ET.parse(addon_path + "\\addon.xml")
|
||||
root = tree.getroot()
|
||||
|
||||
|
||||
id = root.attrib["id"]
|
||||
version = root.attrib["version"]
|
||||
|
||||
print (package_path + " - " + version)
|
||||
|
||||
try:
|
||||
rmtree(package_path + "\\" + id)
|
||||
except FileNotFoundError as err:
|
||||
pass
|
||||
|
||||
copytree(addon_path, package_path + "\\" + id, ignore=ignore_files)
|
||||
|
||||
zip_name = id + "-" + version + ".zip"
|
||||
|
||||
os.chdir(package_path)
|
||||
cmd_7zip = [zip_path, "a", zip_name, id]
|
||||
sp = subprocess.Popen(cmd_7zip, stderr=subprocess.STDOUT, stdout=subprocess.PIPE)
|
||||
sp.wait()
|
||||
os.chdir("..")
|
||||
|
||||
copy2(package_path + "\\" + id + "\\addon.xml", package_path + "\\addon.xml")
|
||||
|
||||
try:
|
||||
rmtree(package_path + "\\" + id)
|
||||
except FileNotFoundError as err:
|
||||
pass
|
||||
|
Loading…
Reference in New Issue
Block a user