Galicaster icon indicating copy to clipboard operation
Galicaster copied to clipboard

Added a field to recorder service that can be overwritten to display another title

Open TurRil opened this issue 7 years ago • 2 comments

As a plugin I want to be able to display another title in the recorder UI so that when a user sees the galicaster screen their name could be displayed correctly.

TurRil avatar Oct 02 '18 08:10 TurRil

I'm not sure that modifying the variable in the RecorderService class directly is the best way to do this. i'd suggest having a method in the class that does this probably. something like:

    def set_title_standin(self, title):
        self.title_standin = title

You can test this PR with the below plugin

from galicaster.core import context


def init():
    dispatcher = context.get_dispatcher()
    dispatcher.connect('timer-short', hello_world)
    dispatcher.connect('timer-long', say_hello)


def hello_world(signal=None):
    print context.get('recorder').title_standin


def say_hello(signal=None):
    context.get('recorder').title_standin = 'Hello World!'

andiempett avatar Nov 16 '18 10:11 andiempett

from testing i seems this only affects manually recorded mediapackages, the title in the events panel in the recorder UI is changed only and seems to work well.

andiempett avatar Nov 16 '18 12:11 andiempett