(2018-07-21, 09:09)jurialmunkey Wrote: (2018-07-19, 12:31)cartman.dos Wrote: Hi, i'm finalizing a new mod here. and there are a few things I really want to have but not sure if can possibly be done or are HARDCODED into kodi's behavior.
1) going back from fullvideo to last window (INCLUDING DIALOG INFO) -
Say I enter a movie/tvshow and started playing video fullscreen.
Desired behavior: going back/stop video returns to last window, in this case, DIALOG VIDEO INFO.
Currently: going back brings to last window such as home/tvshows/season/episodes....but not dialog info.
2) When playing an episode, from episodes viewtype/widgets... Next button doesn't work. I assume this happens since there's no queue in the playlist.
But it seems plausible that playing hitting next when playing episode will bring to next episode (unless playlist was specified).
Core or skinnable? (and yeah i know about ''play next auto'' or ''next up'' addon, i'm talking about next from osd button itself).
Unfortunately, neither is really possible without a script of some sort.
For (1), the video info dialog closes before playback starts, so the return is always going to be the base window rather than the info dialog.
Also, @mardukL suggestion wont work. However, you can do something similar in VideoFullScreen.xml
Code:
<onunload>AlarmClock(loadinfo,Action(Info),00:00,silent)</onunload>
^^ This will work. You need to have the AlarmClock so that the Action(Info) command is delayed until after the video closes.
- The problem is that you need some condition to check whether or not you came from the info dialog. But you can't use Window.Previous(name) as that doesn't take account of dialogs, only base windows.
- You could set a window property when opening the infodialog and then check if it is set in the onunload command, but the problem is then clearing the property when leaving the infodialog. If you use <onunload>ClearProperty(name,Home)</onunload> in the info dialog, it will clear before playing because Kodi forces all dialogs to close before playback starts.
- I personally cannot think of any non-scripted solution that isn't overly convoluted.
For (2), you are correct. Skip only plays next item in playlist. You would need to figure out someway to add the next item to the playlist automatically. Again, I can think of very convoluted ways to do it, but really it would be much better served via some sort of script like NextUp.
Thanks a lot for your reply.
(1) OK, so I tested it. I let the id=8 (play button) to set the property when clicked.
Code:
<onclick>SetProperty(BaseWindow,InfoDialog,Home)</onclick>
Then in fullvideo:
Code:
<onunload condition="String.IsEqual(Window(Home).Property(BaseWindow),InfoDialog)">AlarmClock(loadinfo,Action(Info),00:00,silent)</onunload>
and lastly in dialoginfo:
Code:
<onload condition="String.IsEqual(Window(Home).Property(BaseWindow),InfoDialog)">ClearProperty(BaseWindow,Home)</onload>
This is one of these things that i can see being buggy as hell. But from quick-testing, what i encountered is the situation that if I enter infodialog of a media from HOME WIDGET, playing and then returning to infodialog, works IF AND ONLY IF the homewidget did not lose focus. Since the loadinfo action is happening on the focused media (in the actual base window) regardless of what media was in play. in most scenerios the trick worked (and it will work probably 100% of times media is played from the actual episode/movie viewtypes), but if the widget (in home window) was refreshed, and thus last focused widget is now a different media then it will load a different media's infodialog.
If I could call infodialog on a specific item then i can actually set the property to be that item, and then open it regardless on base window focus...
(2) yeah it's probably doesn't worth the trouble, i think i shall compromise on hiding this buttons if no next/previous...
(BONUS QUESTION
) Do you/or anyone for this matter, happen to know if possible to call "play from beginning" command (built-in context menu command) , from info dialog custom button?
Couldn't find action id or any info on that command, alternatively could ''reset resume mark'' & play. But didn't find any clue on how to do this...
@
mardukL thanks for the input man.