Kodi Community Forum
[RELEASE] TV Show Next Aired (Script) Addon - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Program Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=151)
+---- Thread: [RELEASE] TV Show Next Aired (Script) Addon (/showthread.php?tid=79493)



RE: [RELEASE] TV Show Next Aired (Script) Addon - RavenNL - 2012-09-18

(2012-09-18, 01:48)ronie Wrote:
(2012-09-18, 01:18)pelo1968 Wrote: I've been having an annoying issue. for most of the tvshows I watch I delete them after I watch the episode. Which means that for the most part my tvshow folders are almost always empty. I also use the "hideemptyseries" option in advancedsettings.xml to clean up my tvseries view ( I have about 30 shows that I watch, it makes for a long list).
I don'T know quite how to put this, but since "next-aired" addon only display shows that appear in TVseries view, it only shows me tvshow that have episodes in the folder. It would be a lot better for me if it would scan the source and use the folder names to make it's scan wether or not there are any episodes in them.
I hope I made sence. I've research for a way around this and found nothing. I'm hoping you can find a fix
(I just reread myself and I think my tone is a bit off, but I don'T know how to be more polite without making it more confusing)
thanks

hmmm... i should already work like that.
next aired doesn't care if there's any episodes in the tv show folder or not.

all it does is get a list (from the xbmc database) of the tv shows in your library (empty or not),

provide a debug log of a fresh scan ( next aired addon settings > rescan tv guide data)
and give me a few examples of tv shows that should show up but are not listed.

I also experience this issue what pelo1968 is saying. I thought it was normal behavior. Probably next week I can supply a Debug Log if it's still needed as I have some new shows airing then.



RE: [RELEASE] TV Show Next Aired (Script) Addon - pelo1968 - 2012-09-20

ok I got the log file you asked for , I did you one better, I did a rescan without some of the eps in it and added new eps and did a scan again (updated the library between the two of course).
I don'T fell confortable using pastebin with this data so if you can pm me your email I will send it to you that way.
Some things I realised I should probably have mentionned before :
1- I'm using Raspbmc a version of xbmc compiled specificaly for the Raspberry Pi computer.
2- The files are on a network shared folder using NFS
3- While the rescan is happening I can see in the dialog box that it only scans for the shows showing in the TVSeries screen



RE: [RELEASE] TV Show Next Aired (Script) Addon - ronie - 2012-09-20

(2012-09-20, 01:39)pelo1968 Wrote: I don'T fell confortable using pastebin with this data so if you can pm me your email I will send it to you that way.

you can use www.xbmclogs.com and mark it as private / password protect.
pm me the link + password and i'll have a look.


RE: [RELEASE] TV Show Next Aired (Script) Addon - ronie - 2012-09-29

(2012-09-20, 01:39)pelo1968 Wrote: ok I got the log file you asked for , I did you one better, I did a rescan without some of the eps in it and added new eps and did a scan again (updated the library between the two of course).
I don'T fell confortable using pastebin with this data so if you can pm me your email I will send it to you that way.
Some things I realised I should probably have mentionned before :
1- I'm using Raspbmc a version of xbmc compiled specificaly for the Raspberry Pi computer.
2- The files are on a network shared folder using NFS
3- While the rescan is happening I can see in the dialog box that it only scans for the shows showing in the TVSeries screen
ok, the problem seems to be that your empty tv show folders are not being scanned to the library.
i think you may need to put an .nfo file in each directory, so xbmc will add them regardless whether they're empty or not.



RE: [RELEASE] TV Show Next Aired (Script) Addon - pelo1968 - 2012-10-05

Quote:i think you may need to put an .nfo file in each directory

**********************************************************************************
****EDIT : never mind, it's now working fine, with an [showname].nfo file ******
**********************************************************************************

I tried putting an empty [showname].nfo file in each dir, same name as the dir. didn'T seem to do much.
Does the .nfo file need to contain anything ?
I also modified my setup so that my remote dir is now mounted localy. that didn'T do anything either

Thanks for all the help , it is appreciated even if we don'T say it enough

PS: i just had a tought , should I give the .nfo file a name like showname.1x01.nfo , as a fake episode would next-aired then recognise it ?



RE: [RELEASE] TV Show Next Aired (Script) Addon - sarakha63 - 2012-10-10

great plugin but i have a problem

I'm french (membre xbmc passion), and the problem is for tvshows which have different name in english and french, they are not scanned.


For example i have a tvwho : Les simpson it doesn't appear in the guide.

But if i rename it The simpsons in xbmc it appears.


You have the same problem with Le trône de fer/game of thrones
les experts miami/ csi miami

and so on

is there any solution , i think there should be one as in tvdb you have the french title assoiated with it's orignial title?

Can you tell me more about this

Thanks


RE: [RELEASE] TV Show Next Aired (Script) Addon - pelo1968 - 2012-10-10

ronnie recommended puting in a .nfo file in my folders to make it work, have you tried haveing the folder name with the french title and then putting an .nfo file with the english name so that aired-next would pick them up ? no idea if that would work but it might



RE: [RELEASE] TV Show Next Aired (Script) Addon - ronie - 2012-10-10

(2012-10-10, 16:20)sarakha63 Wrote: great plugin but i have a problem

I'm french (membre xbmc passion), and the problem is for tvshows which have different name in english and french, they are not scanned.


For example i have a tvwho : Les simpson it doesn't appear in the guide.

But if i rename it The simpsons in xbmc it appears.


You have the same problem with Le trône de fer/game of thrones
les experts miami/ csi miami

and so on

is there any solution , i think there should be one as in tvdb you have the french title assoiated with it's orignial title?

Can you tell me more about this

Thanks

xbmc does not download the original title from the tvdb,
so this info is not available to the script.


RE: [RELEASE] TV Show Next Aired (Script) Addon - sarakha63 - 2012-10-11

isn't it possible for you to permit foreign titles to be found on tvdb as they exist, as you use tvdb to catch the air date ?


RE: [RELEASE] TV Show Next Aired (Script) Addon - ronie - 2012-10-11

(2012-10-11, 11:36)sarakha63 Wrote: isn't it possible for you to permit foreign titles to be found on tvdb as they exist, as you use tvdb to catch the air date ?

the script does not use tvdb at all.
it fetches info from tvrage.com.


RE: [RELEASE] TV Show Next Aired (Script) Addon - sarakha63 - 2012-10-11

ah ok sorry.

And in tvrage theres isn't any foreign titles i suppose


RE: [RELEASE] TV Show Next Aired (Script) Addon - vanMiez - 2012-10-15


how can i get a list of the next five airing episodes regardless of the day they air?

currently this:

Code:
<control type="wraplist" id="4009">
                <posx>0</posx>
                <posy>0</posy>
                <width>207</width>
                <height>136</height>
                <onleft>-</onleft>
                <onup>300</onup>
                <ondown>4007</ondown>
                <onright>-</onright>
                <orientation>horizontal</orientation>
                <focusposition>0</focusposition>
                <scrolltime tween="cubic" easing="inout">1200</scrolltime>
                <itemlayout width="207" height="136">
                    <control type="image">
                            <description>Thumb</description>
                            <posx>0</posx>
                            <posy>0</posy>
                            <width>207</width>
                            <height>136</height>
                            <aspectratio>keep</aspectratio>
                            <texture background="true">$INFO[ListItem.Thumb]</texture>
                            <visible>StringCompare(Window(Home).Property(TVGuide.ThumbType),0)</visible>
                        </control>
                        <control type="image">
                            <description>Banner</description>
                            <posx>0</posx>
                            <posy>0</posy>
                            <width>207</width>
                            <height>136</height>
                            <aspectratio>keep</aspectratio>
                            <texture background="true">$INFO[ListItem.Property(Path),,banner.jpg]</texture>
                            <visible>StringCompare(Window(Home).Property(TVGuide.ThumbType),1)</visible>
                        </control>
                        <control type="image">
                            <description>Logo</description>
                            <posx>0</posx>
                            <posy>0</posy>
                            <width>207</width>
                            <height>136</height>
                            <aspectratio>keep</aspectratio>
                            <texture background="true">$INFO[ListItem.Property(Path),,logo.png]</texture>
                            <visible>StringCompare(Window(Home).Property(TVGuide.ThumbType),2)</visible>
                        </control>                    
                </itemlayout>
                <focusedlayout width="207" height="136">
                    <control type="image">
                            <description>Thumb</description>
                            <posx>0</posx>
                            <posy>0</posy>
                            <width>207</width>
                            <height>136</height>
                            <aspectratio>keep</aspectratio>
                            <texture background="true">$INFO[ListItem.Thumb]</texture>
                            <visible>StringCompare(Window(Home).Property(TVGuide.ThumbType),0)</visible>
                        </control>
                        <control type="image">
                            <description>Banner</description>
                            <posx>0</posx>
                            <posy>0</posy>
                            <width>207</width>
                            <height>136</height>
                            <aspectratio>keep</aspectratio>
                            <texture background="true">$INFO[ListItem.Property(Path),,banner.jpg]</texture>
                            <visible>StringCompare(Window(Home).Property(TVGuide.ThumbType),1)</visible>
                        </control>
                        <control type="image">
                            <description>Logo</description>
                            <posx>0</posx>
                            <posy>0</posy>
                            <width>207</width>
                            <height>136</height>
                            <aspectratio>keep</aspectratio>
                            <texture background="true">$INFO[ListItem.Property(Path),,logo.png]</texture>
                            <visible>StringCompare(Window(Home).Property(TVGuide.ThumbType),2)</visible>
                        </control>
                </focusedlayout>
                <content>
                    <item id="1">
                        <label>$INFO[Window(Home).Property(NextAired.1.Label)]</label>
                        <label2>$INFO[Window(Home).Property(NextAired.1.Network)]</label2>    
                        <property name="SELabel">$INFO[Window(Home).Property(NextAired.1.NextNumber)]</property>
                        <property name="AirTime">$INFO[Window(Home).Property(NextAired.1.AirTime)]</property>
                        <property name="Fanart">$INFO[Window(Home).Property(NextAired.1.Fanart)]</property>
                        <property name="Cover">$INFO[Window(Home).Property(NextAired.1.Thumb)]</property>
                        <property name="Thumb">$INFO[Window(Home).Property(NextAired.1.Thumb)]</property>
                        <visible>!IsEmpty(Window(Home).Property(NextAired.1.NextDate))</visible>
                        <onclick>-</onclick>
                    </item>
                    <item id="2">
                        <label>$INFO[Window(Home).Property(NextAired.2.Label)]</label>
                        <label2>$INFO[Window(Home).Property(NextAired.2.Network)]</label2>
                        <property name="SELabel">$INFO[Window(Home).Property(NextAired.2.NextNumber)]</property>
                        <property name="AirTime">$INFO[Window(Home).Property(NextAired.2.AirTime)]</property>
                        <property name="Fanart">$INFO[Window(Home).Property(NextAired.2.Fanart)]</property>
                        <property name="Cover">$INFO[Window(Home).Property(NextAired.2.Thumb)]</property>
                        <property name="Thumb">$INFO[Window(Home).Property(NextAired.2.Thumb)]</property>
                        <visible>!IsEmpty(Window(Home).Property(NextAired.2.NextDate))</visible>
                        <onclick>-</onclick>
                    </item>
                    <item id="3">
                        <label>$INFO[Window(Home).Property(NextAired.3.Label)]</label>
                        <label2>$INFO[Window(Home).Property(NextAired.3.Network)]</label2>
                        <property name="SELabel">$INFO[Window(Home).Property(NextAired.3.NextNumber)]</property>
                        <property name="AirTime">$INFO[Window(Home).Property(NextAired.3.AirTime)]</property>
                        <property name="Fanart">$INFO[Window(Home).Property(NextAired.3.Fanart)]</property>
                        <property name="Cover">$INFO[Window(Home).Property(NextAired.3.Thumb)]</property>
                        <property name="Thumb">$INFO[Window(Home).Property(NextAired.3.Thumb)]</property>
                        <visible>!IsEmpty(Window(Home).Property(NextAired.3.NextDate))</visible>
                        <onclick>-</onclick>
                    </item>
                    <item id="4">
                        <label>$INFO[Window(Home).Property(NextAired.4.Label)]</label>
                        <label2>$INFO[Window(Home).Property(NextAired.4.Network)]</label2>
                        <property name="SELabel">$INFO[Window(Home).Property(NextAired.4.NextNumber)]</property>
                        <property name="AirTime">$INFO[Window(Home).Property(NextAired.4.AirTime)]</property>
                        <property name="Fanart">$INFO[Window(Home).Property(NextAired.4.Fanart)]</property>
                        <property name="Cover">$INFO[Window(Home).Property(NextAired.4.Thumb)]</property>
                        <property name="Thumb">$INFO[Window(Home).Property(NextAired.4.Thumb)]</property>
                        <visible>!IsEmpty(Window(Home).Property(NextAired.4.NextDate))</visible>
                        <onclick>-</onclick>
                    </item>
                    <item id="5">
                        <label>$INFO[Window(Home).Property(NextAired.5.Label)]</label>
                        <label2>$INFO[Window(Home).Property(NextAired.5.Network)]</label2>
                        <property name="SELabel">$INFO[Window(Home).Property(NextAired.5.NextNumber)]</property>
                        <property name="AirTime">$INFO[Window(Home).Property(NextAired.5.AirTime)]</property>
                        <property name="Fanart">$INFO[Window(Home).Property(NextAired.5.Fanart)]</property>
                        <property name="Cover">$INFO[Window(Home).Property(NextAired.5.Thumb)]</property>
                        <property name="Thumb">$INFO[Window(Home).Property(NextAired.5.Thumb)]</property>
                        <visible>!IsEmpty(Window(Home).Property(NextAired.5.NextDate))</visible>
                        <onclick>-</onclick>
                    </item>
                </content>
            </control>

returns nothing today, because none of the episodes fetched by the script are airing today.

but if i change the windows system time & date to the date of tomorrow there are three items displayed.


RE: [RELEASE] TV Show Next Aired (Script) Addon - Vaikin - 2012-10-15

I asked something similar in a skin thread before(thinking it was a bug), but I was told that you can only get information about shows airing today(script limitation) Sad


RE: [RELEASE] TV Show Next Aired (Script) Addon - rbiez - 2012-10-25

Not sure if anyone else had this problem, but for me the "NextAired.TodayShow" and the connected todays list in the TV Guide would always be empty. I assumed it had to do with the fact that since Im situated in GMT+1, all my shows will air +1 day of the scrapped info. Figured out that with a few simple changes to the script files, and to the skin file for the tv guide calendar, it was fully operational again. Please correct me if there's a simpler way of doing this:

%AppData%\xbmc\addons\script.tv.show.next.aired\resources\lib\next_aired_dialog.py
Code:
def set_properties(self):
        for item in self.nextlist:
            try:
                airdays = item.get("Airtime").split(" at ")[0].split(', ')
            except:
                continue
            for day in airdays:
                if (day[0] == '0') or (day[0] == '1'):
                    continue
                listitem = self.setLabels('listitem', item, True)
                nextdate = item.get("RFC3339" , "" )[:10]
                latest = item.get("Latest Episode","").split("^") # NEW
                if len(nextdate) == 10:
                    if self.is_in_current_week(nextdate):
                        self.listitems[day].append(listitem)
                    elif len(latest[2]) == 11:                        # NEW
                        if self.is_in_current_week(latest[2], True):        # NEW
                            self.listitems[day].append(listitem)            # NEW
                else:
                    nextdate = listitem.getProperty('NextDate')
                    if len(nextdate) == 11:
                        if self.is_in_current_week(nextdate, True):
                            self.listitems[day].append(listitem)
                        elif len(latest[2]) == 11:                    # NEW
                            if self.is_in_current_week(latest[2], True):        # NEW
                                self.listitems[day].append(listitem)        #

    def is_in_current_week(self, strdate, alt = False):
        if alt:
            showdate = date.fromtimestamp( mktime( time.strptime( strdate, '%b/%d/%Y' ) ) )
        else:
            showdate = date.fromtimestamp( mktime( time.strptime( strdate, '%Y-%m-%d' ) ) )
        weekrange = int( (showdate - self.today).days )
        if weekrange >= -1 and weekrange <= 6:                    # MODIFIED: original: if weekrange >= 0 and...
            return True
        else:
            return False

%AppData%\xbmc\addons\script.tv.show.next.aired\default.py
Code:
def check_today_show(self):
        self.todayshow = 0
        self.todaylist = []
        self.date = date.today()
        self.date2 = (date.today() - timedelta(days=1))                    # NEW (number of days offset)
        self.datestr = str(self.date)
        self.datestr2 = str(self.date2)                                # NEW
        log( self.datestr )
        for show in self.nextlist:
            log( "################" )
            log( "### %s" % show.get("localname") )
            if show.get("RFC3339" , "" )[:10] == self.datestr:
                self.todayshow = self.todayshow + 1
                self.todaylist.append(show.get("localname"))
                log( "TODAY" )
            if show.get("Latest Episode","").split("^") == self.datestr2:            # NEW
                self.todayshow = self.todayshow + 1                        # NEW
                self.todaylist.append(show.get("localname"))                # NEW
                log( "TODAY" )                                        # NEW
            log( "### %s" % show.get("Next Episode", "")  )
            log( "### %s" % show.get("RFC3339", "no rfc") )
            log( str(show.get("RFC3339", "")[:10]) )
        log( "### today show: %s - %s" % ( self.todayshow , str(self.todaylist).strip("[]") ) )

for the skin file you have to check if the date is today, and if so, you have to pull eg "LatestDate" info, instead of "NextDate", if not, you will see the info for next weeks episode:
%AppData%\xbmc\addons\script.tv.show.next.aired\resources\skins\Default\720p\script-NextAired-TVGuide.xml (or the local one in your skin)
Code:
<visible>Control.HasFocus(200) + StringCompare(System.Date(dd-mm-yy),Window(Home).Property(NextAired.1.Date)</visible>



RE: [RELEASE] TV Show Next Aired (Script) Addon - ronie - 2012-10-25

i'm afraid i can't follow your logic.

the script already converts the scraped datetime to your local date&time (see def localize_show_datetime(self, current_show))
and uses the local date & time throughout the rest of the script.

so if a show is listed as 2012-10-24 21:00:00 -0400UTC on tvrage
it will show up in the tv guide as being aired on the 25th at 02:00 (if you're in gmt+1)