Open
Conversation
This major refactoring removes all Apple TV aerial video functionality,
focusing the addon exclusively on playing videos from a user-specified
local directory.
Changes include:
- Removed logic for fetching and processing Apple's video data from playlist.py.
- Removed Apple-specific helper functions from commonatv.py.
- Deleted downloader.py and offline.py.
- Made entrypointscript.py a placeholder to prevent errors.
- Significantly simplified settings.xml:
- Removed "Aerial Screensavers" and "Videos" categories.
- Renamed "Offline mode" category to "Advanced Settings".
- Kept only "Extra local files" and "Start local videos at random time" settings.
- Updated strings.po to remove unused strings and add new ones for the
simplified UI and messages.
- Simplified atv.py by removing DPMS logic, 'is_locked' setting usage,
and references to offline functionality. Updated 'no videos' message.
The addon now functions as a dedicated local video screensaver.
This commit addresses issues identified after the major refactoring:
1. Resolves `TypeError: Invalid setting type` related to the removed
`is_locked` setting. Calls to `getSettingBool` and `setSettingBool`
for `is_locked` were removed from `service.py` and
`resources/lib/screensaver.py`. `service.py` is now a placeholder.
2. Fixes `unknown operator "!isempty"` warning in settings. The
visibility dependency for the `random-seek-local` setting in
`resources/settings.xml` now uses `operator="!eq"` to check if
`extra-local-folder` is not empty.
This commit addresses several issues and incorporates identity changes:
1. Fixes the screensaver not starting by modifying `entrypointscreensaver.py`
to directly call `atv.run()`, ensuring the correct screensaver window
(`atv.Screensaver`) is instantiated.
2. Updates `addon.xml` with a new ID (`screensaver.localvideo`),
name (`Local Video`), version (`0.0.1`), and provider name.
3. Updates all Python logging messages to use the new addon ID
`[screensaver.localvideo]` for consistency.
4. Removes `resources/lib/screensaver.py` as it became orphaned code
after the launch mechanism and feature refactoring.
This commit addresses critical errors identified after the major
refactoring to a local-only video screensaver:
1. Resolves `ModuleNotFoundError: No module named 'resources.lib.offline'`
by removing the orphaned import of `offline` from `resources/lib/atv.py`.
2. Resolves `ImportError: cannot import name 'find_ranked_key_in_dict'`
by correcting the import statement in `resources/lib/playlist.py`
to only import `addon` from `.commonatv`.
3. Resolves `NameError: name 'addon_path' is not defined` in
`resources/lib/playlist.py` by removing unused module-level constants
(`apple_resources_tar_url`, `apple_local_tar_path`) and unused
imports (`json`, `tarfile`, `urllib.request`) that were remnants of
the Apple video functionality.
These fixes ensure the addon can now launch and operate correctly
after the significant code stripping and restructuring.
This commit restores the user-configurable DPMS (Digital Power Management Signaling) controls that were removed during the major refactoring. This allows you to manage display and device power saving behavior initiated by the screensaver. Changes: - Restored the DPMS settings group (DPMS mode, action, manual timeout, display/CEC toggles) to `resources/settings.xml` under the "Advanced Settings" category. - Restored the corresponding language strings to `resources/language/resource.language.en_gb/strings.po`. - Restored the DPMS handling logic to `resources/lib/atv.py`, including the monitoring loop and the `activateDPMS` method.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.