Recently added by airdate for Tv Shows (FIX)
#1
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
Reply
#2
Thanks, great tip Smile
Reply
#3
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.s...ts/pull/16

For the changes I made:
https://github.com/henryford/service.ski...120fe7c428
Need help? Check out my XBMC Frodo Guide. It contains full featured guides to Sickbeard and CouchPotato as well.

Image
Reply
#4
@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!
Reply
#5
"firstaired" would be more appropriate than "year".
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#6
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..
Reply
#7
(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.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#8
Yep i tried first airdate and firstaired , initially since ... that would make sense
Reply
#9
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.
Reply
#10
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.
Reply
#11
(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?
Reply
#12
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
Need help? Check out my XBMC Frodo Guide. It contains full featured guides to Sickbeard and CouchPotato as well.

Image
Reply
#13
(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
Reply
#14
(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.s...ts/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.
Reply
#15
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!
Reply

Logout Mark Read Team Forum Stats Members Help
Recently added by airdate for Tv Shows (FIX)1