Kodi Community Forum
[RELEASE] RecentlyAdded Script (RecentlyAdded.py) Recently Added for Skins / Skinners - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12)
+---- Forum: Skin helper addons (https://forum.kodi.tv/forumdisplay.php?fid=300)
+---- Thread: [RELEASE] RecentlyAdded Script (RecentlyAdded.py) Recently Added for Skins / Skinners (/showthread.php?tid=55907)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14


- mots - 2011-02-13

Really? I only get script failed - recentlyadded.py in both alaska and fusion :O


- ppic - 2011-02-13

mots Wrote:Really? I only get script failed - recentlyadded.py in both alaska and fusion :O

what do you except us to do if you don't provide minimal informations like a debug log?


- buges - 2011-02-20

Has anybody got a working sql query for recently added singles??


- ekim232 - 2011-02-21

I was wondering if it would be possible to add the ability to pull the tv show thumb for latest episodes?


- mfwilli - 2011-02-22

Can anyone confirm this working for the latest AppleTV2 release? I have it enabled in settings in Confluence but it does not appear...


- blacklist - 2011-02-22

mots Wrote:Really? I only get script failed - recentlyadded.py in both alaska and fusion :O

Works just fine here with MySQL.


- ppic - 2011-02-22

it's working on any db you have as it uses http api.


- pecinko - 2011-02-24

Could Addons and Programs be added to script, if there's a way?


- XmemphistoX - 2011-02-28

I just changed my database to mysql and i am also getting the script error in aeon.


- jayhawk785 - 2011-03-10

Here's what I'm getting, I'm not 100% sure what build I'm on--I loaded the xbmc unstable ppa and upgraded to get a fix I needed for DD.

Code:
18:56:12 T:3055757120 M:1809944576   DEBUG: HttpApi Start command: QueryVideoDatabase  paras: [not recorded]
18:56:12 T:2573454192 M:1816801280    INFO: -->Python script returned the following error<--
18:56:12 T:2573454192 M:1816801280   ERROR: Error Type: exceptions.ValueError
18:56:12 T:2573454192 M:1816801280   ERROR: Error Contents: invalid literal for int(): /Volumes/DroboBaggins/TV/Wipeout
/
18:56:12 T:2573454192 M:1816801280   ERROR: Traceback (most recent call last):
                                              File "/home/meh/.xbmc/addons/script.recentlyadded/RecentlyAdded.py", li
ne 350, in ?
                                                Main()
                                              File "/home/meh/.xbmc/addons/script.recentlyadded/RecentlyAdded.py", li
ne 106, in __init__
                                                self._fetch_totals()
                                              File "/home/meh/.xbmc/addons/script.recentlyadded/RecentlyAdded.py", li
ne 153, in _fetch_totals
                                                tvshows_totals[ 1 ] += int( fields[ 24 ] ) # number of episodes
                                            ValueError: invalid literal for int(): /Volumes/DroboBaggins/TV/Wipeout/
18:56:12 T:2573454192 M:1816801280    INFO: -->End of Python script error report<--

DB is MYSQL and it's rebuilt with latin1/collation fixes from the mysql thread. It was getting recently added errors before that as well.

Hope this info helps--let me know if I can provide anything else.


- amet - 2011-03-10

jayhawk785 Wrote:Here's what I'm getting, I'm not 100% sure what build I'm on--I loaded the xbmc unstable ppa and upgraded to get a fix I needed for DD.

Code:
18:56:12 T:3055757120 M:1809944576   DEBUG: HttpApi Start command: QueryVideoDatabase  paras: [not recorded]
18:56:12 T:2573454192 M:1816801280    INFO: -->Python script returned the following error<--
18:56:12 T:2573454192 M:1816801280   ERROR: Error Type: exceptions.ValueError
18:56:12 T:2573454192 M:1816801280   ERROR: Error Contents: invalid literal for int(): /Volumes/DroboBaggins/TV/Wipeout
/
18:56:12 T:2573454192 M:1816801280   ERROR: Traceback (most recent call last):
                                              File "/home/meh/.xbmc/addons/script.recentlyadded/RecentlyAdded.py", li
ne 350, in ?
                                                Main()
                                              File "/home/meh/.xbmc/addons/script.recentlyadded/RecentlyAdded.py", li
ne 106, in __init__
                                                self._fetch_totals()
                                              File "/home/meh/.xbmc/addons/script.recentlyadded/RecentlyAdded.py", li
ne 153, in _fetch_totals
                                                tvshows_totals[ 1 ] += int( fields[ 24 ] ) # number of episodes
                                            ValueError: invalid literal for int(): /Volumes/DroboBaggins/TV/Wipeout/
18:56:12 T:2573454192 M:1816801280    INFO: -->End of Python script error report<--

DB is MYSQL and it's rebuilt with latin1/collation fixes from the mysql thread. It was getting recently added errors before that as well.

Hope this info helps--let me know if I can provide anything else.

if you paste the whole log we can see what build you are on, try this one and let me know


- ppic - 2011-03-10

i've already seen that error, that was an error in db where season / episode don't have number .


- rg192 - 2011-03-10

I'm also having issues with recently added script.

Hope this info below help solve the problem, Thanks for the help

21:14:52 T:151793664 M:137138176 DEBUG: ADDON: cpluff: 'Plug-in script.recentlyadded has been installed.'
21:14:59 T:151793664 M:107327488 DEBUG: ExecuteXBMCAction : Translating XBMC.RunScript(script.recentlyadded,limit=10&totals=True&albums=True&unplayed=True)
21:14:59 T:151793664 M:107327488 DEBUG: ExecuteXBMCAction : To XBMC.RunScript(script.recentlyadded,limit=10&totals=True&albums=True&unplayed=True)
21:15:05 T:190476288 M: 97480704 DEBUG: Process - The source file to load is /Applications/XBMC.frappliance/XBMCData/XBMCHome/addons/script.recentlyadded/RecentlyAdded.py
21:15:05 T:190476288 M: 97480704 DEBUG: Process - Setting the Python path to /Applications/XBMC.frappliance/XBMCData/XBMCHome/addons/script.recentlyadded:/var/mobile/Library/Preferences/XBMC/addons/script.module.simplejson/lib:/var/mobile/Library/Preferences/XBMC/addons/script.module.beautifulsoup/lib:/Applications/XBMC.frappliance/XBMCData/XBMCHome/addons/script.module.pil/lib:/var/mobile/Library/Preferences/XBMC/addons/script.module.mechanize/lib:/Applications/XBMC.frappliance/XBMCData/XBMCHome/addons/script.module.pysqlite/lib:/Applications/XBMC.frappliance/Frameworks/usr:/Applications/XBMC.frappliance/Frameworks/usr/lib/python26.zip:/Applications/XBMC.frappliance/Frameworks/usr/lib/python2.6/:/Applications/XBMC.frappliance/Frameworks/usr/lib/python2.6/plat-darwin:/Applications/XBMC.frappliance/Frameworks/usr/lib/python2.6/plat-mac:/Applications/XBMC.frappliance/Frameworks/usr/lib/python2.6/plat-mac/lib-scriptpackages:/Applications/XBMC.frappliance/Frameworks/usr/lib/python2.6/lib-tk:/Applications/XBMC.frappliance/Frameworks/usr/lib/python2.6/lib-old:/Applications/XBMC.frappliance/Frameworks/usr/lib/python2.6/lib-dynload
21:15:05 T:190476288 M: 97480704 DEBUG: Process - Entering source directory /Applications/XBMC.frappliance/XBMCData/XBMCHome/addons/script.recentlyadded
21:15:20 T:190476288 M: 96972800 ERROR: Traceback (most recent call last):
File "/Applications/XBMC.frappliance/XBMCData/XBMCHome/addons/script.recentlyadded/RecentlyAdded.py", line 286, in <module>
File "/Applications/XBMC.frappliance/XBMCData/XBMCHome/addons/script.recentlyadded/RecentlyAdded.py", line 97, in __init__
File "/Applications/XBMC.frappliance/XBMCData/XBMCHome/addons/script.recentlyadded/RecentlyAdded.py", line 138, in _fetch_totals


- jayhawk785 - 2011-03-10

Hey Guys,

I ended up rolling back to 10.1 - it had the fix i needed with dd5.1

Bit of a pain rolling back 3 machines and then blowing out the db multiple times--but whatever. Unfortunately that was the only snippet of the log I had. I could reproduce it in multiple skins--and I had dropped/readded my db twice. I believe all my episodes had season/number but i could be wrong. I can check wipeout which was last reference in the log if you think there's something to the problem.


- pieh - 2011-03-11

jayhawk785 Wrote:Here's what I'm getting, I'm not 100% sure what build I'm on--I loaded the xbmc unstable ppa and upgraded to get a fix I needed for DD.

Code:
18:56:12 T:3055757120 M:1809944576   DEBUG: HttpApi Start command: QueryVideoDatabase  paras: [not recorded]
18:56:12 T:2573454192 M:1816801280    INFO: -->Python script returned the following error<--
18:56:12 T:2573454192 M:1816801280   ERROR: Error Type: exceptions.ValueError
18:56:12 T:2573454192 M:1816801280   ERROR: Error Contents: invalid literal for int(): /Volumes/DroboBaggins/TV/Wipeout
/
18:56:12 T:2573454192 M:1816801280   ERROR: Traceback (most recent call last):
                                              File "/home/meh/.xbmc/addons/script.recentlyadded/RecentlyAdded.py", li
ne 350, in ?
                                                Main()
                                              File "/home/meh/.xbmc/addons/script.recentlyadded/RecentlyAdded.py", li
ne 106, in __init__
                                                self._fetch_totals()
                                              File "/home/meh/.xbmc/addons/script.recentlyadded/RecentlyAdded.py", li
ne 153, in _fetch_totals
                                                tvshows_totals[ 1 ] += int( fields[ 24 ] ) # number of episodes
                                            ValueError: invalid literal for int(): /Volumes/DroboBaggins/TV/Wipeout/
18:56:12 T:2573454192 M:1816801280    INFO: -->End of Python script error report<--

DB is MYSQL and it's rebuilt with latin1/collation fixes from the mysql thread. It was getting recently added errors before that as well.

Hope this info helps--let me know if I can provide anything else.
i had this problem using Latest git - I did quick fix:
changed
Code:
    tvshows_totals[ 1 ] += int( fields[ 24 ] ) # number of episodes
            tvshows_totals[ 2 ] += int( fields[ 25 ] ) # watched?
            tvshows_totals[ 3 ] += int( fields[ 26 ] ) # number of episodes watched
to
Code:
    tvshows_totals[ 1 ] += int( fields[ 25 ] ) # number of episodes
            tvshows_totals[ 2 ] += int( fields[ 26 ] ) # watched?
            tvshows_totals[ 3 ] += int( fields[ 27 ] ) # number of episodes watched
this is caused by this "SELECT tvshow.*, path.strPath" - I guess it could be changed to provide only values from specified columns instead of entire table - right?

PS. other things doesn't work in latest git too (paths and thumbs for latest movies/episodes f.e.) - some column was added to database ( https://github.com/xbmc/xbmc/commit/606fcbc8eb67faae58ac196532dc47e1bcb44c93#xbmc/video/VideoDatabase.cpp )