2013-12-18, 01:50
Thanks for a great plugin! I just changed my old ATV for a Raspeberry Pi with raspbmc, and your plugin makes it useful also for using my picture colection as screensaver. A tip/suggestion to add:
I wanted to use your plugin together with ruuk's screensaver plugin to display random pictures from my collection. I have right now a bit more than 20000 pictures, adding this in default.py, method 'show_pics(self)' works:
This is obviously too hardcoded, but could be possible to make nice(?) I found the trick WHERE RANDOM() %% k somewhere on the web, works great for largeish tables. k should ideally be set by k = COUNT(*) / limit
Maybe something to add, also as option in main menu ("View x random pictures")?
I wanted to use your plugin together with ruuk's screensaver plugin to display random pictures from my collection. I have right now a bit more than 20000 pictures, adding this in default.py, method 'show_pics(self)' works:
Code:
elif self.args.method == "Random":
picfanart = join(PIC_PATH,"fanart-date.png") #Just to have something, not needed?
filelist = [row for row in MPDB.cur.request( """SELECT strPath,strFilename FROM Files WHERE RANDOM() %% 100 == 0 ORDER BY RANDOM() LIMIT 250 OFFSET %s"""%(offset) )]
This is obviously too hardcoded, but could be possible to make nice(?) I found the trick WHERE RANDOM() %% k somewhere on the web, works great for largeish tables. k should ideally be set by k = COUNT(*) / limit
Maybe something to add, also as option in main menu ("View x random pictures")?