2012-06-17, 20:56
Hey all,
I'm new to python and i'm trying to write my first xbmc addon.
I've got most of the addon working, but there is one bit I'm stuck with;
I'd like to get a directory (from an NFS share) and list the largest 3 files in that directory - I can list the directory fine in XBMC, but I'm struggling to work out how to 'filter' out the stuff I don't want.
I found some sample python which gets the largest file in a directory but it's working at an OS level, so it knows nothing about the NFS:// path I give it (which XBMC seems to handle just fine, thanks to Memphiz!)
Could anyone with some python experience point me in the right direction?
Thanks
I'm new to python and i'm trying to write my first xbmc addon.
I've got most of the addon working, but there is one bit I'm stuck with;
I'd like to get a directory (from an NFS share) and list the largest 3 files in that directory - I can list the directory fine in XBMC, but I'm struggling to work out how to 'filter' out the stuff I don't want.
I found some sample python which gets the largest file in a directory but it's working at an OS level, so it knows nothing about the NFS:// path I give it (which XBMC seems to handle just fine, thanks to Memphiz!)
Could anyone with some python experience point me in the right direction?
Thanks