Kodi Community Forum
Recently added by airdate for Tv Shows (FIX) - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Skins Support (https://forum.kodi.tv/forumdisplay.php?fid=67)
+---- Forum: Aeon Nox: Silvo (https://forum.kodi.tv/forumdisplay.php?fid=142)
+---- Thread: Recently added by airdate for Tv Shows (FIX) (/showthread.php?tid=174013)

Pages: 1 2


Recently added by airdate for Tv Shows (FIX) - cruzannavy - 2013-09-21

This is what worked for me, might not work for you the way you want it.
I wanted my recently added (lateset episodes) widget on the home screen to be truly sort by airdate and not by added date. I read many posts and decided to try for myself. This is what i did to have my widget sort by airdate.

Modify this addon service.skin.widgets ( under %appdata etc...)
modify the file default.py in service.skin.widgets these lines below are 318 -321 for me while using notepad++

Code:
if request == 'RecentEpisode' and self.RECENTITEMS_UNPLAYED:
                json_query = xbmc.executeJSONRPC('%s "sort": {"order": "descending", "method": "dateadded"}, "filter": {"field": "playcount", "operator": "lessthan", "value": "1"}}}' %json_string)
            elif request == 'RecentEpisode':
                json_query = xbmc.executeJSONRPC('%s "sort": {"order": "descending", "method": "dateadded"}}}' %json_string)


modify the "dateadded" to "year" in line 319 and 321 (319 is if you hide watched, and 321 is if you do not hide watched)

Code:
if request == 'RecentEpisode' and self.RECENTITEMS_UNPLAYED:
                json_query = xbmc.executeJSONRPC('%s "sort": {"order": "descending", "method": "year"}, "filter": {"field": "playcount", "operator": "lessthan", "value": "1"}}}' %json_string)
            elif request == 'RecentEpisode':
                json_query = xbmc.executeJSONRPC('%s "sort": {"order": "descending", "method": "year"}}}' %json_string)

Then restart xbmc. and give it a minute and it should now show the latest aired tv show in the widget not the latest added..
Hopes this helps someone ! please let me know if it did Smile


RE: Recently added by airdate for Tv Shows (FIX) - Wulfsige - 2013-09-22

Thanks, great tip Smile


RE: Recently added by airdate for Tv Shows (FIX) - HenryFord - 2013-09-22

Nice one, thanks!

Edit:
Took your idea and added a new setting to the addon so people are able to choose between the methods.
I also posted a pull request on github - maybe it gets accepted into mainline:
https://github.com/XBMC-Addons/service.skin.widgets/pull/16

For the changes I made:
https://github.com/henryford/service.skin.widgets/commit/da3b82c6ffcc1690fb5c7b4859879f120fe7c428


RE: Recently added by airdate for Tv Shows (FIX) - cruzannavy - 2013-09-24

@HenryFord ! Nice Thanks! ive seen many people want this option and i first tried airdate then after a lil research i realized that option wasnt available through a json request afaik so i saw year was a logically if its ascending descending it should produce the same outcome and luckily it did! I just dont know how to reach all those threads that people were asking for this , since i dont want to spam all threads! so hopefully its accepted!

Pulled you changes thanks!


RE: Recently added by airdate for Tv Shows (FIX) - Milhouse - 2013-09-24

"firstaired" would be more appropriate than "year".


RE: Recently added by airdate for Tv Shows (FIX) - cruzannavy - 2013-09-24

but that doesnt work in the script Wink tried first aired, airdate, lastplayed etc... only one that works for last aired is year in this script..


RE: Recently added by airdate for Tv Shows (FIX) - Milhouse - 2013-09-24

(2013-09-24, 01:09)cruzannavy Wrote: but that doesnt work in the script Wink tried first aired, airdate, lastplayed etc... only one that works for last aired is year in this script..

Yes, you're right - firstaired is not a valid sort field, although it is a valid episode detail field. Bah.


RE: Recently added by airdate for Tv Shows (FIX) - cruzannavy - 2013-09-24

Yep i tried first airdate and firstaired , initially since ... that would make sense


RE: Recently added by airdate for Tv Shows (FIX) - sunkin - 2013-10-30

After reading this thread I've been on a mission. I want to sort by air date BUT include only the first unwatched episode.

For example...I have been watching Simpsons every week but I am waiting for the season to be done to watch Walking Dead.So on monday i wont see the latest episode of walking dead on the list only simpsons.

So if anyone figured this out let me know. So far i figured i probably need to input a 3rd sorting level but haven't figured out how to do this yet.


RE: Recently added by airdate for Tv Shows (FIX) - cruzannavy - 2013-10-31

not the way you want, but you could technically mark them as watched and they wont show up.

but i believe..
even with a 3 sort by ( showtitle, or tvshowid), you would need atleast 8 original tv shows airing at the same time consistently, since if it were less, then, the second episode of the first title would show up. but i dont think it would work.


RE: Recently added by airdate for Tv Shows (FIX) - sunkin - 2013-11-01

(2013-10-31, 02:31)cruzannavy Wrote: not the way you want, but you could technically mark them as watched and they wont show up.

but i believe..
even with a 3 sort by ( showtitle, or tvshowid), you would need atleast 8 original tv shows airing at the same time consistently, since if it were less, then, the second episode of the first title would show up. but i dont think it would work.

You underestimate my wife' pvr'ng lol

So you are saying the sort goes by show not episode? Also is it possible to exclude all of the episode that are not the first unwatched and sort solely on the first unwatched episodes?


RE: Recently added by airdate for Tv Shows (FIX) - HenryFord - 2013-11-05

You could, technically retreive all the episodes in the order they aired and which are unwatched. Then store the information about the Show-Name in an array. In that case you could build an "if"-routine which would exclude every item retreived when the show-name is corresponding to any item in the array...

This however would require you to employ a little bit of programing-skills Wink


RE: Recently added by airdate for Tv Shows (FIX) - sunkin - 2013-11-06

(2013-11-05, 16:09)HenryFord Wrote: You could, technically retreive all the episodes in the order they aired and which are unwatched. Then store the information about the Show-Name in an array. In that case you could build an "if"-routine which would exclude every item retreived when the show-name is corresponding to any item in the array...

This however would require you to employ a little bit of programing-skills Wink

all i know is vba...but now that i know its possiible I guess i need to start learning python syntax lol


RE: Recently added by airdate for Tv Shows (FIX) - EtgarDizz - 2014-01-25

(2013-09-22, 18:57)HenryFord Wrote: I also posted a pull request on github - maybe it gets accepted into mainline:
https://github.com/XBMC-Addons/service.skin.widgets/pull/16

Great mod, HenryFord!
It's exactly what I wanted (and apparently a lot of others). I don't understand why this pull request wasn't accepted... it's very useful IMO.

Maybe cos it's a sub-option of "Recently added" and not it's own section?
Maybe if this was a whole new "Recently aired" widget option, it would have been added to main... too bad.

I'm using it in my XBMC and it works perfectly.


RE: Recently added by airdate for Tv Shows (FIX) - GrantXP - 2014-01-31

I was wondering if it is possible to amend this further. I changed it to 'year' which worked great. However, whenever I watch something it removes it from the menu. As a few people in my house use the XBMC I was wondering if the code can be modified further 'not' to remove Watched!