A new MUBI plugin for XBMC/Kodi

Posted: July 11th, 2014 | Author: | Filed under: General, Uncategorized, XBMC | 61 Comments »

Download Mubi (2015) plugin 0.8.zip [updated : 21/3/2015] [** Updated: March 2015 **]

[The source is also now on GitHub]

I really like MUBI a moving 30 day window of hand curated films for the price of a coffee, or as they like to describe themselves ‘an online cinema’.

But despite being a member for some time now and reguarly checking the iPad app for new films. I found myself rarely streaming the films direct from MUBI’s site, as my main film watching platform is a dedicated HTPC running Kodi.

Someone had previously written a very nice and feature rich MUBI plugin for XBMC. However it was now i) broken and no longer being maintained and ii) was built against an older version of the site, prior to the introduction of a 30 day selection window and the phasing out of the old pay-per-film model, so much of it’s funtionality was no longer relevant and/or broken.

But that gave me the incentive to look at using a mix of Beautiful Soup (to handle the scraping, MUBI doesn’t have a public API I assume due to rights issues) and XBMCSwift2 (to make the addon code slightly cleaner and easier to test from the command line).

Anyway, after a couple of false starts, a bit of request/response interrogation using Charles and some trial and error, I managed to get everything working. Although this is my first XBMC plugin, first time using BeautifulSoup or XMBCSwift2 and the second thing I have written in Python of any consequence, so it’s undoubtable a little rough round the edges.

I haven’t pushed this out as an official XBMC plugin, nor do I have any plans to. But if anyone wants to download my code/plugin then feel free to do so. Just don’t ask me (or MUBI) for any support on it, although feel free to add feedback or let me know if it’s broken for you (just don’t expect an immediate fix!). It’s highly likely to break again next time MUBI change their site and I certianly don’t want to get into a cat/mouse situation trying to keep it up to date, especially if they are unhappy with the idea of a 3rd party XBMC plugin accessing their service.

Download Mubi (2014) plugin 0.5.zip [updated : 28/11/2014]

Download from GitHub

You will need a MUBI account to use the plugin, you can sign up for a 30 day trial here.

MUBI XBMC plugin

Thanks to jbaiter for his original plugin which gave me a starting off point for this version. There’s also a couple of lines/patterns that I took verbatim from his original plugin due to their elegance/simplicity.


61 Comments on “A new MUBI plugin for XBMC/Kodi”

  1. 1 martin fennell said at 5:39 pm on July 16th, 2014:

    Hi. thank you for this. I tried it on battle for heaven (worked) Then on the film, I had been watching Dry Summer (didn’t work) Then time regained (worked)

  2. 2 Jamie Unwin said at 9:47 am on July 19th, 2014:

    Glad you found it useful. I noticed a similar problem myself, think it might have been my over aggressive caching, have upload a new version (0.2) which should hopefully fix this issue.

    I’m also working on a new version that uses a different approach to retrieve the film data which hopefully will allow me to pull in all the meta-data (length/director/cast/synopsis etc.) as well. Planning to have it finished in the next week or so.

  3. 3 TMDaines said at 6:48 pm on August 4th, 2014:

    Hi,

    Thanks for the great work on the plugin. I’ve been desperate for a mubi one, since I started using XBMC a few months ago.

    I just tried to install it and I get a script error, even after setting my username and password. Is this still working for everyone else?

    Thanks

  4. 4 Jamie Unwin said at 11:46 am on August 5th, 2014:

    I’ve just fixed it (v0.3 above) – looks like MUBI changed the format of their HTML.

    (I also noticed an issue whereby if it takes too long to load the video then the onetime url to the stream itself times out and the video will fail to load. I’m not re-retriving a url if this happens, so the plug will just fail with a ‘cannot load stream message’).

    Hoping to push out a new version that does away with the screen scraping, so hopefully will avoid these issues, plus it should include more details (synopsis/length/cast/director) on the film. Check back next week to see if I’ve managed to get it finished.

  5. 5 Thomas Daines said at 6:12 pm on August 6th, 2014:

    Thanks for the quick fix, but the link to v0.3 seems to still be for v0.2.

  6. 6 Jamie Unwin said at 7:09 pm on August 6th, 2014:

    Ah…you should be able to download v0.3 now.

  7. 7 Thomas Daines said at 6:33 pm on August 7th, 2014:

    I’m sorry to report but I still appear to be getting script errors, even after switching to v0.3.

  8. 8 Jamie Unwin said at 4:50 pm on August 12th, 2014:

    Do you get a list of films, or does the error happen when you try to play back a particular film?

    Double check your username/password is set correctly in the settings as that can cause a script error.

  9. 9 Thomas Daines said at 6:21 am on August 13th, 2014:

    Hi,

    I get the script error when I attempt to start the addon. Is this symptomatic of script error for incorrect username/password?

    In the next update, is it worth having a a proper error message notifying a user when their username/password is incorrect?

  10. 10 Jamie Unwin said at 10:25 am on August 13th, 2014:

    Yes (a script error is symptomatic of an incorrect username/password) and Yes, a nicer error message would obviously be preferable, I’ll look at adding one, but it’s tricky to check if the error is due to an incorrect username/password or something else with the login process (remember none of this is using nice API’s with clear status/response codes from MUBI).

  11. 11 Thomas Daines said at 6:33 am on August 18th, 2014:

    For what it’s worth, I’m still getting script errors despite double-checking my username and password. I attempt to start the add-on but I just get a script error. Is there anyway I could assist in solving the problem? Can I generate a log or anything?

  12. 12 Jamie Unwin said at 6:41 am on August 18th, 2014:

    How annoying, I just checked and it’s working for me, but sure happy to help, a couple of things:

    – Are you using Gotham? (this is the only version I have tested it on)
    – Do you know how to clear out you old plugins? Try deleting the plugin.video.mubi folder in in /XBMC/addons and plugin.video.mubi.0.3.zip/XBMC/addons/packages (also delete the XBMC swift and swift2 plugins/packages, they’ll be reinstalled next time). I previously hit an issue with an old version not being updated properly myself, causing all kinds of confusion. Reboot and reinstall (and check the installed plugin is actually v0.3).
    – Can I check you get the error when you start the plugin or is it when you actually start play a stream? and that you are getting past the initial addon install stage?

    Post a link to the relevant bit of your logs (on pastebin or something) [ http://wiki.xbmc.org/?title=Log_file or just tail the xbmc.log when you start the plugin ] and I’ll take a look. I don’t need the whole file, just the bit where the plugin is running / failing.

    Jamie

  13. 13 Thomas Daines said at 6:36 pm on August 27th, 2014:

    I tried to delete the addon folders and reinstall but no luck.

    The problem happens when I attempt to start the addon.

    Here is my log:

    http://xbmclogs.com/show.php?id=278110

  14. 14 Thomas Daines said at 6:46 pm on August 27th, 2014:

    After reading my log myself, I just reinstalled the swift2 script and it now appears to work. Strange that this seems ti have been the trouble all along. Isn’t this part of vanilla XBMC?

  15. 15 Jamie Unwin said at 4:31 am on August 28th, 2014:

    I was just going to suggest reinstalling xbmcswift2. It’s not part of the vanilla XBMC install, but it is an official addon, so XBMC should have installed it automatically when it saw that my addon required it.

    My guess is it got “half-installed” at some stage, so XBMC thought it had a copy installed, but in reality the addon was missing.

    Glad, you got it working!

    ps. I just updated to 0.4 to fix another issue, not sure which version you installed.

  16. 16 Even said at 12:07 pm on August 31st, 2014:

    Wonderful addon! Thanks so much for making it.

    I have a question, though. Do you know whether or not it’s possible to use the 720p streams where they’re available? It seems the addon defaults to SD even in the (admittedly few) cases where HD is available on mubi.com. (For some reason they all default to SD on the Android app, though. I don’t know if that’s relevant.)

    Right now I have Miss Bala and Buenas noches, España available in 720p on mubi.com. There might be more, I haven’t checked them all.

  17. 17 Jamie Unwin said at 1:11 pm on September 23rd, 2014:

    I’ll take a look into this, to be honest I thought XBMC was choosing the HD stream if available (and your bandwidth supported it). But you may well be correct and at the moment it’s just playing the first stream it sees, which tends to be the SD one.

  18. 18 Lorenzo said at 4:09 pm on September 5th, 2014:

    Hi,
    unfortunately the link to 0.4 version seems to be broken.
    I’m trying version 0.3 but I’m currently unable to list any content.
    I will read the whole post and I hope I will find some good suggestion.
    I’m using Openelec (Ghotam) on a Raspberry PI

  19. 19 Jamie Unwin said at 1:07 pm on September 23rd, 2014:

    The link should be working again now

  20. 20 David said at 7:01 am on September 7th, 2014:

    Hi Jamie,

    Thanks for making this nice plugin. I had it working one time but now I want to update to 0.4 and the Dropbox link isn’t working:

    https://www.dropbox.com/s/j5lpw2i19qlz17g/plugin.video.mubi.0.4.zip

    Did it change?

  21. 21 Jamie Unwin said at 1:07 pm on September 23rd, 2014:

    The link should be working again now

  22. 22 mkkyah said at 12:16 pm on September 18th, 2014:

    Great project, but is it still alive? Download link of v 0.4 seems dead.

  23. 23 Jamie Unwin said at 1:07 pm on September 23rd, 2014:

    The link should be working again now

  24. 24 Seb said at 1:35 am on September 22nd, 2014:

    Hi,

    I would like to try your plugin but the Dropbox link is broken.
    It would nice if someone could reup.

    Thanks!

  25. 25 Jamie Unwin said at 1:01 pm on September 23rd, 2014:

    The link should be working again now!

    btw. I just checked and the plugin is working, but noticed a script error last night, this might be due to MUBI A/B testing a new design or something similar. If you do experience problems, might worth having a few attempts and try some different films before reporting an error. I am hoping to do a complete re-write soon but just got back from the Toronto film festival [where I spent to much time watching films!] and now have a pile of work to catch up on.

  26. 26 Jamie Unwin said at 1:07 pm on September 23rd, 2014:

    The link should be working again now

  27. 27 Thomas Daines said at 4:37 am on September 25th, 2014:

    There now appears to be new streaming quality options on the website. In addition to 480p, there is 480 Plus for example. I presume these just use a higher bitrate. It would be good if we could manually select the stream.

  28. 28 mkkyah said at 7:22 am on September 26th, 2014:

    Thanks for the new link, it’s working very well with my system.

  29. 29 honey said at 1:33 pm on October 2nd, 2014:

    Oh I’m sorry it was just very slow! I promise I tried 4 or 5 times with reinstalls before I posted here 🙂 All working, and thank you this is great!

  30. 30 mkkyah said at 1:30 pm on October 8th, 2014:

    Is there a chance that we get a version with HD stream option and movie info?
    I could’t find anything else to ask, thanks again.

  31. 31 mkkyah said at 4:11 am on October 9th, 2014:

    There is a strange problem: All movies on the list play well, but only one plays a few minutes stops and goes to mubi list again. I have checked same movie on PC browser, it’s playing. I think streams are different for every region, but the movie which has problems at my region now is “Coffee and Cigarettes”.

  32. 32 mkkyah said at 4:23 pm on October 13th, 2014:

    Hi Jamie,
    Did you see this attempt from Mubi to reach addon developers about API?

    https://github.com/jbaiter/plugin.video.mubi/issues/7

  33. 33 Fabian said at 12:13 pm on October 15th, 2014:

    Thank you for your work.

    Do you think it is possible to run the plugin on XMBC running on a Raspberry Pi or a Fire TV?

  34. 34 Fabian said at 6:11 am on October 17th, 2014:

    Hi Jamie,

    i managed now to get verison 0.4 running on XMBC on a fire tv. What i cannot figure out, is how to choose between the different language options of the same movie. Is that possible?

  35. 35 mkkyah said at 9:36 am on November 13th, 2014:

    I get only script errors when I’m trying to launch the plugin. It happened before for short periods, but this time it seems serious.

  36. 36 fipm said at 4:11 pm on November 27th, 2014:

    Same here. Only script errors since a few days.

  37. 37 Jamie Unwin said at 10:39 am on November 28th, 2014:

    Plugin should be working again.

    Jamie

  38. 38 mkkyah said at 7:45 am on November 30th, 2014:

    Still same script errors for me.

  39. 39 fipm said at 10:10 pm on December 7th, 2014:

    version 0.5 works fine here. Thank you!
    Is there any chance that the script in the future will scrape some more info about the movies from the website?

  40. 40 mkkyah said at 5:19 am on December 22nd, 2014:

    Plugin started to work suddenly, without doing any changes. Must be regional differences on MUBI side.

  41. 41 Cytogo said at 8:27 am on January 7th, 2015:

    Thanks a lot Jamie! Nice plugin. Found it by accident 😉
    But now I’m running it on a Raspberry pi and it works fine.

    Some ideas for the next version:
    – In my country there are different languages for some movies available. It would be nice to select them manually.
    – Your plugin buffers only around 11MB. Does it depends on Mubi? Because normally streams are buffered with around 21MB (depending on your settings).
    – And it would be nice to choose the movie quality (480p, 480p plus, 720p). Maybe plugin-wide with an option in the plugin settings: ‘choose highest’, ‘480p’, … or manually before the movie is played.

    Wish you a nice 2015.

  42. 42 John Cooper said at 3:49 pm on January 13th, 2015:

    Hi Jamie,

    Thanks for the great plugin works a treat!

  43. 43 Matt Baker said at 6:55 pm on January 25th, 2015:

    Hi Jamie,

    It’s working now. The problem seems to have been caused by me having a complex password including symbols. Changing the password to only have alphanumerics, all is fine.

    Note, the problem was on the Raspberry Pi. Using Kodi on Windows the complex password worked fine.

    Hope that might help someone else.

    Matt

  44. 44 Graham Purnell said at 5:39 pm on January 28th, 2015:

    I tried to install this on XBMC on the Apple TV 2. The zip wouldn’t install and an error message about unmet dependencies flashed up.

    I installed it on Windows and it worked fine. Then I had a brain wave (most unlike me) and decided to copy the plugin folder from Windows to the ATV2 using WinSCP. After restarting XBMC on the ATV2, Mubi showed up on my addons list and it worked a treat after entering my u/name and p/word.

    The only drawback is that fast forward and rewind crashes the stream because there’s not enough data in the buffer; great if you just want to watch from start to finish. Pausing works fine.

  45. 45 Even said at 12:41 pm on February 2nd, 2015:

    > I’ll take a look into this, to be honest I thought XBMC was choosing the HD stream if available (and your bandwidth supported it). But you may well be correct and at the moment it’s just playing the first stream it sees, which tends to be the SD one.

    Thank you for your response. I’ve experimented some more, and every time it comes up with an SD result when HD is available. It seems to be consistent with the default stream on Mubi.com – which is almost always 480p regardless of whether or not there is a 720p stream (or 360p) available. So it doesn’t pick the HD one, but then again neither does the web player on Mubi.com. (I don’t know if this last bit is relevant or not.)

  46. 46 slowstream said at 12:14 am on February 6th, 2015:

    Just find and tried this plugin and want say a big thanks for it. The android apk is awful if you use it on your android stb and technical support is even worst. Just for the better if you can fix the hd thing.… Don’t forget to catch Scarlet Street while it last 😉 Thanks again!!!!!

  47. 47 Jamie Unwin said at 2:21 pm on March 20th, 2015:

    Thanks for the thanks..

    Still need to work on getting the HD stuff working, I think I know what I need to do. But deciding whether the development time would be better spent overhauling the plugin to use more an a API approach (so we could get full synopsis and meta-data like director, year etc.), which would also allow for HD streams.

    ps. I missed Scarlet Street on MUBI, but I’ve seen it before, ’tis a great film !!

  48. 48 eg said at 11:24 pm on March 13th, 2015:

    Hi,

    Could not get the plugin to work on friday. Will check again during the next days see if it is temporary. Thx

  49. 49 Jamie Unwin said at 2:18 pm on March 20th, 2015:

    Should be fixed now..

  50. 50 eg said at 10:56 pm on March 16th, 2015:

    Hi Jamie, as of monday your add-on is still generating the error script.

  51. 51 Jamie Unwin said at 2:17 pm on March 20th, 2015:

    Just noticed myself, should be fixed now..

  52. 52 Frog said at 4:31 pm on March 17th, 2015:

    Love your plugin, I am so annoyed that it stopped working last week on MUBI UK. Any idea why?

    I am thinking of suggesting to MUBI that they support the XBMC/Kodi platform offcially. Would you be happy about them using the code of your plugin?

  53. 53 Jamie Unwin said at 2:17 pm on March 20th, 2015:

    Working again, but feel free to nag MUBI about an official version.

    I’d be happy to talk to them about officially developing/supporting a plugin with better features (ideally based on an proper API), if there was interest from them.

  54. 54 Bob said at 6:14 pm on March 17th, 2015:

    Hello!
    Thanks a lot for this addon, the main reason I keep a Mubi account!
    Unfortunately it suddenly stopped working (since a couple of days ago)… I’d like to know if you are aware of any change on Mubi part and if we can hope for an update?
    Thank you!
    Bob

  55. 55 Jamie Unwin said at 2:15 pm on March 20th, 2015:

    Sorry, only just realised it was broken (due to a small change at MUBI’s end)

    Should be fixed now (see link above)

  56. 56 eg said at 11:13 pm on March 20th, 2015:

    Thanks for the update Jamie. No more error script but stream can’t still be played 🙁

  57. 57 Jamie Unwin said at 1:52 pm on March 21st, 2015:

    Try v0.8 (I just made a small update that I think fixes the stream issue)

  58. 58 Frog said at 6:04 pm on March 21st, 2015:

    v0.8 works for me! Thanks! No more terrible bilinear scaling and broken for remote UI as in the Android app.

    I am having a chat with the MUBI people but it seems that they are mosly interested in making the Android app better and not taking my hints about Kodi support…

  59. 59 Uwe said at 1:14 pm on May 7th, 2015:

    version 0.8 worked fine for me on raspberry (Openelec), but since a few days there is a scripting fault. Am I the only one to experience this?

  60. 60 Uwe said at 3:26 pm on December 5th, 2015:

    Hi Jamie, version 0.8 worked fine after I’d bought the keys for the license from Raspberry. So there was really no flaw with your addon.
    But now, since a few days, Mubi seems to have altered something with their scripting. No chance for loggin anymore.
    If I only had more knowledge in programming, I would have looked into it.
    Would you be so kind as to check if you could do anything about it?
    Would be appreciated greatly!!

  61. 61 Martin said at 4:56 pm on October 17th, 2016:

    Hi, I made a try at fixing your plugin but the secret url is now a attribute so I think the current Requests.get solution might not work anymore. I’m not into web coding or streaming so I have totally hit a wall here. If you would have a look at it someday it would be truly appreciated ;D

    cheers mate!
    /martin


Leave a Reply