few small question about ''bypassing'' kodi core behavior
#1
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).
Reply
#2
1. Dialog: 
dod you try add in videofullscreen.xml
<onunload contition="****">ActivateWindow(DialogVideoinfo)</onunload> 

other solution, im not aware.

2. No idea.(unsure if you have play automatically next episode/item enabled) , than toggle repeat all osd button will work)
Skins |  Titan M O D   •   S W A N (WIP)
Reply
#3
(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.
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#4
(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  Big Grin ) 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.
Reply
#5
2. My theory, use script.nextup, whats about,

If set this tag for next button

Onfocus condition=" VideoPlayer.Content(episode)"- set focus (window id of nextup id Huhbutton id= 3012 Huh)

I think, (cant test, just my theory)
Titan use to play next ,with next up script , also unsure if its allowed to be hidden focus)
Skins |  Titan M O D   •   S W A N (WIP)
Reply
#6
3. If you just want start at beginning

PlayMedia([playoffset=0])

Wiki excerp : Plays the media. This can be a playlist, music, or video file, directory, plugin or a url. The optional parameter ",isdir" can be used for playing a directory. ",1" will start a video in a preview window, instead of fullscreen. If media is a playlist, you can use playoffset=xx where xx is the position to start playback from.
PlayWith()
Skins |  Titan M O D   •   S W A N (WIP)
Reply
#7
(2018-07-21, 15:08)mardukL Wrote: 3. If you just want start at beginning

PlayMedia([playoffset=0])

Wiki excerp : Plays the media. This can be a playlist, music, or video file, directory, plugin or a url. The optional parameter ",isdir" can be used for playing a directory. ",1" will start a video in a preview window, instead of fullscreen. If media is a playlist, you can use playoffset=xx where xx is the position to start playback from.
PlayWith()
From reading the wiki I was sure it means a position inside a playlist queue, as in (ep. 1, ep. 2, ep.3 , ...). Anyway, tried it and it doesn't work...
Reply
#8
(2018-07-21, 21:39)cartman.dos Wrote: From reading the wiki I was sure it means a position inside a playlist queue, as in (ep. 1, ep. 2, ep.3 , ...). Anyway, tried it and it doesn't work...

Oh, its a bit embararrasing to me,that i overrread that...sorry
Skins |  Titan M O D   •   S W A N (WIP)
Reply
#9
(2018-07-22, 10:48)mardukL Wrote:
(2018-07-21, 21:39)cartman.dos Wrote: From reading the wiki I was sure it means a position inside a playlist queue, as in (ep. 1, ep. 2, ep.3 , ...). Anyway, tried it and it doesn't work...

Oh, its a bit embararrasing to me,that i overrread that...sorry 
yeah, but it could be helpful since if you use playmedia ON A PLAYLIST and choose an offset position it actually does BYPASS RESUME POINT...but doing that creates new problems.

I'm still searching for how to PLAY FROM BEGINNING directly (no context menu).
For resuming, PlayMedia(media,resume) works flawlessly... (WHY ISN'T IT IN WIKI...  Confused )
Reply

Logout Mark Read Team Forum Stats Members Help
few small question about ''bypassing'' kodi core behavior0