• 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 7
Random Movie script for skins
#46
implemented your script in Nox so that both script calls (with/without genre filter) can easily be attached to any main/sub menu item or to any item in Navigation Sidebar. thx
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#47
(2012-06-21, 16:32)1000.sassa Wrote: I have a lot of movies scanned in my library, they are detected and I can play them without any problems, even in the cirrus skin.

But when I press the button "random movie" or "random genre", he just asks me to conclude the watched movies or not, and after pressing yes or no, nothing happens without any error message. No Crash to desktop or anything like this.

Do you still want the log? I can upload it for you!

Thanks again for all the help! Smile
It may not crash - but if it's not playing a film, then I'd expect an error notification to be displayed by XBMC.

So yes, please send me the log - I don't want the whole log! Do a search for "script.randommovie" and see what comes up!

I should really implement some debugging capability into my scripts...

(2012-06-21, 17:18)phil65 Wrote: implemented your script in Nox so that both script calls (with/without genre filter) can easily be attached to any main/sub menu item or to any item in Navigation Sidebar. thx

Excellent, glad you got it working.
BBC Live Football Scores: Football scores notifications service.
script.squeezeinfo: shows what's playing on your Logitech Media Server
Reply
#48
Sure you've downloaded the script for eden? There are 2 Versions of the script, dharma and eden!
Reply
#49
For some reason the script works perfectly fine now. Thanks for all your help, I am glad that I have the chance to enjoy the script now! Smile
Reply
#50
@el_p

Hey handsome Big Grin

Paul has just added this Script to the wonderful Refocus mod he has created Smile

And i remember (at least I think I do) a feature being discussed that included the ability to play 3 random trailers from the users library, then on completion of all 3 (or each) trailer, the user was thrn presented with the choice of which movie to watch.

Have I dreamt of such a feature, or we're your magical hands indeed working on such trickery Smile
Reply
#51
(2012-07-24, 18:35)PatrickBateman Wrote: @el_p

Hey handsome Big Grin

Paul has just added this Script to the wonderful Refocus mod he has created Smile

And i remember (at least I think I do) a feature being discussed that included the ability to play 3 random trailers from the users library, then on completion of all 3 (or each) trailer, the user was thrn presented with the choice of which movie to watch.

Have I dreamt of such a feature, or we're your magical hands indeed working on such trickery Smile

Pat,

it's been a long time!

Your memory serves you well - I have indeed written a version of the script that can play n trailers (that match the user's requirements e.g. unwatched, genre, MPAA rating) and you are then able to select which film you want.

I was also hoping to include some random music options to the script as well - hence the RandomMovie name being slightly inappropriate for the script. Unfortunately free time is somewhat of a luxury at the moment, so it's still just doing movies!

The script is therefore probably still in a "beta" phase, but give it a go if you want. You can download it here.

I think it's currently set up so it will appear in your "Addons" list - rather than being a video addon. Once installed, there are various options you can configure. It's also skinnable, but you probably don't need to worry about that for now.

Let me know what you think.

el_P
BBC Live Football Scores: Football scores notifications service.
script.squeezeinfo: shows what's playing on your Logitech Media Server
Reply
#52
Hey Big Grin

Fantastic! Will do...
I'll test it and report back with my findings Smile

I know what you mean about free time being a luxury, I feel like I never get 5 minutes these days... Kids are getting older and more demanding too lol

It's good to see your still alive and well though, and I'll definetly test this script out and report back with how it goes.

Hope alls well at your end Smile
Pat~
Reply
#53
@el_p

Just installed and tried to run the script on Eden 11 (refocus) and just receive a script error Sad

Does this have any dependencies?
I've recently removed the "randomitems" script by hitcher etc due to it crashing my xbmc currently (I think there's a problem with the .py in the current version.

Does your script depend on that or any other scripts/addons?

Cheers,
Pat~

Edit 1:
Ignore me I'm being a knob Smile
I didn't configure it to run without prompts...

Now I've defined it's parameters it works...

After the 3rd trailer plays though I still get an ugly error stating "can not find next item in playlist"
Edit 2: ignore me again, the error above happened ONLY when I skipped the final trailer manually... My bad Smile

Other than that, once the parameters are set (script does not work for me out of the box or when set to prompt) its working Smile

Fantastic!
I'm actually laughing (positivly) as I use right now, as its such a genius little script, so incredibly useful and a must for every room in the house.

Quick question:
I'm going to configure the kids one to play ONLY for movies up to mpaa rated 12... Currently its set to filter, but still prmpts me for a value...

Instead of the prompt can you also add an additional parameter into the config screen, so that we set this to "yes" a new dialog box appears with a slidefriar manually restricting the trailer results.

This way we can set this all in the config screen and walk away leaving the box in kiosk mode etc so the kids can't tinker lol Smile

I love it Big Grin

Genius!
Reply
#54
(2012-07-25, 11:23)PatrickBateman Wrote: After the 3rd trailer plays though I still get an ugly error stating "can not find next item in playlist"
Edit 2: ignore me again, the error above happened ONLY when I skipped the final trailer manually... My bad Smile
Yeah, not sure how to stop that happening... I can ask some python gurus in the forums.

(2012-07-25, 11:23)PatrickBateman Wrote: Other than that, once the parameters are set (script does not work for me out of the box or when set to prompt) its working Smile

Fantastic!
I'm actually laughing (positivly) as I use right now, as its such a genius little script, so incredibly useful and a must for every room in the house.
Great, nothing beats a happy customer!

(2012-07-25, 11:23)PatrickBateman Wrote: Quick question:
I'm going to configure the kids one to play ONLY for movies up to mpaa rated 12... Currently its set to filter, but still prmpts me for a value...

Instead of the prompt can you also add an additional parameter into the config screen, so that we set this to "yes" a new dialog box appears with a slidefriar manually restricting the trailer results.

This way we can set this all in the config screen and walk away leaving the box in kiosk mode etc so the kids can't tinker lol Smile
Hmm, that shouldn't be happening with the ratings - i'll check. Probably some dubious logic going on.

What on earth is a "slidefriar"?Tongue

Seriously though, this was exactly what I wanted to do too, but I'm not quite sure how to do it. Problem is different ratings systems in different countries. I'm sure there's a way to do it, but will need to think (and see my earlier comment about free time... Wink)
BBC Live Football Scores: Football scores notifications service.
script.squeezeinfo: shows what's playing on your Logitech Media Server
Reply
#55
Dam iPad auto correct Big Grin
How did it get that from slider?

Yea it works fantastic, I can't believe how useful and functional this is! It's genius!

If the rating cpuld be locked in from the config screen the it's a winner as it can literally be set per room/audience.

It's an awesome script, apart from those bugs mentioned I literally can't fault it, it's genius! I'll be using it a lot even just to watch a list of random trailers from my library Big Grin

Awesome work,
Yea free time is a luxury these days, so no worries about that, I'll keep postIng any bugs I find and a least we have record of then in for future bug squashing days Smile

Big Grin

Reply
#56
Hay!

I get this Error message on Eden with this script:
PHP Code:
ERRORTraceback (most recent call last):
  
File "X:\XBMC\portable_data\addons\script.randommovie\default.py"line 144in <module>
    
randomMovie getRandomMovie(unwatchedFalse"")
  
File "X:\XBMC\portable_data\addons\script.randommovie\default.py"line 58in getRandomMovie
    
return play_path
UnboundLocalError
local variable 'play_path' referenced before assignment 

I don't know if it's my weird portable configuration, but in your sql query, it returns and XML formatted like that:
PHP Code:
<field>Blablabla</field>
<
field>Blablabla</field>
<
field>Blablabla</field>
... 

But you code assumes that it is formatted like that:
PHP Code:
<record>
    <
field>Blablabla</field>
    <
field>Blablabla</field>
    <
field>Blablabla</field>
    ...
</
record

So it crashes. I fixed it quickly (and will post it on github as well), but if it is indeed a problem not only with me, you might want to fix it yourself so it's cleaner than my version.

Forked fixed version:
https://github.com/NaturalBornCamper/xbmc-random-movies
Reply
#57
Which branch of the script are you using?

The Eden version shouldn't be looking at the SQL and instead gets the info it needs via JSON.

Try the "PreEden" version in the first post.
BBC Live Football Scores: Football scores notifications service.
script.squeezeinfo: shows what's playing on your Logitech Media Server
Reply
#58
waouuuuuu the surprise me script is exactly what i wanted to code.


I would love to help built this script better and make it extremly good . I have lots of idea, that i planned for a long time. I would greatly appreciate keeping this script improved and hlep.
Reply
#59
If you want to help (and I'd be delighted if you did), feel free to fork the script on github, make any changes you want and then (assuming I'm happy Wink) I'll merge them into my code.
BBC Live Football Scores: Football scores notifications service.
script.squeezeinfo: shows what's playing on your Logitech Media Server
Reply
#60
i made some corrections already.

No more unicode error no more character suppression :

Working with eden and frodo

And added the ability to filter on long films lenght (this parameter is configurable)
Reply
  • 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 7

Logout Mark Read Team Forum Stats Members Help
Random Movie script for skins0