Daily Motion Resolver Fix

Eldorado

Moderator
Staff member
May 7, 2012
990
0
16
Wait hold up.. there are 2 different methods being done in each, which is the more preferred method? I see in yours you are doing searches for different quality types

You closed your pull before I asked :)
 

the-one

Banned
May 7, 2013
189
0
0
New Jersey, USA
Yes...I am searching on multiple quality types so that whatever is available can be played.

Should I open my pull-request again??? And we can decide later based on tests and feedback here which one to merge. ???
 

Eldorado

Moderator
Staff member
May 7, 2012
990
0
16
Well I don't want to pull anything in until we are sure.. makes my life a headache :)

Do we have some example links where the high quality ones are available?

Is this the same idea as Putlocker where the low quality is a down converted flv file, but on some files we are able to grab the original untouched file?

Maybe it would be a good idea to add an option to the addon so user can select between Highest Quality and Low Quality - if the low quality "video_url" is always available
 

Eldorado

Moderator
Staff member
May 7, 2012
990
0
16
K, if the low quality version is always there, then a setting for this guy would be ideal.. let users select to try for highest quality vs low quality, similar to Putlocker - bandwidth/connection speed concerned users will appreciate
 

the-one

Banned
May 7, 2013
189
0
0
New Jersey, USA
Updated the resolver with following:

Fixed the Daily-Motion resolver.
Added multiple quality video links identification.
Added setting to play High/Medium/Low quality video if multiple links are found.
Added notification if video has been removed.


Please review the code and let me know.

Thanks.
 

Eldorado

Moderator
Staff member
May 7, 2012
990
0
16
Awesome stuff thanks!

I need to do a couple small updates to the code though

- the google red x graphic is included in the resources folder now, no need to pull it online
- change print statements to addon.log()
- wrap the entire code in get_media_url() with try:except
- return self.unresolvable() if link cannot be found
 

the-one

Banned
May 7, 2013
189
0
0
New Jersey, USA
I have left out one case though...

If the file contains "autoUrl". This is usually of the form:
Code:
http://www.dailymotion.com/cdn/manifest/video/x11v2s6.mnft?auth=1374382211-54971399ab19770e508ba1a7ddd7ca8c
The above is a manifest file and contains:
Code:
{"version":"1","duration":1201,"alternates":
[
 {"name":"240",
 "bitrate":246,
 "codecs":"mp4a.40.2,avc1.42000d",
 "width":320,
 "height":180,
 "template":"http://proxy-02.nyc.dailymotion.com/sec(d1ef7f1c691a9422636970ee874f05e8)/video/437/595/63595734_mp4_h264_aac_ld.mnft#cell=nyc&comment="
 },
 {"name":"380",
 "bitrate":460,
 "codecs":"mp4a.40.2,avc1.42001e",
 "width":512,"height":288,
 "template":"http://proxy-02.nyc.dailymotion.com/sec(4272357de5f0c1896e53c9844e2f7e1c)/video/437/595/63595734_mp4_h264_aac.mnft#cell=nyc&comment="
 },
 ... # MORE VIDEO QUALITIES
],
"default":"480"}
From above we can get one of the template files:
Code:
http://proxy-02.nyc.dailymotion.com/sec(d1ef7f1c691a9422636970ee874f05e8)/video/437/595/63595734_mp4_h264_aac_ld.mnft#cell=nyc&comment=
The template file is of the form:
Code:
{"version":"1","duration":1200.602,"bitrate":246,"codecs":"mp4a.40.2,avc1.42000d",
"audio":{"codec":"AAC/LC","bitrate":64,"channels":2,"samplesize":16,"samplerate":22050},
"video":{"codec":"H264/AVC [email protected]","bitrate":180,"width":320,"height":184,"framerate":29.970},
"template":"/sec(d1ef7f1c691a9422636970ee874f05e8)/frag($fragment$)/video/437/595/63595734_mp4_h264_aac_ld.flv",
"fragments":[[1,9.276],[1,10.711],[3,10.010],[1,9.343],[1,10.644],...]}
Using the above I am trying to create an m3u8 file so that this video can be played.

Below is what I my m3u8 file.

Code:
#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-X-ALLOW-CACHE:YES
#EXT-X-VERSION:2
#EXT-X-MEDIA-SEQUENCE:1
#EXTINF:10,
http://proxy-06.nyc.dailymotion.com/sec(d1ef7f1c691a9422636970ee874f05e8)/frag(1)/video/437/595/63595734_mp4_h264_aac.flv
#EXTINF:10,
http://proxy-06.nyc.dailymotion.com/sec(d1ef7f1c691a9422636970ee874f05e8)/frag(2)/video/437/595/63595734_mp4_h264_aac.flv
... # AND SO ON WITH OTHER FRAGMENTS...
#EXT-X-ENDLIST
But it does not play.

@Eldorado: Can you please look into this? If this needs a m3u8 file or something else OR i am not creating the m3u8 correctly. Your feedback will be helpful.

Anyone you can help out with this???

Thanks.
 

the-one

Banned
May 7, 2013
189
0
0
New Jersey, USA
Awesome stuff thanks!

I need to do a couple small updates to the code though

- the google red x graphic is included in the resources folder now, no need to pull it online
- change print statements to addon.log()
- wrap the entire code in get_media_url() with try:except
- return self.unresolvable() if link cannot be found
@Eldorado: I have made the changes that you suggested. Please review the code and let me know if it looks OK