Beta Up Next
(2020-11-15, 18:02)FXB78 Wrote: You are missing the point, what if your show has only 20 seconds of credits, and you set it to play the next episode with 50 seconds remaining (60 secs minus the 10 it shows the notification). In that scenario you're missing the last 30 seconds of the show. So the current way leaves it in the users hands to simply press one button to play the next episode.
No FX, you're missing the point. The majority of shows run credits for a minimum of 30 seconds, which would explain why the default setting for the notification to pop up is 30 seconds. I say minimum 30 seconds, because I have yet to see any show or movie with credits that run less than that, in fact most credits run for well over 60 seconds. Having a minimum and maximum setting would allow users to play with the settings to find a happy medium of when the notification appears, and how long it stays up before playing the next file.
The addon already calculates the file's playing time, and uses that with the settings the user selects.
An example of what I'm referring to... In the settings.xml this code sets the auto play time length:
xml:
<category label="30600"> <!-- Behaviour -->
        <setting label="30603" type="enum" id="autoPlayMode" lvalues="30040|30041" default="0"/>
        <setting label="30032" type="bool" id="enablePlaylist" default="false"/>
        <setting label="30605" type="bool" id="includeWatched" default="false"/>
        <setting label="30607" type="slider" id="playedInARow" default="3" range="0,1,15" option="int"/>
        <setting label="30609" type="lsep"/> <!-- Autoplay duration -->
        <setting label="30611" type="bool" id="customAutoPlayTime" default="true"/>
        <setting label="30613" type="slider" id="autoPlaySeasonTime" default="30" range="0,5,120" option="int" subsetting="true" visible="eq(-1,false)"/>
        <setting label="30615" type="slider" id="autoPlayTimeXS" default="15" range="0,5,120" option="int" subsetting="true" visible="eq(-2,true)"/>
        <setting label="30617" type="slider" id="autoPlayTimeS" default="30" range="0,5,120" option="int" subsetting="true" visible="eq(-3,true)"/>
        <setting label="30619" type="slider" id="autoPlayTimeM" default="40" range="0,5,120" option="int" subsetting="true" visible="eq(-4,true)"/>
        <setting label="30621" type="slider" id="autoPlayTimeL" default="50" range="0,5,120" option="int" subsetting="true" visible="eq(-5,true)"/>
        <setting label="30623" type="slider" id="autoPlayTimeXL" default="60" range="0,5,120" option="int" subsetting="true" visible="eq(-6,true)"/>
    </category>

The code in the xml file calls to the python scripts to execute the proper function, such as:

python:
# Some consumers send the offset when the credits start (e.g. Netflix)
        if total_time and self.data.get('notification_offset'):
            return total_time - int(self.data.get('notification_offset'))

        # Use a customized notification time, when configured
        if total_time and get_setting_bool('customAutoPlayTime'):
            if total_time > 60 * 60:
                return get_setting_int('autoPlayTimeXL')
            if total_time > 40 * 60:
                return get_setting_int('autoPlayTimeL')
            if total_time > 20 * 60:
                return get_setting_int('autoPlayTimeM')
            if total_time > 10 * 60:
                return get_setting_int('autoPlayTimeS')
            return get_setting_int('autoPlayTimeXS')

In the script.py file for UpNext I found this code:

python:
def test_popup(window):
    popup = TestPopup(window, addon_path(), 'default', '1080i')
    popup.show()
    step = 0
    wait = 100
    wait_s = wait / 1000
    timeout = 10000
    monitor = Monitor()
    while popup and step < timeout and not monitor.abortRequested():
        if popup.pause:
            continue
        monitor.waitForAbort(wait_s)
        popup.update_progress_control(timeout, wait)
        step += wait

If I'm correct the timeout setting is possibly the time the window remains visible, or waits for the user to perform an action or not, such as pressing the enter key to play the next episode now or not....
From the playbackmanager.py file I see this code:

python:
def extract_play_info(self, next_up_page, showing_next_up_page, showing_still_watching_page, still_watching_page):
        if showing_next_up_page:
            next_up_page.close()
            should_play_default = not next_up_page.is_cancel()
            should_play_non_default = next_up_page.is_watch_now()
        elif showing_still_watching_page:
            still_watching_page.close()
            should_play_default = still_watching_page.is_still_watching()
            should_play_non_default = still_watching_page.is_still_watching()

So.... In the XML file, adding code to allow the user to set a maximum time for the window to show, in addition to the minimum time for the window to appear. This would make the call to the python script, most likely the playbackmanager.py or the monitor.py file, to the new code such as:

pthyon:
 event(message='NEXTUPWATCHEDSIGNAL', data=dict(episodeid=self.state.current_episode_id), encoding='base64')
        if playlist_item or self.state.queued:
try:
            play_time = self.player.getTime()
            total_time = self.player.getMAXTime()
            # Play playlist media
            if should_play_default:
                     self.player.playnext()
       

I added the code 'total_time = self.player.getMAXTime()' as an example. The MAXTime definition would have to be set of course, and would be set by the user's choice in the maximum time setting....

I'm not saying it would be easy, I don;t know if it would be or not. I know there would need to be at least two files that need to be modified, most likely more from what I'm seeing by going through the files to find out how it works. I use to code with C and C++ waaaaaay back in the day, but have never played with python. So I'm not familiar with how it all works... But I know this could be done.
Reply


Messages In This Thread
Up Next - by im85288 - 2018-10-21, 19:55
RE: Up Next - by Hitcher - 2018-10-21, 22:20
RE: Up Next - by im85288 - 2018-10-22, 09:12
RE: Up Next - by RossL87 - 2018-10-22, 00:21
RE: Up Next - by im85288 - 2018-10-22, 09:17
RE: Up Next - by im85288 - 2018-10-22, 20:36
RE: Up Next - by Hitcher - 2018-10-22, 22:44
RE: Up Next - by im85288 - 2018-10-23, 09:02
RE: Up Next - by Hitcher - 2018-10-23, 16:05
RE: Up Next - by jrod10133 - 2018-10-22, 21:22
RE: Up Next - by im85288 - 2018-10-23, 08:59
RE: Up Next - by Firetv344 - 2018-10-23, 03:47
RE: Up Next - by im85288 - 2018-10-23, 09:01
RE: Up Next - by sualfred - 2018-10-23, 09:19
RE: Up Next - by sualfred - 2018-10-23, 09:30
RE: Up Next - by cscott1 - 2018-10-23, 14:52
RE: Up Next - by Hitcher - 2018-10-23, 16:04
RE: Up Next - by cscott1 - 2018-10-23, 17:35
RE: Up Next - by DarrenHill - 2018-10-23, 18:53
RE: Up Next - by im85288 - 2018-10-23, 19:10
RE: Up Next - by cscott1 - 2018-10-23, 21:12
RE: Up Next - by Hitcher - 2018-10-23, 21:23
RE: Up Next - by cscott1 - 2018-10-23, 22:18
RE: Up Next - by Hitcher - 2018-10-23, 23:08
RE: Up Next - by cscott1 - 2018-10-23, 23:14
RE: Up Next - by Gummix - 2018-10-24, 20:55
RE: Up Next - by im85288 - 2018-10-25, 18:56
RE: Up Next - by jrod10133 - 2018-10-27, 21:00
RE: Up Next - by im85288 - 2018-10-28, 11:37
RE: Up Next - by drinfernoo - 2018-12-12, 22:24
RE: Up Next - by beeswax - 2018-12-14, 16:06
RE: Up Next - by Hitcher - 2018-12-15, 11:38
RE: Up Next - by McButton - 2018-12-15, 22:02
Up Next - by enen92 - 2018-12-15, 22:35
RE: Up Next - by Hitcher - 2018-12-16, 13:01
RE: Up Next - by melons2 - 2018-12-16, 17:59
RE: Up Next - by Hitcher - 2018-12-16, 18:48
RE: Up Next - by Gade - 2018-12-16, 22:25
RE: Up Next - by melons2 - 2018-12-16, 22:54
RE: Up Next - by dnlg - 2018-12-21, 16:40
RE: Up Next - by DNKK - 2018-12-25, 18:05
RE: Up Next - by DNKK - 2018-12-25, 18:13
RE: Up Next - by Alexander78 - 2018-12-29, 17:13
RE: Up Next - by Alexander78 - 2019-01-03, 14:22
RE: Up Next - by angus2064 - 2019-01-04, 05:55
RE: Up Next - by C.O.D. - 2019-01-04, 15:08
RE: Up Next - by Hitcher - 2019-01-04, 17:13
RE: Up Next - by C.O.D. - 2019-01-04, 17:31
RE: Up Next - by Hitcher - 2019-01-04, 19:12
RE: Up Next - by Blurayx - 2019-01-05, 09:50
RE: Up Next - by Hitcher - 2019-01-05, 17:25
RE: Up Next - by Blurayx - 2019-01-12, 03:41
RE: Up Next - by FXB78 - 2020-02-14, 13:37
RE: Up Next - by Dumyat - 2020-02-14, 15:35
Up Next - by MB1968 - 2019-01-08, 02:10
RE: Up Next - by mrm1st3r - 2019-01-08, 05:10
RE: Up Next - by badboy123 - 2019-01-08, 20:10
RE: Up Next - by Alexander78 - 2019-01-09, 18:11
RE: Up Next - by Rake132 - 2019-01-10, 11:25
RE: Up Next - by mardukL - 2019-01-10, 17:05
RE: Up Next - by adun79 - 2019-01-12, 03:10
RE: Up Next - by Hitcher - 2019-01-12, 10:51
RE: Up Next - by mardukL - 2019-01-12, 23:39
RE: Up Next - by Blurayx - 2019-02-09, 01:42
RE: Up Next - by mardukL - 2019-02-09, 10:51
RE: Up Next - by Blurayx - 2019-02-12, 03:09
RE: Up Next - by mardukL - 2019-02-12, 06:23
RE: Up Next - by childofkorn - 2022-03-06, 23:32
RE: Up Next - by adun79 - 2019-01-12, 22:31
RE: Up Next - by NewYears1978 - 2019-01-15, 21:16
RE: Up Next - by cartman.dos - 2019-01-15, 21:23
RE: Up Next - by Txemoto - 2019-01-22, 15:43
RE: Up Next - by Thierry_Gougeon - 2019-01-31, 19:37
RE: Up Next - by danmedhurst - 2019-02-08, 10:25
RE: Up Next - by Hitcher - 2019-02-08, 10:51
RE: Up Next - by danmedhurst - 2019-02-08, 11:46
RE: Up Next - by Hitcher - 2019-02-08, 12:35
Up Next - by MB1968 - 2019-02-08, 22:30
RE: Up Next - by freepalm - 2019-02-12, 15:27
RE: Up Next - by boredazfcuk - 2019-02-16, 00:56
RE: Up Next - by starkman - 2019-02-24, 21:17
RE: Up Next - by beeswax - 2019-02-24, 22:03
RE: Up Next - by thomasorr - 2019-03-01, 15:37
RE: Up Next - by thomasorr - 2019-03-01, 20:44
RE: Up Next - by aerogems - 2019-05-07, 22:04
RE: Up Next - by wrp_199 - 2019-06-18, 18:51
RE: Up Next - by taoxtrece - 2019-03-19, 18:41
RE: Up Next - by taoxtrece - 2019-06-26, 09:22
RE: Up Next - by vurt - 2019-03-20, 05:33
RE: Up Next - by Hitcher - 2019-03-20, 09:16
RE: Up Next - by DNKK - 2019-04-14, 08:31
RE: Up Next - by inaudibledirge - 2019-05-28, 19:09
RE: Up Next - by gb160 - 2019-06-09, 23:56
RE: Up Next - by edjalmo - 2019-07-12, 19:44
RE: Up Next - by nomnom27 - 2019-07-24, 06:02
RE: Up Next - by Hitcher - 2019-07-24, 07:19
RE: Up Next - by nomnom27 - 2019-07-24, 14:37
RE: Up Next - by Hitcher - 2019-07-24, 18:00
RE: Up Next - by nomnom27 - 2019-07-26, 22:03
RE: Up Next - by Hitcher - 2019-07-26, 22:46
RE: Up Next - by TimeZone - 2019-07-31, 15:26
RE: Up Next - by Penbrock - 2019-08-25, 16:34
RE: Up Next - by Penbrock - 2019-08-25, 16:36
RE: Up Next - by Kupo91 - 2019-09-07, 19:18
RE: Up Next - by Cinephile - 2019-09-08, 01:03
RE: Up Next - by estuary_enthusiast - 2019-10-02, 06:22
RE: Up Next - by scofield272 - 2019-10-02, 06:37
RE: Up Next - by Hitcher - 2019-10-02, 09:16
RE: Up Next - by scofield272 - 2019-10-03, 19:11
RE: Up Next - by Contopaxi - 2019-11-10, 12:23
RE: Up Next - by R.O.H.3000 - 2019-10-03, 01:44
RE: Up Next - by R.O.H.3000 - 2019-10-03, 14:54
RE: Up Next - by Hitcher - 2019-10-03, 15:58
RE: Up Next - by R.O.H.3000 - 2019-10-03, 16:54
RE: Up Next - by R.O.H.3000 - 2019-10-03, 20:26
RE: Up Next - by Hitcher - 2019-10-03, 19:19
RE: Up Next - by R.O.H.3000 - 2019-10-03, 20:24
RE: Up Next - by Hitcher - 2019-10-03, 23:20
RE: Up Next - by monisriz - 2019-10-11, 05:52
RE: Up Next - by Hitcher - 2019-10-11, 07:16
RE: Up Next - by monisriz - 2019-10-13, 21:22
RE: Up Next - by ntilikp - 2019-10-17, 07:43
RE: Up Next - by DNKK - 2019-11-16, 06:00
RE: Up Next - by Hitcher - 2019-11-16, 10:50
RE: Up Next - by DNKK - 2019-11-16, 14:07
RE: Up Next - by stathis95194 - 2019-11-17, 20:28
RE: Up Next - by Klojum - 2019-11-17, 20:57
RE: Up Next - by Doctor Eggs - 2019-12-04, 01:04
RE: Up Next - by metallyca - 2019-12-08, 21:53
RE: Up Next - by adi1 - 2019-12-12, 15:17
RE: Up Next - by ntilikp - 2019-12-14, 15:20
RE: Up Next - by rfrayer - 2019-12-17, 04:15
RE: Up Next - by Hitcher - 2019-12-17, 08:23
RE: Up Next - by Banest - 2019-12-29, 06:20
RE: Up Next - by Hitcher - 2019-12-29, 11:05
RE: Up Next - by Banest - 2019-12-29, 13:11
RE: Up Next - by Hitcher - 2019-12-29, 13:46
RE: Up Next - by Banest - 2019-12-30, 08:20
RE: Up Next - by mind12 - 2020-01-05, 21:29
RE: Up Next - by Hitcher - 2020-01-05, 21:58
RE: Up Next - by mind12 - 2020-01-05, 22:02
RE: Up Next - by Hitcher - 2020-01-05, 23:39
RE: Up Next - by mind12 - 2020-01-06, 10:06
RE: Up Next - by Hitcher - 2020-01-06, 18:15
RE: Up Next - by mind12 - 2020-01-07, 09:57
RE: Up Next - by ntilikp - 2020-01-22, 02:01
RE: Up Next - by mind12 - 2020-01-22, 15:06
RE: Up Next - by Hitcher - 2020-01-22, 16:55
RE: Up Next - by mind12 - 2020-01-22, 17:00
RE: Up Next - by GhostCasper - 2020-01-23, 04:28
RE: Up Next - by D-m-x - 2020-02-20, 19:08
RE: Up Next - by FXB78 - 2020-02-20, 19:12
RE: Up Next - by Reckoner89 - 2020-02-20, 21:24
RE: Up Next - by Hitcher - 2020-01-22, 18:54
RE: Up Next - by tuvx - 2020-01-27, 08:03
RE: Up Next - by ShadowTek - 2020-01-28, 23:04
RE: Up Next - by e.emizerp - 2020-07-27, 10:39
RE: Up Next - by FXB78 - 2020-02-14, 16:19
RE: Up Next - by Kupo91 - 2020-03-02, 18:57
RE: Up Next - by FXB78 - 2020-03-02, 19:08
RE: Up Next - by raptorjr - 2020-03-29, 00:47
RE: Up Next - by malvinas2 - 2020-04-06, 19:58
RE: Up Next - by snyft - 2020-04-12, 23:51
RE: Up Next - by Hitcher - 2020-04-13, 08:47
RE: Up Next - by Chillbo - 2020-04-18, 10:13
RE: Up Next - by FXB78 - 2020-07-27, 11:22
RE: Up Next - by Kupo91 - 2020-04-28, 02:54
RE: Up Next - by Shipwreck - 2020-11-22, 15:01
RE: Up Next - by Kupo91 - 2020-12-05, 16:45
RE: Up Next - by jrhenk - 2020-08-01, 18:00
RE: Up Next - by Leeonn - 2020-08-25, 19:43
RE: Up Next - by gromgsxr - 2020-09-27, 22:54
RE: Up Next - by HeresJohnny - 2020-10-10, 22:19
RE: Up Next - by Wanilton - 2020-10-10, 22:35
RE: Up Next - by Hitcher - 2020-10-11, 00:57
RE: Up Next - by inzzzomnia - 2020-11-06, 23:38
RE: Up Next - by FXB78 - 2020-11-07, 03:35
RE: Up Next - by inzzzomnia - 2020-11-07, 05:11
RE: Up Next - by Ric_ - 2020-11-10, 14:59
RE: Up Next - by Hitcher - 2020-11-07, 00:46
RE: Up Next - by Shipwreck - 2020-11-15, 00:49
RE: Up Next - by Hitcher - 2020-11-15, 02:36
RE: Up Next - by Shipwreck - 2020-11-15, 16:28
RE: Up Next - by FXB78 - 2020-11-15, 17:24
RE: Up Next - by Shipwreck - 2020-11-15, 17:42
RE: Up Next - by snyft - 2020-11-15, 16:09
RE: Up Next - by FXB78 - 2020-11-15, 18:02
RE: Up Next - by Shipwreck - 2020-11-15, 22:36
RE: Up Next - by FXB78 - 2020-11-15, 22:52
RE: Up Next - by Shipwreck - 2020-11-15, 23:54
RE: Up Next - by FXB78 - 2020-11-16, 00:20
RE: Up Next - by Shipwreck - 2020-11-16, 00:23
RE: Up Next - by yaqwa - 2020-11-16, 12:48
RE: Up Next - by FXB78 - 2020-11-16, 15:26
RE: Up Next - by zacly - 2020-11-22, 12:22
RE: Up Next - by Comma - 2020-12-07, 17:03
RE: Up Next - by FXB78 - 2020-12-10, 21:29
RE: Up Next - by kenmoon - 2021-01-03, 17:51
RE: Up Next - by FXB78 - 2021-02-02, 15:07
RE: Up Next - by kenmoon - 2021-02-02, 15:19
RE: Up Next - by LupinSansei - 2021-02-23, 21:49
RE: Up Next - by LupinSansei - 2021-03-11, 00:12
RE: Up Next - by KoenDeMol - 2021-02-02, 13:44
RE: Up Next - by KoenDeMol - 2021-02-02, 13:46
RE: Up Next - by saiyen2012 - 2021-02-25, 21:59
RE: Up Next - by User X0S5 - 2021-03-03, 19:53
RE: Up Next - by saiyen2012 - 2021-03-03, 22:21
RE: Up Next - by saiyen2012 - 2021-03-03, 22:22
RE: Up Next - by ambulancePilot - 2021-07-20, 22:17
RE: Up Next - by Hitcher - 2021-07-20, 22:40
RE: Up Next - by mardukL - 2021-10-16, 15:33
RE: Up Next - by Shipwreck - 2021-10-16, 17:02
RE: Up Next - by mardukL - 2021-10-16, 17:45
RE: Up Next - by Shipwreck - 2021-10-16, 18:17
RE: Up Next - by mardukL - 2021-10-19, 16:06
RE: Up Next - by childofkorn - 2022-03-07, 01:11
RE: Up Next - by mardukL - 2022-03-10, 08:49
RE: Up Next - by childofkorn - 2022-03-10, 23:02
RE: Up Next - by Bermystar - 2022-05-03, 19:58
RE: Up Next - by Thomiehawk - 2022-07-03, 20:55
RE: Up Next - by Thomiehawk - 2022-07-03, 22:56
RE: Up Next - by Groooompf - 2022-09-09, 19:40
RE: Up Next - by izprtxqkft - 2023-04-07, 23:34
RE: Up Next - by Zuikkis - 2023-10-10, 12:21
RE: Up Next - by snyft - 2023-10-10, 22:18
RE: Up Next - by Rolemodel8 - 2023-10-27, 09:17
RE: Up Next - by thezoggy - 2023-10-28, 20:30
RE: Up Next - by Spikey-Welsh - 2023-12-31, 19:22
RE: Up Next - by Spikey-Welsh - 2023-12-31, 23:22
RE: Up Next - by Hitcher - 2024-01-03, 16:33
Nextup - by Input1963 - 2023-03-26, 14:30
RE: Nextup - by Hitcher - 2023-03-26, 16:47
RE: Nextup - by Input1963 - 2023-03-26, 17:32
RE: Nextup - by Hitcher - 2023-03-26, 19:26
Up Next - feature request - by 5uv80xep - 2024-04-05, 21:59
Logout Mark Read Team Forum Stats Members Help
Up Next1