Board index   FAQ   Search  
  Login

PLEASE VISIT OUR NEW FORUMS FOR FUTURE POSTING. THIS FORUM REMAINS ONLINE FOR ARCHIVE PURPOSES ONLY.

Board index <dev>GENERAL</dev>

hawke663's API

This is or all devs of all types. For devs, by devs.

Re: hawke663's API

Postby rogerthis » Thu Feb 09, 2012 8:16 pm

What about a user dialog upload that says the quality of the file eg CAM or DVDrip?

Also an automatic upload whether the link is dead or not. It would have to take into account if a hosting service is down for a few hours and disregard this. ie false positives.
User avatar
rogerthis
DEV
 
Posts: 216
Joined: Wed Jan 04, 2012 1:24 pm
Location: Connacht

Re: hawke663's API

Postby Bstrdsmkr » Thu Feb 09, 2012 8:21 pm

rogerthis wrote:What about a user dialog upload that says the quality of the file eg CAM or DVDrip?

Also an automatic upload whether the link is dead or not.


Looks like Hawke663 is already planning a report option, the rest would be up to the addon dev to determine if the link is "dead," otherwise you'd get false reports due to server load, timeouts, and etc
Bstrdsmkr
XBMC HUB TEAM
 
Posts: 1876
Joined: Mon Jan 16, 2012 10:30 pm

Re: hawke663's API

Postby hawke663 » Thu Feb 09, 2012 8:26 pm

at the moment there are a total of 27896 links stored for 8381 movies in the database, at the time of "collecting" the links the quality was not added to the db, so it would mean going thru each link and finding the quality (altho anything prior 2011 should be dvdrip) once i code the link addition for users to add links to the central db i will include a qualitry dropdown. so it will then be stored.

as for the link dead or not, im still coding the link checker to run via a cron job, tho from my understanding, the url resolvers should also catch that, Bstrdsmkr can correct me if im wrong here but in his 1channel plugin, he doesnt include any links that the urlreslvers couldnt resolve, this is done before teh link dialog is shown to the user, so using that system dead links would never be added to the link dialog (tho knowing my luck im probably wrong lol)

im also adding a "report" function to the api, so if a link doesnt work via xbmc they have a report option shown on the tv, which can be checked (eventually by the cron job) and if found working reprt flag removed, and if found dead, then link removed from db.

also if the report function works via a plugin, would also like to add a view count option to it (so when a link is viewed via plugin, the plugin would call api/addview/{video_id}, and possibly a rating for link source.
Hawke
hawke663
 
Posts: 22
Joined: Sun Feb 05, 2012 7:29 pm

Re: hawke663's API

Postby Bstrdsmkr » Thu Feb 09, 2012 8:34 pm

hawke663 wrote:and just to clarify, the "plugin" would send these to the api? if thats the case it shouldnt be a problem,

Hawke


Correct, once the user began to play the file, the plugin would call the server's api to add any missing information.

And as long as I'm dreaming lol, it would be cool to be able to submit a SQL query and get the results back as JSON or XML. You'd have to be really careful though to prevent abuse and only execute SELECT statements.
Bstrdsmkr
XBMC HUB TEAM
 
Posts: 1876
Joined: Mon Jan 16, 2012 10:30 pm

Re: hawke663's API

Postby Bstrdsmkr » Thu Feb 09, 2012 8:48 pm

hawke663 wrote:at the moment there are a total of 27896 links stored for 8381 movies in the database, at the time of "collecting" the links the quality was not added to the db, so it would mean going thru each link and finding the quality (altho anything prior 2011 should be dvdrip) once i code the link addition for users to add links to the central db i will include a qualitry dropdown. so it will then be stored.

as for the link dead or not, im still coding the link checker to run via a cron job, tho from my understanding, the url resolvers should also catch that, Bstrdsmkr can correct me if im wrong here but in his 1channel plugin, he doesnt include any links that the urlreslvers couldnt resolve, this is done before teh link dialog is shown to the user, so using that system dead links would never be added to the link dialog (tho knowing my luck im probably wrong lol)

im also adding a "report" function to the api, so if a link doesnt work via xbmc they have a report option shown on the tv, which can be checked (eventually by the cron job) and if found working reprt flag removed, and if found dead, then link removed from db.

also if the report function works via a plugin, would also like to add a view count option to it (so when a link is viewed via plugin, the plugin would call api/addview/{video_id}, and possibly a rating for link source.
Hawke


1Channel doesn't check the live link, only that there's a resolver that can turn that link into a file link (assuming that it still exists). Keep in mind that checking via cron job will give you false positives if putlocker for example takes their server down for maintenance overnight and your cron executes during that window
Bstrdsmkr
XBMC HUB TEAM
 
Posts: 1876
Joined: Mon Jan 16, 2012 10:30 pm

Re: hawke663's API

Postby hawke663 » Thu Feb 09, 2012 9:10 pm

yup youve got a point there, unless i do a http header request on the host first to check its staus if it comes back as down, dont check, if its up then run function.

that is a bit further down the line, want to get some stuff populated in teh db first, still got the tv shows to scrape and populate yet, but its a start for the movies, then im gonna try my hand at a quick plugin just to test it (ive never actually coded a plugin yet *gulp*) LOL
hawke663
 
Posts: 22
Joined: Sun Feb 05, 2012 7:29 pm

Re: hawke663's API

Postby Bstrdsmkr » Thu Feb 09, 2012 9:25 pm

hawke663 wrote:yup youve got a point there, unless i do a http header request on the host first to check its staus if it comes back as down, dont check, if its up then run function.

that is a bit further down the line, want to get some stuff populated in teh db first, still got the tv shows to scrape and populate yet, but its a start for the movies, then im gonna try my hand at a quick plugin just to test it (ive never actually coded a plugin yet *gulp*) LOL


I'm sure there's a sane way around it, but putlocker still returns 200 when they go down for maintenance, they just replace the download page with a page stating that the server is down for maintenance. Just throwing out ideas as they come up lol

Also, plugins are a breeze once you've done your first. t0mm0 and Eldorado have made most of it ridiculously easy with their libraries
Bstrdsmkr
XBMC HUB TEAM
 
Posts: 1876
Joined: Mon Jan 16, 2012 10:30 pm

Re: hawke663's API

Postby Eldorado » Thu Feb 09, 2012 9:27 pm

Bstrdsmkr wrote:
hawke663 wrote:@roger not to keen on rapidleech, plus it would mean downloading the files to my server = bandwidth etc.

@Bstrdsmkr, if you can let me know what info the addon would send back i can add it to the script, i assume this would be a per "link" information and not per movie or both

hawke


Right, per link. It'd be cool to track as many file attributes as possible. Looking at the xbmc wiki, here's some that would be handy for video files:

File name (as opposed to complete url)
File Extension
Size
Duration
Video Codec
Video Bitrate
Resolution
Audio Codec
Audio Channels
Audio Languages
Audio Bitrate
Subtitle Languages


Just wondering why you guys want this info in the api before you start streaming the file?

To have his api pick this stuff up is a huge job
User avatar
Eldorado
DEV
 
Posts: 816
Joined: Wed Jan 04, 2012 12:15 pm

Re: hawke663's API

Postby Bstrdsmkr » Thu Feb 09, 2012 9:47 pm

Eldorado wrote:Just wondering why you guys want this info in the api before you start streaming the file?

To have his api pick this stuff up is a huge job


I think you missed a post :) we were talking about crowdsourcing the information. The first user to stream that file would submit the information back (presumably automatically).

The benefit is sorting and filtering. Most of these sites don't list resolution or bitrate so you don't know what the quality is going to be until you play it. This way if at least one other user has played that file, you'll know what the quality is going to be. You'd then be able to, for example, search for only HD content, even though the hosting site doesn't know that it's HD.
Bstrdsmkr
XBMC HUB TEAM
 
Posts: 1876
Joined: Mon Jan 16, 2012 10:30 pm

Re: hawke663's API

Postby rogerthis » Fri Feb 10, 2012 4:04 am

The url resolver doesn't check for dead links. eg looks for the text "this file has been removed". It only puts in checks to see if there is a problem or not. So the problem could be timeout, dead link or maintain mode etc. File removed(dead link) would have to be built into all the url resolvers, but it would help you a lot. This wasn't planned when t0mm0 was building url resolver because it wouldn't have been able to do anything special with this information. But now it would make sense for your api.

Also you making thousands of called to video host will get you blocked, I'd imagine. I can't see the video hosts not notices so many check from the one IP.
User avatar
rogerthis
DEV
 
Posts: 216
Joined: Wed Jan 04, 2012 1:24 pm
Location: Connacht

PreviousNext

Return to <dev>GENERAL</dev>



Who is online

Users browsing this forum: No registered users and 1 guest