LostLightProjects / jellyfin-skill

Fork of Emby skill for playing songs from Jellyfin
GNU General Public License v2.0
7 stars 5 forks source link

Port to Neon/OVOS #6

Open strugee opened 1 year ago

strugee commented 1 year ago

Mycroft AI is gone and Neon AI and OVOS are now generally accepted as the canonical stewards of the Mycroft codebase. See this FAQ. Neon in particular has taken over Mark II maintenance.

As such, it would be great to get this skill ported over to the new way of doing things. I'm interested in contributing to this since I want to run the skill on Neon myself, just want to know if you'll take patches. I hear https://github.com/mikejgray/ovos-skill-projen should be of help but haven't actually used it yet.

Logs:

$ grep jellyfin logs/* 2>/dev/null
logs/skills.log:2023-07-30 11:49:30.058 - skills - ovos_workshop.skill_launcher:load:295 - INFO - ATTEMPTING TO LOAD SKILL: jellyfin-skill.lostlightprojects
logs/skills.log:2023-07-30 11:49:30.196 - skills - ovos_workshop.skills.mycroft_skill:__call__:99 - WARNING - Legacy skill signature detected for jellyfin-skill.lostlightprojects; attempting to init skill manually, self.bus and self.skill_id will only be available in self.initialize. `__init__` method needs to accept `skill_id` and `bus` to resolve this.
logs/skills.log:2023-07-30 11:49:30.257 - skills - ovos_utils.skills.settings:get_local_settings:101 - INFO - /home/neon/.config/neon/skills/jellyfin-skill.lostlightprojects/settings.json
logs/skills.log:2023-07-30 11:49:31.320 - jellyfin-skill.lostlightprojects - INFO - First run of jellyfin-skill.lostlightprojects
logs/skills.log:2023-07-30 11:49:31.345 - skills - ovos_workshop.skill_launcher:_communicate_load_status:506 - INFO - Skill jellyfin-skill.lostlightprojects loaded successfully
logs/skills.log:2023-07-30 11:51:39.276 - jellyfin-skill.lostlightprojects - ERROR - Failed to shutdown gui for jellyfin-skill.lostlightprojects: <bound method GUIInterface.gui_set of <ovos_workshop.skills.base.SkillGUI object at 0x7f18384f90>>
logs/skills.log:2023-07-30 11:54:22.308 - skills - ovos_workshop.skill_launcher:load:295 - INFO - ATTEMPTING TO LOAD SKILL: jellyfin-skill.lostlightprojects
logs/skills.log:2023-07-30 11:54:22.502 - skills - ovos_workshop.skills.mycroft_skill:__call__:99 - WARNING - Legacy skill signature detected for jellyfin-skill.lostlightprojects; attempting to init skill manually, self.bus and self.skill_id will only be available in self.initialize. `__init__` method needs to accept `skill_id` and `bus` to resolve this.
logs/skills.log:2023-07-30 11:54:22.616 - skills - ovos_utils.skills.settings:get_local_settings:101 - INFO - /home/neon/.config/neon/skills/jellyfin-skill.lostlightprojects/settings.json
logs/skills.log:2023-07-30 11:54:23.411 - skills - ovos_workshop.skill_launcher:_communicate_load_status:506 - INFO - Skill jellyfin-skill.lostlightprojects loaded successfully
logs/skills.log:2023-07-30 11:58:14.647 - jellyfin-skill.lostlightprojects - ERROR - Failed to shutdown gui for jellyfin-skill.lostlightprojects: <bound method GUIInterface.gui_set of <ovos_workshop.skills.base.SkillGUI object at 0x7f1009bfd0>>
logs/skills.log:2023-07-30 11:59:26.495 - skills - ovos_workshop.skill_launcher:load:295 - INFO - ATTEMPTING TO LOAD SKILL: jellyfin-skill.lostlightprojects
logs/skills.log:2023-07-30 11:59:26.511 - skills - ovos_workshop.skills.mycroft_skill:__call__:99 - WARNING - Legacy skill signature detected for jellyfin-skill.lostlightprojects; attempting to init skill manually, self.bus and self.skill_id will only be available in self.initialize. `__init__` method needs to accept `skill_id` and `bus` to resolve this.
logs/skills.log:2023-07-30 11:59:26.554 - skills - ovos_utils.skills.settings:get_local_settings:101 - INFO - /home/neon/.config/neon/skills/jellyfin-skill.lostlightprojects/settings.json
logs/skills.log:2023-07-30 11:59:26.966 - jellyfin-skill.lostlightprojects - INFO - First run of jellyfin-skill.lostlightprojects
logs/skills.log:2023-07-30 11:59:26.999 - skills - ovos_workshop.skill_launcher:_communicate_load_status:506 - INFO - Skill jellyfin-skill.lostlightprojects loaded successfully

Note in particular that despite the "legacy skill signature detected" message, indicating that there's some kind of compatibility thing enabled, the skill thinks it's being initialized for the first time even though it's not. As such the settings I added to /home/neon/.config/neon/skills/jellyfin-skill.lostlightprojects/settings.json (I guessed the key names based on settingsmeta.yaml) are overwritten.

ghostbuster84 commented 1 year ago

I'm definitely interested in getting this ported, I just don't have much free time. I'll look into it when I have the time. I appreciate any help with it!

strugee commented 1 year ago

the skill thinks it's being initialized for the first time even though it's not

This might have been user error on my part - settings files appear to get overwritten if the JSON doesn't parse.

develroo commented 11 months ago

I can't seem to get it working on Neon either. This is from the cli log.

2024-01-03 01:15:50.188 - skills - neon_core.skills.intent_service:handle_utterance:261 - INFO - lang=en-us ['play stairway to heaven from jellyfin']
2024-01-03 01:15:53.577 - jellyfin-skill.lostlightprojects - INFO - {'utterances': ['play stairway to heaven from jellyfin'], 'lang': 'en-us', 'media': 'stairway to heaven', 'utterance': 'play stairway to heaven from jellyfin'}
2024-01-03 01:15:53.688 - skills - ovos_utils.file_utils:resolve_resource_file:153 - WARNING - Deprecation version=0.1.0. Caller=ovos_utils.dialog:166. Expected a dict config and got None.
2024-01-03 01:15:54.058 - jellyfin-skill.lostlightprojects - ERROR - can only concatenate str (not "NoneType") to str
Traceback (most recent call last):
  File "/home/neon/venv/lib/python3.10/site-packages/ovos_utils/messagebus.py", line 601, in wrapper
    handler(message)
  File "/home/neon/.local/share/neon/skills/jellyfin-skill.lostlightprojects/__init__.py", line 111, in handle_jellyfin
    if not self.connect_to_jellyfin():
  File "/home/neon/.local/share/neon/skills/jellyfin-skill.lostlightprojects/__init__.py", line 90, in connect_to_jellyfin
    self.log.debug("Testing connection to: " + self.settings.get("hostname"))
TypeError: can only concatenate str (not "NoneType") to str

Edit:

FTR this is the settings.json

{
    "jellyfin": {
        "Server": {
            "hostname": "http://192.168.1.213",
            "port": "8096",
            "user": "neon",
            "password": "N30n!"
        }
    }
}