Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

[REL] HDHomeRun Viewer

1828384858688»

Comments

  • zyninezynine Posts: 576Members, Plex Pass Plex Pass

    @SpacemanJT said:
    Hi there,

    I upgraded from 0.9.17 to 0.9.19 and now all of the program information is missing. What do I need to do please? :)

    Thanks,

    SpacemanJT

    What guide mode are you using?

  • daeksdaeks Posts: 71Members, Plex Pass Plex Pass
    edited March 20

    @zynine said:
    @daeks, hit a brick wall. I tried using DataObject + Callback, the thumbnail got cached "permanently" in Plex. What are your thoughts on http / webserver based links?

    I am happy with everything, but why not doing something like the following on initialisation:

    import shutil
    shutil.copy(os.path.join(Prefs[PREFS_LOGO_PATH], icon_channelnumber), Resources_folder)

    That is more a showcase, but it worked for me with static paths in shutil.copy. Biggest benefit would be that no further changes are required. Only some lines for copying the logos from external directory to resource folder initially.

  • zyninezynine Posts: 576Members, Plex Pass Plex Pass

    @daeks said:

    @zynine said:
    @daeks, hit a brick wall. I tried using DataObject + Callback, the thumbnail got cached "permanently" in Plex. What are your thoughts on http / webserver based links?

    I am happy with everything, but why not doing something like the following on initialisation:

    import shutil
    shutil.copy(os.path.join(Prefs[PREFS_LOGO_PATH], icon_channelnumber), Resources_folder)

    That is more a showcase, but it worked for me with static paths in shutil.copy. Biggest benefit would be that no further changes are required. Only some lines for copying the logos from external directory to resource folder initially.

    Quote, yeah, thought of something similar last night, thinking of either that or using a copy_tree function.

  • zyninezynine Posts: 576Members, Plex Pass Plex Pass

    @daeks, let me know how 1.0.0 works for you.

  • daeksdaeks Posts: 71Members, Plex Pass Plex Pass
    edited March 22

    @zynine said:
    @daeks, let me know how 1.0.0 works for you.

    I have tested it and got an exception:

    2017-03-22 07:29:46,549 (1804) : DEBUG (logkit:13) - ---------- LoadChannelIcons
    2017-03-22 07:29:46,565 (1804) : ERROR (logkit:22) - ########## Reset: : (2, 'No such file or directory'): [Errno 2] No such file or directory: u'\\?\D:\plex_test\Plex Media Server\Plug-ins\HDHRViewerV2.bundle\Contents\Resources\Icons\logo-5002.png'

    edit It looks like that it fails cause the "Icons" directory does not exist. Creating an "Icons" directory manually results in a successfull copy but the icons do not get loaded. Anyhow I am not quite sure if we would need a reload button for it. I tried it successfully with the following code starting on L142:

    # Load Channel Icon
    Local_iconpath = Prefs[PREFS_ICONDIR]
    if dirExists(Local_iconpath):
        try:
            logDebug('Load Channel Icons from ' + Local_iconpath)
            Resources_iconpath = Core.storage.join_path(Core.bundle_path,'Contents','Resources')
            for filename in Core.storage.list_dir(Local_iconpath):
                src = Core.storage.join_path(Local_iconpath,filename)
                dest = Core.storage.join_path(Resources_iconpath,filename)
                if os.path.isfile(src) and not os.path.isfile(dest):
                    Core.storage.copy(src,dest)
        except Exception as inst:
            logError('Reset: '+strError(inst))

    It iterates each time over all icons and only copies them if they do not exist on dest. I do not know if that has any performance influence on directories having many icons, but just iterating over a directory listing should normally be fast.

  • zyninezynine Posts: 576Members, Plex Pass Plex Pass

    @daeks said:

    @zynine said:
    @daeks, let me know how 1.0.0 works for you.

    I have tested it and got an exception:

    2017-03-22 07:29:46,549 (1804) : DEBUG (logkit:13) - ---------- LoadChannelIcons
    2017-03-22 07:29:46,565 (1804) : ERROR (logkit:22) - ########## Reset: : (2, 'No such file or directory'): [Errno 2] No such file or directory: u'\\?\D:\plex_test\Plex Media Server\Plug-ins\HDHRViewerV2.bundle\Contents\Resources\Icons\logo-5002.png'

    edit It looks like that it fails cause the "Icons" directory does not exist. Creating an "Icons" directory manually results in a successfull copy but the icons do not get loaded. Anyhow I am not quite sure if we would need a reload button for it. I tried it successfully with the following code starting on L142:

    # Load Channel Icon
    Local_iconpath = Prefs[PREFS_ICONDIR]
    if dirExists(Local_iconpath):
        try:
            logDebug('Load Channel Icons from ' + Local_iconpath)
            Resources_iconpath = Core.storage.join_path(Core.bundle_path,'Contents','Resources')
            for filename in Core.storage.list_dir(Local_iconpath):
                src = Core.storage.join_path(Local_iconpath,filename)
                dest = Core.storage.join_path(Resources_iconpath,filename)
                if os.path.isfile(src) and not os.path.isfile(dest):
                    Core.storage.copy(src,dest)
        except Exception as inst:
            logError('Reset: '+strError(inst))

    It iterates each time over all icons and only copies them if they do not exist on dest. I do not know if that has any performance influence on directories having many icons, but just iterating over a directory listing should normally be fast.

    My bad, I pointed to the wrong folder. Icons folder won't work because Plex plugins can't handle subfolders in resources folder with R() function. Reload function is for overwriting existing files. I'll update it tonight.

Sign In or Register to comment.