From 2401584bb09e7c6f9ccada607ac2c61e4203a63d Mon Sep 17 00:00:00 2001 From: weredev Date: Sat, 19 Oct 2024 22:11:45 -0500 Subject: [PATCH] Changing JellyCon to EmbyCon for Embuary --- .config/template.xml | 10 +- .github/workflows/build.yaml | 2 +- .github/workflows/codeql.yaml | 2 +- .github/workflows/publish.yaml | 6 +- .github/workflows/test.yaml | 4 +- build.py | 6 +- resources/lib/cache_images.py | 2 +- resources/lib/datamanager.py | 2 +- resources/lib/dialogs.py | 2 +- resources/lib/functions.py | 14 +-- resources/lib/image_server.py | 2 +- resources/lib/item_functions.py | 2 +- resources/lib/jellyfin.py | 4 +- resources/lib/kodi_utils.py | 2 +- resources/lib/loghandler.py | 2 +- resources/lib/menu_functions.py | 100 +++++++++--------- resources/lib/play_utils.py | 22 ++-- resources/lib/server_detect.py | 6 +- resources/lib/skin_cloner.py | 26 ++--- resources/lib/utils.py | 4 +- resources/lib/websocket_client.py | 2 +- resources/lib/widgets.py | 6 +- resources/settings.xml | 6 +- .../skin.estuary/17/xml/DialogVideoInfo.xml | 8 +- resources/skins/skin.estuary/17/xml/Home.xml | 28 ++--- .../skin.estuary/18/xml/DialogVideoInfo.xml | 8 +- resources/skins/skin.estuary/18/xml/Home.xml | 28 ++--- resources/skins/skin.estuary/copy_home.txt | 8 +- 28 files changed, 157 insertions(+), 157 deletions(-) diff --git a/.config/template.xml b/.config/template.xml index b9ec3d4d..467e871f 100644 --- a/.config/template.xml +++ b/.config/template.xml @@ -1,6 +1,6 @@ - @@ -14,9 +14,9 @@ all en GPL-2.0-only - https://github.com/jellyfin/jellycon/issues - https://github.com/jellyfin/jellycon/wiki - https://github.com/jellyfin/jellycon + https://github.com/jellyfin/embycon/issues + https://github.com/jellyfin/embycon/wiki + https://github.com/jellyfin/embycon Browse and play your Jellyfin server media library. An addon to allow you to browse and playback your Jellyfin (https://jellyfin.org) Movie, TV Show and Music collections. diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3f3517e5..6aa33112 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,4 +1,4 @@ -name: Build JellyCon +name: Build embycon on: push: diff --git a/.github/workflows/codeql.yaml b/.github/workflows/codeql.yaml index 5441e55c..46650d14 100644 --- a/.github/workflows/codeql.yaml +++ b/.github/workflows/codeql.yaml @@ -13,7 +13,7 @@ on: jobs: analyze: runs-on: ubuntu-latest - if: ${{ github.repository == 'jellyfin/jellycon' }} + if: ${{ github.repository == 'jellyfin/embycon' }} strategy: fail-fast: false matrix: diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 2e941988..fd562114 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -1,4 +1,4 @@ -name: Publish JellyCon +name: Publish embycon on: workflow_dispatch: @@ -60,5 +60,5 @@ jobs: key: ${{ secrets.DEPLOY_KEY }} script_stop: true script: | - python3 /usr/local/bin/kodirepo add /srv/repository/incoming/kodi/plugin.video.jellycon+${{ matrix.py_version }}.zip --datadir /srv/repository/releases/client/kodi/${{ matrix.py_version }}; - rm /srv/repository/incoming/kodi/plugin.video.jellycon+${{ matrix.py_version }}.zip; + python3 /usr/local/bin/kodirepo add /srv/repository/incoming/kodi/plugin.video.embycon+${{ matrix.py_version }}.zip --datadir /srv/repository/releases/client/kodi/${{ matrix.py_version }}; + rm /srv/repository/incoming/kodi/plugin.video.embycon+${{ matrix.py_version }}.zip; diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 42f05a71..5b4663b9 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,4 +1,4 @@ -name: Test JellyCon +name: Test embycon on: push: @@ -9,7 +9,7 @@ on: - master env: - PR_TRIGGERED: ${{ github.event_name == 'pull_request' && github.repository == 'jellyfin/jellycon' }} + PR_TRIGGERED: ${{ github.event_name == 'pull_request' && github.repository == 'jellyfin/embycon' }} jobs: test: diff --git a/build.py b/build.py index 3ef0895b..ef2040f3 100755 --- a/build.py +++ b/build.py @@ -67,14 +67,14 @@ def zip_files(py_version: str, source: str, target: str, dev: bool) -> None: """ Create installable addon zip archive """ - archive_name = f'plugin.video.jellycon+{py_version}.zip' + archive_name = f'plugin.video.embycon+{py_version}.zip' with zipfile.ZipFile(f'{target}/{archive_name}', 'w') as z: for root, dirs, files in os.walk(args.source): for filename in filter(file_filter, files): file_path = os.path.join(root, filename) if dev or folder_filter(file_path): - relative_path = os.path.join('plugin.video.jellycon', os.path.relpath(file_path, source)) + relative_path = os.path.join('plugin.video.embycon', os.path.relpath(file_path, source)) z.write(file_path, relative_path) @@ -83,7 +83,7 @@ def file_filter(file_name: str) -> bool: True if file_name is meant to be included """ return ( - not (file_name.startswith('plugin.video.jellycon') and file_name.endswith('.zip')) + not (file_name.startswith('plugin.video.embycon') and file_name.endswith('.zip')) and not file_name.endswith('.pyo') and not file_name.endswith('.pyc') and not file_name.endswith('.pyd') diff --git a/resources/lib/cache_images.py b/resources/lib/cache_images.py index cb32f2aa..9795ab05 100644 --- a/resources/lib/cache_images.py +++ b/resources/lib/cache_images.py @@ -48,7 +48,7 @@ def run(self): monitor.waitForAbort(5) while not self.stop_all_activity and not monitor.abortRequested() and xbmc.getCondVisibility("System.ScreenSaverActive"): - content_hash = home_window.get_property("jellycon_widget_reload") + content_hash = home_window.get_property("embycon_widget_reload") if (check_interval != 0 and (time.time() - last_update) > check_interval) or (latest_content_hash != content_hash): log.debug("CacheArtwork background thread - triggered") if monitor.waitForAbort(10): diff --git a/resources/lib/datamanager.py b/resources/lib/datamanager.py index aa20fc95..b1e977e0 100644 --- a/resources/lib/datamanager.py +++ b/resources/lib/datamanager.py @@ -235,7 +235,7 @@ def run(self): # TODO: probably should only set this in simple check mode current_time_stamp = str(time.time()) - home_window.set_property("jellycon_widget_reload", current_time_stamp) + home_window.set_property("embycon_widget_reload", current_time_stamp) log.debug("Setting New Widget Hash: {0}".format(current_time_stamp)) log.debug("CacheManagerThread : Sending container refresh") diff --git a/resources/lib/dialogs.py b/resources/lib/dialogs.py index 292f290a..74806d68 100644 --- a/resources/lib/dialogs.py +++ b/resources/lib/dialogs.py @@ -197,7 +197,7 @@ def onClick(self, control_id): play_info["item_id"] = next_item_id play_info["auto_resume"] = "-1" play_info["force_transcode"] = False - send_event_notification("jellycon_play_action", play_info) + send_event_notification("embycon_play_action", play_info) elif control_id == 3014: self.close() diff --git a/resources/lib/functions.py b/resources/lib/functions.py index 595eeffe..9d6c0d54 100644 --- a/resources/lib/functions.py +++ b/resources/lib/functions.py @@ -54,7 +54,7 @@ @timer def main_entry_point(): - log.debug("===== JellyCon START =====") + log.debug("===== embycon START =====") settings = xbmcaddon.Addon() profile_count = int(settings.getSetting('profile_count')) @@ -66,7 +66,7 @@ def main_entry_point(): pr.enable() log.debug("Running Python: {0}".format(sys.version_info)) - log.debug("Running JellyCon: {0}".format(get_version())) + log.debug("Running embycon: {0}".format(get_version())) log.debug("Kodi BuildVersion: {0}".format( xbmc.getInfoLabel("System.BuildVersion")) ) @@ -147,8 +147,8 @@ def main_entry_point(): elif mode == "SHOW_ADDON_MENU": display_menu(params) else: - log.debug("JellyCon -> Mode: {0}".format(mode)) - log.debug("JellyCon -> URL: {0}".format(param_url)) + log.debug("embycon -> Mode: {0}".format(mode)) + log.debug("embycon -> URL: {0}".format(param_url)) if mode == "GET_CONTENT": get_content(param_url, params) @@ -175,7 +175,7 @@ def main_entry_point(): with open(tab_file_name, 'w') as f: f.write(s.getvalue()) - log.debug("===== JellyCon FINISHED =====") + log.debug("===== embycon FINISHED =====") def toggle_watched(params): @@ -316,7 +316,7 @@ def get_params(): request_path = plugin_path.replace("plugin://{}".format(addon_id), "") param["request_path"] = request_path - log.debug("JellyCon -> Detected parameters: {0}".format(param)) + log.debug("embycon -> Detected parameters: {0}".format(param)) return param @@ -939,7 +939,7 @@ def play_action(params): play_info["media_source_id"] = media_source_id play_info["subtitle_stream_index"] = subtitle_stream_index play_info["audio_stream_index"] = audio_stream_index - log.info("Sending jellycon_play_action : {0}".format(play_info)) + log.info("Sending embycon_play_action : {0}".format(play_info)) play_file(play_info) diff --git a/resources/lib/image_server.py b/resources/lib/image_server.py index 2cf93578..da42de34 100644 --- a/resources/lib/image_server.py +++ b/resources/lib/image_server.py @@ -173,7 +173,7 @@ def serve_image(self): else: - image_path = translate_path("special://home/addons/plugin.video.jellycon/icon.png").decode('utf-8') + image_path = translate_path("special://home/addons/plugin.video.embycon/icon.png").decode('utf-8') self.send_response(200) self.send_header('Content-type', 'image/png') modified = xbmcvfs.Stat(image_path).st_mtime() diff --git a/resources/lib/item_functions.py b/resources/lib/item_functions.py index 45dd2e1c..dbe0d1a7 100644 --- a/resources/lib/item_functions.py +++ b/resources/lib/item_functions.py @@ -547,7 +547,7 @@ def add_gui_item(url, item_details, display_options, folder=True, default_sort=F info_labels["userrating"] = item_details.critic_rating if item_type in ('movie', 'series'): - info_labels["trailer"] = "plugin://plugin.video.jellycon?mode=playTrailer&id=" + item_details.id + info_labels["trailer"] = "plugin://plugin.video.embycon?mode=playTrailer&id=" + item_details.id list_item.setInfo('video', info_labels) diff --git a/resources/lib/jellyfin.py b/resources/lib/jellyfin.py index e455787a..0d1214dc 100644 --- a/resources/lib/jellyfin.py +++ b/resources/lib/jellyfin.py @@ -104,14 +104,14 @@ def create_headers(self, force=False): headers = {} device_name = self.settings.getSetting('deviceName') if len(device_name) == 0: - device_name = "JellyCon" + device_name = "embycon" # Ensure ascii and remove invalid characters device_name = py2_decode(device_name).replace('"', '_').replace(',', '_') device_id = get_device_id() version = get_version() authorization = ( - 'MediaBrowser Client="Kodi JellyCon", Device="{device}", ' + 'MediaBrowser Client="Kodi embycon", Device="{device}", ' 'DeviceId="{device_id}", Version="{version}"' ).format( device=device_name, diff --git a/resources/lib/kodi_utils.py b/resources/lib/kodi_utils.py index 82078692..c3047c19 100644 --- a/resources/lib/kodi_utils.py +++ b/resources/lib/kodi_utils.py @@ -20,7 +20,7 @@ class HomeWindow: """ def __init__(self): - self.id_string = 'plugin.video.jellycon-%s' + self.id_string = 'plugin.video.embycon-%s' self.window = xbmcgui.Window(10000) def get_property(self, key): diff --git a/resources/lib/loghandler.py b/resources/lib/loghandler.py index c868f273..01da2e6d 100644 --- a/resources/lib/loghandler.py +++ b/resources/lib/loghandler.py @@ -12,7 +12,7 @@ from .utils import translate_path -__addon__ = xbmcaddon.Addon(id='plugin.video.jellycon') +__addon__ = xbmcaddon.Addon(id='plugin.video.embycon') __pluginpath__ = translate_path(__addon__.getAddonInfo('path')) diff --git a/resources/lib/menu_functions.py b/resources/lib/menu_functions.py index b0e7ee2d..34183a36 100644 --- a/resources/lib/menu_functions.py +++ b/resources/lib/menu_functions.py @@ -579,13 +579,13 @@ def display_main_menu(): return add_menu_directory_item(translate_string(30406), - "plugin://plugin.video.jellycon/?mode=SHOW_ADDON_MENU&type=library") + "plugin://plugin.video.embycon/?mode=SHOW_ADDON_MENU&type=library") add_menu_directory_item(translate_string(30407), - "plugin://plugin.video.jellycon/?mode=SHOW_ADDON_MENU&type=show_global_types") + "plugin://plugin.video.embycon/?mode=SHOW_ADDON_MENU&type=show_global_types") add_menu_directory_item(translate_string(30408), - "plugin://plugin.video.jellycon/?mode=SHOW_ADDON_MENU&type=show_custom_widgets") + "plugin://plugin.video.embycon/?mode=SHOW_ADDON_MENU&type=show_custom_widgets") add_menu_directory_item(translate_string(30409), - "plugin://plugin.video.jellycon/?mode=SHOW_ADDON_MENU&type=addon_items") + "plugin://plugin.video.embycon/?mode=SHOW_ADDON_MENU&type=addon_items") xbmcplugin.endOfDirectory(handle) @@ -621,14 +621,14 @@ def show_global_types(params): } continue_watching_url = get_jellyfin_url("/Users/{userid}/Items/Resume", continue_watching_url_params) add_menu_directory_item(translate_string(30445), - "plugin://plugin.video.jellycon/?mode=GET_CONTENT&url=" + quote(continue_watching_url) + + "plugin://plugin.video.embycon/?mode=GET_CONTENT&url=" + quote(continue_watching_url) + "&media_type=movies" + "&name_format="+quote("Episode|episode_name_format")) add_menu_directory_item(translate_string(30256), - "plugin://plugin.video.jellycon/?mode=SHOW_ADDON_MENU&type=global_list_movies") + "plugin://plugin.video.embycon/?mode=SHOW_ADDON_MENU&type=global_list_movies") add_menu_directory_item(translate_string(30261), - "plugin://plugin.video.jellycon/?mode=SHOW_ADDON_MENU&type=global_list_tvshows") + "plugin://plugin.video.embycon/?mode=SHOW_ADDON_MENU&type=global_list_tvshows") xbmcplugin.endOfDirectory(handle) @@ -680,15 +680,15 @@ def display_homevideos_type(menu_params, view): def display_addon_menu(params): - add_menu_directory_item(translate_string(30246), "plugin://plugin.video.jellycon/?mode=SEARCH") - add_menu_directory_item(translate_string(30017), "plugin://plugin.video.jellycon/?mode=SHOW_SERVER_SESSIONS") - add_menu_directory_item(translate_string(30012), "plugin://plugin.video.jellycon/?mode=CHANGE_USER") - add_menu_directory_item(translate_string(30011), "plugin://plugin.video.jellycon/?mode=DETECT_SERVER_USER") - add_menu_directory_item(translate_string(30435), "plugin://plugin.video.jellycon/?mode=DETECT_CONNECTION_SPEED") - add_menu_directory_item(translate_string(30254), "plugin://plugin.video.jellycon/?mode=SHOW_SETTINGS") - add_menu_directory_item(translate_string(30395), "plugin://plugin.video.jellycon/?mode=CLEAR_CACHE") - add_menu_directory_item(translate_string(30293), "plugin://plugin.video.jellycon/?mode=CACHE_ARTWORK") - add_menu_directory_item("Clone default skin", "plugin://plugin.video.jellycon/?mode=CLONE_SKIN") + add_menu_directory_item(translate_string(30246), "plugin://plugin.video.embycon/?mode=SEARCH") + add_menu_directory_item(translate_string(30017), "plugin://plugin.video.embycon/?mode=SHOW_SERVER_SESSIONS") + add_menu_directory_item(translate_string(30012), "plugin://plugin.video.embycon/?mode=CHANGE_USER") + add_menu_directory_item(translate_string(30011), "plugin://plugin.video.embycon/?mode=DETECT_SERVER_USER") + add_menu_directory_item(translate_string(30435), "plugin://plugin.video.embycon/?mode=DETECT_CONNECTION_SPEED") + add_menu_directory_item(translate_string(30254), "plugin://plugin.video.embycon/?mode=SHOW_SETTINGS") + add_menu_directory_item(translate_string(30395), "plugin://plugin.video.embycon/?mode=CLEAR_CACHE") + add_menu_directory_item(translate_string(30293), "plugin://plugin.video.embycon/?mode=CACHE_ARTWORK") + add_menu_directory_item("Clone default skin", "plugin://plugin.video.embycon/?mode=CLONE_SKIN") handle = int(sys.argv[1]) xbmcplugin.endOfDirectory(handle) @@ -790,13 +790,13 @@ def display_tvshow_type(menu_params, view): add_menu_directory_item(view_name + translate_string(30278) + get_filtered_items_count_text(), url) # TV Show Genres - path = "plugin://plugin.video.jellycon/?mode=GENRES&item_type=tvshow" + path = "plugin://plugin.video.embycon/?mode=GENRES&item_type=tvshow" if view is not None: path += "&parent_id=" + view.get("Id") add_menu_directory_item(view_name + translate_string(30325), path) # TV Show Alpha picker - path = "plugin://plugin.video.jellycon/?mode=TVSHOW_ALPHA" + path = "plugin://plugin.video.embycon/?mode=TVSHOW_ALPHA" if view is not None: path += "&parent_id=" + view.get("Id") add_menu_directory_item(view_name + translate_string(30404), path) @@ -878,20 +878,20 @@ def display_music_type(menu_params, view): add_menu_directory_item(view_name + translate_string(30321), url) # genres - path = "plugin://plugin.video.jellycon/?mode=GENRES&item_type=MusicAlbum" + path = "plugin://plugin.video.embycon/?mode=GENRES&item_type=MusicAlbum" if view is not None: path += "&parent_id=" + view.get("Id") add_menu_directory_item(view_name + translate_string(30325), path) # Artist Alpha picker - path = "plugin://plugin.video.jellycon/?mode=ARTIST_ALPHA" + path = "plugin://plugin.video.embycon/?mode=ARTIST_ALPHA" if view is not None: path += "&parent_id=" + view.get("Id") add_menu_directory_item('{} - {}{}'.format( view_name, translate_string(30323), translate_string(30404)), path) # Shuffle All - path = "plugin://plugin.video.jellycon/?mode=PLAY&action=shuffle" + path = "plugin://plugin.video.embycon/?mode=PLAY&action=shuffle" if view is not None: path += "&item_id=" + view.get("Id") add_menu_directory_item('{} - {}'.format( @@ -1075,37 +1075,37 @@ def display_movies_type(menu_params, view): add_menu_directory_item('{}{}'.format(view_name, translate_string(30415)), url) # Genres - path = "plugin://plugin.video.jellycon/?mode=GENRES&item_type=movie" + path = "plugin://plugin.video.embycon/?mode=GENRES&item_type=movie" if view is not None: path += "&parent_id=" + view.get("Id") add_menu_directory_item('{}{}'.format(view_name, translate_string(30325)), path) # Pages - path = "plugin://plugin.video.jellycon/?mode=MOVIE_PAGES" + path = "plugin://plugin.video.embycon/?mode=MOVIE_PAGES" if view is not None: path += "&parent_id=" + view.get("Id") add_menu_directory_item('{}{}'.format(view_name, translate_string(30397)), path) # Alpha Picker - path = "plugin://plugin.video.jellycon/?mode=MOVIE_ALPHA" + path = "plugin://plugin.video.embycon/?mode=MOVIE_ALPHA" if view is not None: path += "&parent_id=" + view.get("Id") add_menu_directory_item('{}{}'.format(view_name, translate_string(30404)), path) # Years - path = "plugin://plugin.video.jellycon/?mode=SHOW_ADDON_MENU&type=show_movie_years" + path = "plugin://plugin.video.embycon/?mode=SHOW_ADDON_MENU&type=show_movie_years" if view is not None: path += "&parent_id=" + view.get("Id") add_menu_directory_item('{}{}'.format(view_name, translate_string(30411)), path) # Decades - path = "plugin://plugin.video.jellycon/?mode=SHOW_ADDON_MENU&type=show_movie_years&group=true" + path = "plugin://plugin.video.embycon/?mode=SHOW_ADDON_MENU&type=show_movie_years&group=true" if view is not None: path += "&parent_id=" + view.get("Id") add_menu_directory_item('{}{}'.format(view_name, translate_string(30412)), path) # Tags - path = "plugin://plugin.video.jellycon/?mode=SHOW_ADDON_MENU&type=show_movie_tags" + path = "plugin://plugin.video.embycon/?mode=SHOW_ADDON_MENU&type=show_movie_tags" if view is not None: path += "&parent_id=" + view.get("Id") add_menu_directory_item('{}{}'.format(view_name, translate_string(30413)), path) @@ -1209,13 +1209,13 @@ def display_mixed_type(params, view): add_menu_directory_item(view_name + translate_string(30278) + get_filtered_items_count_text(), url) # Mixed Genres - path = "plugin://plugin.video.jellycon/?mode=GENRES&item_type=mixed" + path = "plugin://plugin.video.embycon/?mode=GENRES&item_type=mixed" if view is not None: path += "&parent_id=" + view.get("Id") add_menu_directory_item(view_name + translate_string(30325), path) # Mixed Alpha picker - path = "plugin://plugin.video.jellycon/?mode=TVSHOW_ALPHA" + path = "plugin://plugin.video.embycon/?mode=TVSHOW_ALPHA" if view is not None: path += "&parent_id=" + view.get("Id") add_menu_directory_item(view_name + translate_string(30404), path) @@ -1248,7 +1248,7 @@ def display_library_views(params): art = get_art(item=view, server=server) art['landscape'] = get_art_url(view, "Primary", server=server) - plugin_path = "plugin://plugin.video.jellycon/?mode=SHOW_ADDON_MENU&type=library_item&view_id=" + view.get("Id") + plugin_path = "plugin://plugin.video.embycon/?mode=SHOW_ADDON_MENU&type=library_item&view_id=" + view.get("Id") if collection_type == "playlists": plugin_path = get_playlist_path(view) @@ -1333,38 +1333,38 @@ def display_library_view(params): def show_widgets(): add_menu_directory_item("All Movies", - 'plugin://plugin.video.jellycon/library/movies') + 'plugin://plugin.video.embycon/library/movies') item_limit_text = get_filtered_items_count_text() add_menu_directory_item(translate_string(30257) + item_limit_text, - 'plugin://plugin.video.jellycon/?mode=WIDGET_CONTENT&type=recent_movies') + 'plugin://plugin.video.embycon/?mode=WIDGET_CONTENT&type=recent_movies') add_menu_directory_item(translate_string(30258) + item_limit_text, - 'plugin://plugin.video.jellycon/?mode=WIDGET_CONTENT&type=inprogress_movies') + 'plugin://plugin.video.embycon/?mode=WIDGET_CONTENT&type=inprogress_movies') add_menu_directory_item(translate_string(30269) + item_limit_text, - 'plugin://plugin.video.jellycon/?mode=WIDGET_CONTENT&type=random_movies') + 'plugin://plugin.video.embycon/?mode=WIDGET_CONTENT&type=random_movies') add_menu_directory_item(translate_string(30403) + item_limit_text, - 'plugin://plugin.video.jellycon/?mode=WIDGET_CONTENT&type=movie_recommendations') + 'plugin://plugin.video.embycon/?mode=WIDGET_CONTENT&type=movie_recommendations') add_menu_directory_item(translate_string(30287) + item_limit_text, - 'plugin://plugin.video.jellycon/?mode=WIDGET_CONTENT&type=recent_tvshows') + 'plugin://plugin.video.embycon/?mode=WIDGET_CONTENT&type=recent_tvshows') add_menu_directory_item(translate_string(30263) + item_limit_text, - 'plugin://plugin.video.jellycon/?mode=WIDGET_CONTENT&type=recent_episodes') + 'plugin://plugin.video.embycon/?mode=WIDGET_CONTENT&type=recent_episodes') add_menu_directory_item(translate_string(30264) + item_limit_text, - 'plugin://plugin.video.jellycon/?mode=WIDGET_CONTENT&type=inprogress_episodes') + 'plugin://plugin.video.embycon/?mode=WIDGET_CONTENT&type=inprogress_episodes') add_menu_directory_item(translate_string(30265) + item_limit_text, - 'plugin://plugin.video.jellycon/?mode=WIDGET_CONTENT&type=nextup_episodes') + 'plugin://plugin.video.embycon/?mode=WIDGET_CONTENT&type=nextup_episodes') xbmcplugin.endOfDirectory(int(sys.argv[1])) def show_search(): - add_menu_directory_item(translate_string(30231), 'plugin://plugin.video.jellycon/?mode=NEW_SEARCH&item_type=Movie') - add_menu_directory_item(translate_string(30229), 'plugin://plugin.video.jellycon/?mode=NEW_SEARCH&item_type=Series') - add_menu_directory_item(translate_string(30235), 'plugin://plugin.video.jellycon/?mode=NEW_SEARCH&item_type=Episode') - add_menu_directory_item(translate_string(30337), 'plugin://plugin.video.jellycon/?mode=NEW_SEARCH&item_type=Audio') - add_menu_directory_item(translate_string(30338), 'plugin://plugin.video.jellycon/?mode=NEW_SEARCH&item_type=MusicAlbum') - add_menu_directory_item(translate_string(30339), 'plugin://plugin.video.jellycon/?mode=NEW_SEARCH&item_type=Person') + add_menu_directory_item(translate_string(30231), 'plugin://plugin.video.embycon/?mode=NEW_SEARCH&item_type=Movie') + add_menu_directory_item(translate_string(30229), 'plugin://plugin.video.embycon/?mode=NEW_SEARCH&item_type=Series') + add_menu_directory_item(translate_string(30235), 'plugin://plugin.video.embycon/?mode=NEW_SEARCH&item_type=Episode') + add_menu_directory_item(translate_string(30337), 'plugin://plugin.video.embycon/?mode=NEW_SEARCH&item_type=Audio') + add_menu_directory_item(translate_string(30338), 'plugin://plugin.video.embycon/?mode=NEW_SEARCH&item_type=MusicAlbum') + add_menu_directory_item(translate_string(30339), 'plugin://plugin.video.embycon/?mode=NEW_SEARCH&item_type=Person') xbmcplugin.endOfDirectory(int(sys.argv[1])) @@ -1401,22 +1401,22 @@ def set_library_window_values(force=False): name = item.get("Name") item_id = item.get("Id") - # plugin.video.jellycon- + # plugin.video.embycon- prop_name = "view_item.%i.name" % index home_window.set_property(prop_name, name) - log.debug("set_library_window_values: plugin.video.jellycon-{0}={1}".format(prop_name, name)) + log.debug("set_library_window_values: plugin.video.embycon-{0}={1}".format(prop_name, name)) prop_name = "view_item.%i.id" % index home_window.set_property(prop_name, item_id) - log.debug("set_library_window_values: plugin.video.jellycon-{0}={1}".format(prop_name, item_id)) + log.debug("set_library_window_values: plugin.video.embycon-{0}={1}".format(prop_name, item_id)) prop_name = "view_item.%i.type" % index home_window.set_property(prop_name, collection_type) - log.debug("set_library_window_values: plugin.video.jellycon-{0}={1}".format(prop_name, collection_type)) + log.debug("set_library_window_values: plugin.video.embycon-{0}={1}".format(prop_name, collection_type)) thumb = get_art_url(item, "Primary", server=server) prop_name = "view_item.%i.thumb" % index home_window.set_property(prop_name, thumb) - log.debug("set_library_window_values: plugin.video.jellycon-{0}={1}".format(prop_name, thumb)) + log.debug("set_library_window_values: plugin.video.embycon-{0}={1}".format(prop_name, thumb)) index += 1 diff --git a/resources/lib/play_utils.py b/resources/lib/play_utils.py index 24558987..69db1a19 100644 --- a/resources/lib/play_utils.py +++ b/resources/lib/play_utils.py @@ -55,7 +55,7 @@ def play_all_files(items, play_items=True): error_string = playback_info.get("ErrorCode") xbmcgui.Dialog().notification(translate_string(30316), error_string, - icon="special://home/addons/plugin.video.jellycon/icon.png") + icon="special://home/addons/plugin.video.embycon/icon.png") return play_session_id = playback_info.get("PlaySessionId") @@ -154,7 +154,7 @@ def add_to_playlist(play_info): error_string = playback_info.get("ErrorCode") xbmcgui.Dialog().notification(translate_string(30316), error_string, - icon="special://home/addons/plugin.video.jellycon/icon.png") + icon="special://home/addons/plugin.video.embycon/icon.png") return play_session_id = playback_info.get("PlaySessionId") @@ -347,7 +347,7 @@ def play_file(play_info): error_string = playback_info.get("ErrorCode") xbmcgui.Dialog().notification(translate_string(30316), error_string, - icon="special://home/addons/plugin.video.jellycon/icon.png") + icon="special://home/addons/plugin.video.embycon/icon.png") return play_session_id = playback_info.get("PlaySessionId") @@ -1132,7 +1132,7 @@ def get_playing_data(): try: play_data = json.loads(play_data_string) except ValueError: - # This isn't a JellyCon item + # This isn't a embycon item return None played_information_string = home_window.get_property('played_information') @@ -1432,15 +1432,15 @@ def onNotification(self, sender, method, data): return if sender.lower() not in ( - 'plugin.video.jellycon', 'xbmc', 'upnextprovider.signal' + 'plugin.video.embycon', 'xbmc', 'upnextprovider.signal' ): return signal = method.split('.', 1)[-1] if signal not in ( - "jellycon_play_action", "jellycon_play_youtube_trailer_action", - "set_view", "plugin.video.jellycon_play_action"): + "embycon_play_action", "embycon_play_youtube_trailer_action", + "set_view", "plugin.video.embycon_play_action"): return data_json = json.loads(data) @@ -1452,10 +1452,10 @@ def onNotification(self, sender, method, data): log.debug("PlaybackService:onNotification:{0}".format(play_info)) if signal in ( - "jellycon_play_action", "plugin.video.jellycon_play_action" + "embycon_play_action", "plugin.video.embycon_play_action" ): play_file(play_info) - elif signal == "jellycon_play_youtube_trailer_action": + elif signal == "embycon_play_youtube_trailer_action": trailer_link = play_info["url"] xbmc.executebuiltin(trailer_link) elif signal == "set_view": @@ -1477,7 +1477,7 @@ def screensaver_activated(self): log.debug("Screen Saver Activated : isPlayingVideo() = true") play_data = get_playing_data() if play_data: - log.debug("Screen Saver Activated : this is an JellyCon item so stop it") + log.debug("Screen Saver Activated : this is an embycon item so stop it") player.stop() clear_old_cache_data() @@ -1500,7 +1500,7 @@ def screensaver_deactivated(self): skip_select_user = home_screen.get_property("skip_select_user") if skip_select_user is not None and skip_select_user == "true": return - xbmc.executebuiltin("RunScript(plugin.video.jellycon,0,?mode=CHANGE_USER)") + xbmc.executebuiltin("RunScript(plugin.video.embycon,0,?mode=CHANGE_USER)") def get_item_playback_info(item_id, force_transcode): diff --git a/resources/lib/server_detect.py b/resources/lib/server_detect.py index efa73c45..7b7106c3 100644 --- a/resources/lib/server_detect.py +++ b/resources/lib/server_detect.py @@ -40,7 +40,7 @@ def check_connection_speed(): progress_dialog = xbmcgui.DialogProgress() message = 'Testing with {0} MB of data'.format(speed_test_data_size) - progress_dialog.create("JellyCon connection speed test", message) + progress_dialog.create("embycon connection speed test", message) start_time = time.time() log.debug("Starting Connection Speed Test") @@ -293,7 +293,7 @@ def check_server(force=False, change_user=False, notify=False): if something_changed: home_window = HomeWindow() - home_window.clear_property("jellycon_widget_reload") + home_window.clear_property("embycon_widget_reload") if auth: token = auth.get('AccessToken') user_id = auth.get('User').get('Id') @@ -302,7 +302,7 @@ def check_server(force=False, change_user=False, notify=False): user_id = user_details.get('user_id') save_user_details(selected_user_name, user_id, token) xbmc.executebuiltin("ActivateWindow(Home)") - if "estuary_jellycon" in xbmc.getSkinDir(): + if "estuary_embycon" in xbmc.getSkinDir(): xbmc.executebuiltin("SetFocus(9000, 0, absolute)") xbmc.executebuiltin("ReloadSkin()") diff --git a/resources/lib/skin_cloner.py b/resources/lib/skin_cloner.py index c4fcd522..e423d3ea 100644 --- a/resources/lib/skin_cloner.py +++ b/resources/lib/skin_cloner.py @@ -21,9 +21,9 @@ def clone_default_skin(): xbmc.executebuiltin("ActivateWindow(Home)") response = xbmcgui.Dialog().yesno( - "JellyCon Skin Cloner", + "embycon Skin Cloner", ("This will clone the default Estuary Kodi skin and" - "add JellyCon functionality to it."), + "add embycon functionality to it."), "Do you want to continue?") if not response: return @@ -57,7 +57,7 @@ def clone_skin(): log.debug("Kodi Skin Source: {0}".format(kodi_skin_source)) pdialog = xbmcgui.DialogProgress() - pdialog.create("JellyCon Skin Cloner", "") + pdialog.create("embycon Skin Cloner", "") all_files = [] walk_path(kodi_skin_source, "", all_files) @@ -66,7 +66,7 @@ def clone_skin(): kodi_home_path = translate_path("special://home") kodi_skin_destination = os.path.join( - kodi_home_path, "addons", "skin.estuary_jellycon" + kodi_home_path, "addons", "skin.estuary_embycon" ) log.debug("Kodi Skin Destination: {0}".format(kodi_skin_destination)) @@ -88,14 +88,14 @@ def clone_skin(): addon_tree = ET.parse(addon_xml_path) addon_root = addon_tree.getroot() - addon_root.attrib['id'] = 'skin.estuary_jellycon' - addon_root.attrib['name'] = 'Estuary JellyCon' + addon_root.attrib['id'] = 'skin.estuary_embycon' + addon_root.attrib['name'] = 'Estuary embycon' addon_tree.write(addon_xml_path) - # get jellycon path - jellycon_path = os.path.join( - kodi_home_path, "addons", "plugin.video.jellycon" + # get embycon path + embycon_path = os.path.join( + kodi_home_path, "addons", "plugin.video.embycon" ) log.debug("Major Version: {0}".format(kodi_version())) @@ -109,7 +109,7 @@ def clone_skin(): # Copy customized skin files from our addon into cloned skin for file_name in file_list: source = os.path.join( - jellycon_path, "resources", "skins", "skin.estuary", + embycon_path, "resources", "skins", "skin.estuary", str(kodi_version), "xml", file_name ) destination = os.path.join(kodi_skin_destination, "xml", file_name) @@ -121,14 +121,14 @@ def clone_skin(): del pdialog response = xbmcgui.Dialog().yesno( - "JellyCon Skin Cloner", + "embycon Skin Cloner", "Do you want to switch to the new cloned skin?" ) if not response: return params = { - 'addonid': "skin.estuary_jellycon", + 'addonid': "skin.estuary_embycon", 'enabled': True } result = JsonRpc('Addons.SetAddonEnabled').execute(params) @@ -137,7 +137,7 @@ def clone_skin(): log.debug("SkinCloner : Current Skin : {}".format( get_value("lookandfeel.skin")) ) - set_result = set_value("lookandfeel.skin", "skin.estuary_jellycon") + set_result = set_value("lookandfeel.skin", "skin.estuary_embycon") log.debug("Save Setting : lookandfeel.skin : {0}".format(set_result)) log.debug("SkinCloner : Current Skin : {}".format( get_value("lookandfeel.skin")) diff --git a/resources/lib/utils.py b/resources/lib/utils.py index 159b44a5..59c7a474 100644 --- a/resources/lib/utils.py +++ b/resources/lib/utils.py @@ -92,7 +92,7 @@ def send_event_notification(method, data=None, hexlify=False): else: data = '"[{}]"'.format(data_str.replace('"', '\\"')) - sender = 'plugin.video.jellycon' + sender = 'plugin.video.embycon' xbmc.executebuiltin('NotifyAll({}, {}, {})'.format(sender, method, data)) @@ -168,7 +168,7 @@ def get_device_id(): return '{}-{}'.format(client_id, rand_id) jellyfin_guid_path = py2_decode( - translate_path("special://temp/jellycon_guid") + translate_path("special://temp/embycon_guid") ) log.debug("jellyfin_guid_path: {0}".format(jellyfin_guid_path)) guid = xbmcvfs.File(jellyfin_guid_path) diff --git a/resources/lib/websocket_client.py b/resources/lib/websocket_client.py index ce849a0c..0a483289 100644 --- a/resources/lib/websocket_client.py +++ b/resources/lib/websocket_client.py @@ -179,7 +179,7 @@ def _general_commands(self, data): text = arguments['Text'] # show notification here log.debug("WebSocket DisplayMessage: {0}".format(text)) - xbmcgui.Dialog().notification("JellyCon", text) + xbmcgui.Dialog().notification("embycon", text) elif command == 'SendString': diff --git a/resources/lib/widgets.py b/resources/lib/widgets.py index b09a21c9..98147f5b 100644 --- a/resources/lib/widgets.py +++ b/resources/lib/widgets.py @@ -147,7 +147,7 @@ def check_for_new_content(): if simple_new_content_check: log.debug("Using simple new content check") current_time_stamp = str(time.time()) - home_window.set_property("jellycon_widget_reload", current_time_stamp) + home_window.set_property("embycon_widget_reload", current_time_stamp) log.debug("Setting New Widget Hash: {0}".format(current_time_stamp)) return user_id = get_current_user_id() @@ -201,7 +201,7 @@ def check_for_new_content(): log.debug("last_played_date: {0}".format(last_played_date)) - current_widget_hash = home_window.get_property("jellycon_widget_reload") + current_widget_hash = home_window.get_property("embycon_widget_reload") log.debug("Current Widget Hash: {0}".format(current_widget_hash)) m = hashlib.md5() @@ -210,7 +210,7 @@ def check_for_new_content(): log.debug("New Widget Hash: {0}".format(new_widget_hash)) if current_widget_hash != new_widget_hash: - home_window.set_property("jellycon_widget_reload", new_widget_hash) + home_window.set_property("embycon_widget_reload", new_widget_hash) log.debug("Setting New Widget Hash: {0}".format(new_widget_hash)) diff --git a/resources/settings.xml b/resources/settings.xml index 7346cab4..81bec190 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -3,7 +3,7 @@ - + @@ -12,7 +12,7 @@ - + @@ -126,7 +126,7 @@ - + diff --git a/resources/skins/skin.estuary/17/xml/DialogVideoInfo.xml b/resources/skins/skin.estuary/17/xml/DialogVideoInfo.xml index 4f0b403d..9f66f709 100644 --- a/resources/skins/skin.estuary/17/xml/DialogVideoInfo.xml +++ b/resources/skins/skin.estuary/17/xml/DialogVideoInfo.xml @@ -258,7 +258,7 @@ 200 horizontal close - ActivateWindow(Videos,plugin://plugin.video.jellycon/?mode=NEW_SEARCH_PERSON&person_id=$INFO[ListItem.Property(id)],return) + ActivateWindow(Videos,plugin://plugin.video.embycon/?mode=NEW_SEARCH_PERSON&person_id=$INFO[ListItem.Property(id)],return) 10 @@ -372,7 +372,7 @@ - plugin://plugin.video.jellycon?mode=WIDGET_CONTENT_CAST&id=$INFO[ListItem.Property(id)] + plugin://plugin.video.embycon?mode=WIDGET_CONTENT_CAST&id=$INFO[ListItem.Property(id)] 0 @@ -392,7 +392,7 @@ - + @@ -400,7 +400,7 @@ - + diff --git a/resources/skins/skin.estuary/17/xml/Home.xml b/resources/skins/skin.estuary/17/xml/Home.xml index c7bf29dc..2485fefd 100644 --- a/resources/skins/skin.estuary/17/xml/Home.xml +++ b/resources/skins/skin.estuary/17/xml/Home.xml @@ -20,7 +20,7 @@ - + WindowOpen @@ -31,7 +31,7 @@ scale 400 VisibleChange - $INFO[Window(Home).Property(plugin.video.jellycon-random-gb)] + $INFO[Window(Home).Property(plugin.video.embycon-random-gb)] String.IsEmpty(ListItem.Art(fanart)) @@ -42,7 +42,7 @@ $INFO[ListItem.Art(fanart)] !String.IsEmpty(ListItem.Art(fanart)) - + DepthBackground @@ -78,19 +78,19 @@ WidgetGroupListCommon - + - + - + @@ -105,19 +105,19 @@ WidgetGroupListCommon - + - + - + @@ -891,7 +891,7 @@ ActivateWindow(Videos,videodb://movies/titles/,return) - ActivateWindow(Videos,plugin://plugin.video.jellycon/?mode=SHOW_CONTENT&item_type=Movie&media_type=movies,return) + ActivateWindow(Videos,plugin://plugin.video.embycon/?mode=SHOW_CONTENT&item_type=Movie&media_type=movies,return) SetProperty(first_load_done, done, 10000) $NUMBER[3000] icons/sidemenu/movies.png @@ -900,7 +900,7 @@ ActivateWindow(Videos,videodb://movies/titles/,return) - ActivateWindow(Videos,plugin://plugin.video.jellycon/?mode=SHOW_CONTENT&item_type=Series&media_type=tvshows,return) + ActivateWindow(Videos,plugin://plugin.video.embycon/?mode=SHOW_CONTENT&item_type=Series&media_type=tvshows,return) SetProperty(first_load_done, done, 10000) $NUMBER[4000] icons/sidemenu/tv.png @@ -1008,14 +1008,14 @@ - ActivateWindow(Videos,plugin://plugin.video.jellycon/?mode=SEARCH,return) + ActivateWindow(Videos,plugin://plugin.video.embycon/?mode=SEARCH,return) $NUMBER[-1] icons/sidemenu/favourites.png search - RunScript(plugin.video.jellycon,0,?mode=CHANGE_USER) + RunScript(plugin.video.embycon,0,?mode=CHANGE_USER) $NUMBER[-1] icons/sidemenu/pictures.png change @@ -1095,7 +1095,7 @@ 100 100 keep - $INFO[Window(Home).Property(plugin.video.jellycon-userimage)] + $INFO[Window(Home).Property(plugin.video.embycon-userimage)] - + WindowOpen @@ -31,7 +31,7 @@ scale 400 VisibleChange - $INFO[Window(Home).Property(plugin.video.jellycon-random-gb)] + $INFO[Window(Home).Property(plugin.video.embycon-random-gb)] String.IsEmpty(ListItem.Art(fanart)) @@ -42,7 +42,7 @@ $INFO[ListItem.Art(fanart)] !String.IsEmpty(ListItem.Art(fanart)) - + DepthBackground @@ -78,19 +78,19 @@ WidgetGroupListCommon - + - + - + @@ -105,19 +105,19 @@ WidgetGroupListCommon - + - + - + @@ -974,7 +974,7 @@ ActivateWindow(Videos,videodb://movies/titles/,return) - ActivateWindow(Videos,plugin://plugin.video.jellycon/?mode=SHOW_CONTENT&item_type=Movie&media_type=movies,return) + ActivateWindow(Videos,plugin://plugin.video.embycon/?mode=SHOW_CONTENT&item_type=Movie&media_type=movies,return) SetProperty(first_load_done, done, 10000) $NUMBER[3000] icons/sidemenu/movies.png @@ -983,7 +983,7 @@ ActivateWindow(Videos,videodb://movies/titles/,return) - ActivateWindow(Videos,plugin://plugin.video.jellycon/?mode=SHOW_CONTENT&item_type=Series&media_type=tvshows,return) + ActivateWindow(Videos,plugin://plugin.video.embycon/?mode=SHOW_CONTENT&item_type=Series&media_type=tvshows,return) SetProperty(first_load_done, done, 10000) $NUMBER[4000] icons/sidemenu/tv.png @@ -991,14 +991,14 @@ - ActivateWindow(Videos,plugin://plugin.video.jellycon/?mode=SEARCH,return) + ActivateWindow(Videos,plugin://plugin.video.embycon/?mode=SEARCH,return) $NUMBER[-1] icons/sidemenu/favourites.png search - RunScript(plugin.video.jellycon,0,?mode=CHANGE_USER) + RunScript(plugin.video.embycon,0,?mode=CHANGE_USER) $NUMBER[-1] icons/sidemenu/pictures.png change @@ -1212,7 +1212,7 @@ 100 100 keep - $INFO[Window(Home).Property(plugin.video.jellycon-userimage)] + $INFO[Window(Home).Property(plugin.video.embycon-userimage)]