• 1(current)
  • 2
  • 3
  • 4
  • 5
  • 7
Release DMAX Italia video addon
#1
Hi all,
I have just finished a video addon that scrapes for videos and episodes from http://www.dmax.it
It is my first addon, but I would like to continue in improving and refining my skills. So please: be cruel, guys.

Here is the link of the repository:

DMAX Italia repository on github
DMAX Italia on the official XBMC repository
DMAX Italia Wiki page (please contribute)

and here you can download the zip file if any method above goes wrong:

DMAX Italia 1.0.8

NOTE: The first loading will be slow due to the shows thumbnails scraping. You can choose to disable it from the addon settings. After that, the addon should run fast. The thumbnails scraping is scheduled to run every week. Based on my test systems (Core 2 Duo P7350 and Atom N330), it takes about 20 seconds on the first and about 50 seconds on the second system (also depending on your connection speed: mine is 20 Mbit/s. If you have over 10 Mbit/s, you should not notice any delay related to your connection speed).

DEPENDENCIES

BeautifulSoup 3 - http://www.crummy.com/software/Beautiful...2.1.tar.gz
Common plugin cache - http://wiki.xbmc.org/index.php?title=Add...ugin_cache
PyAMF - http://www.pyamf.org/community/download.html

CHANGELOG

1.0.8 (2014-06-28)
Added cache duration setting for thumbnails
Added autostart time setting for video (suitable for mobile/low bandwidth connections)

1.0.7 (2014-06-19)
Added settings suitable for low-end devices

1.0.6 (2014-06-03)
Added autoplay function
Minor fixes

1.0.5 (2014-05-28)
Using only BeautifulSoup, getting rid of regexp
Using common plugin cache to cache thumbnail url (much better times from the second access)
Placed xbmcplugin.addSortMethod of the for loop
Sort episodes by dates, starting from the most recent

The entire paternity of this update is from nightflyer.
Thanks again!

1.0.4 (2014-05-27)
Added Shows thumbnails

1.0.3 (2014-05-26)
Fix a duration issue in video information field
Shows and videos/episodes now is being sorted by alphabetical order
Removed a double loadPage() call

Thanks to nightflyer for this update

1.0.2 (2014-05-26)
Added "Featured Show" thumbnail
Added some stream info (title, plot, duration)

1.0.1 (2014-05-25)
Added "Featured Show" not in the shows list

1.0.0 (2014-05-24)
Initial release

SCREENSHOTS

Image

Image

Image

I tested the plugin on a Gotham installation both on Windows and Linux.

Let me know your findings.

Cheers,
Goph
Reply
#2
Great can't believe it.
i will test it and report.
Complimenti e grazie.
Peppe

EDIT

i think you should add a search button.
first impression is that you made a great job.
i reserve to post other comments after a full test of your addon.
hoping to see new italian stuff again great job mate.
Peppe
Reply
#3
Peppe,
thank you very much for your feedback.
Yes: I know that it is still incomplete.

One of the next steps is to integrate the search button for sure.
In first instance, I wanted to release a working addon (scraping, streaming and so on).

I would like to release other italian addons in the near future!
Thanks again Peppe.

Cheers,
Goph
Reply
#4
Hi
i'm playing around the addon. don't know if it is important but i'm using frodo 12.3 on a windows 7 professional.

have to say i find an strange thing on every video i play:
selecting a video it doesn't start immediately but goes on pause/buffering than if i press play on my remote the video starts and it is played without problems (low buffer),
for short videos like promo the buffer increase in a couple of second to 21% and stops the video starts only and only if i press play.
for long videos, full episode, the buffer stuck on 0% but if i press play the video starts and goes very well. now i'm watching an episod of mythbuster 4 without problem.

happy to hear the new goodies are arriving for italian users.
Peppe
Reply
#5
What a coincidence i was doing the same thing
You can find my version here
https://github.com/LorenzoRogai/DmaxItaXBMCPlugin
I fixed the play bug and moved html parsing to my site by doing this the plugin it's much faster.
If you want I can add you to the project and we can continue together.
Let me know Big Grin
Reply
#6
i can't install it on frodo due to the structure.
could you provide to fix it so i can test also your version.
Peppe
Reply
#7
Hello Lorenzo,
nice one! I hope you do not mind if I will not join you, but I am curious to test your plugin as soon as will come back at home.

@peppe
I have just released a new version with some minor fixes. Can you test it please? Smile
DMAX Italia 1.0.2

Regarding the behavior you are experimenting, it is related to the player API (Brightcove), but it is possible to set the player to auto-start. Actually the buffer is not stucking: if you wait about a couple a minute, the video will start. Many players have the buffering option to avoid interruptions during the normal playback (think about slow connections or similar).

When I will implement the settings, you will can choose between enable or disable autostart, set a bitrate, etc., etc.

I am working on it for the next release.

Thank you for your precious feedback and keep it on.

Cheers,
Goph
Reply
#8
You can find my version here
http://www.lorenzorogai.it/dmax/plugin.v...max-it.rar
Reply
#9
ok boys,
i'm playing with both addon on a gotham installation on my office's pc.

@Lorigio, before i couldn't install the plug in because i have downloaded the wrong zip from github (both plugin and api folder).
i tested your addon, interesting the message "wait the buffer".
don't know if is better the list structure with letters or the one used from Gopher with the title of the shows.
i see tha "unti e bisunti" is missed. maybe it is listed not with the "U" but with something else.

@Gopher, just installed on gotham (my installation at home will be on frodo till when nessus don't release the new version of bello skin) so i take a look,
very interesting the duration of the shows next to the episode title.
i see than only for first show in the main list xbmc created the thumbnail for each others i have the fallback.
if i browse the shows i can see the thumbnails for all the episodes.

i reserve to add more comments when i will be at home.

anyway, nice job.
Peppe
Reply
#10
(2014-05-25, 19:39)peppe_sr Wrote: have to say i find an strange thing on every video i play:
selecting a video it doesn't start immediately but goes on pause/buffering than if i press play on my remote the video starts and it is played without problems (low buffer),
for short videos like promo the buffer increase in a couple of second to 21% and stops the video starts only and only if i press play.
for long videos, full episode, the buffer stuck on 0% but if i press play the video starts and goes very well. now i'm watching an episod of mythbuster 4 without problem.

The problem with the buffer seems to be caused by the wrong length of the file. The plugin correctly detects the length (ie. 30 secs) but then it passes XBMC in minutes (30 minutes). Press "I" on the file to easily see this.
Reply
#11
I had a quick glance at the plugin. In getShows() the same page is loaded two times, this is useless and takes time.

You can parse the show list using BeautifulSoup and avoiding regexp. It's cleaner, simpler and less error prone.

You should also sort the show list alphabetically. Use xbmcplugin.addSortMethod(handle, xbmcplugin.SORT_METHOD_LABEL) just before xbmcplugin.endOfDirectory(..)
Reply
#12
Hello Nightflyer,
thanks for your hints.
I will fix in the next version plus other fixing Smile.

Regarding BeautifulSoup: I do not know for which reason, but I am not able to get it working with the regex and also for no reason to get the @videoPlayer param. As you can see, I used for scraping both shows and episodes. When I will figure out what is going on, I applied the new method even if, usually, I prefer to work with regex.

Can you please post a screenshot showing the wrong length issue (I am sorry, but I will come back at home late and I would like to fix as soon as put my foot beyond the door)?

Thanks a lot.
Goph
Reply
#13
(2014-05-26, 16:43)Gopher Wrote: Can you please post a screenshot showing the wrong length issue (I am sorry, but I will come back at home late and I would like to fix as soon as put my foot beyond the door)?

http://postimg.org/image/kyrte4e77/

What about a repo on github? It's free and others can fork it and contribute more easily.
Reply
#14
Sooner or later Wink.
Thanks.
Probably I am passing the duration for the addStreamInfo instead of the duration for the setInfo because they differ (for addStreamInfo is expressed in seconds (int) while for setInfo is a str value).
But I think that I should also pass the autoStart parameters to true to avoid the buffering.

Cheers,
Goph
Reply
#15
@nightflyer

Thanks for your hints! I fixed almost everything, but I am trying to parse the shows list with BeautifulSoup.
This is the problem:

Code:
show_lists = soup.findAll('li',class_=re.compile("(first-child|last-child|)"))

This regex should work, but it is not working.
I need to get all the li tags that contain a class with value first-child or last-child or empty.

Any help or idea?

Cheers,
Goph
Reply
  • 1(current)
  • 2
  • 3
  • 4
  • 5
  • 7

Logout Mark Read Team Forum Stats Members Help
DMAX Italia video addon3