[19. April 2013] A-400 Advanced Network Setup now available | [11 Jan. 2013] Customize your A-400 Home Screen

Firmware: A-400 [13 May 2013] | C-300 [30 Nov. 2012] | A-300 [30 Nov. 2012] | C-200 [21 Jan. 2013] | A-200/A-210 [10 Aug. 2012]

Just got your NMT | WIKI has the answers | Search the forum | Forum Rules/Policy | Firmware & Official NMT News | Popcornhour manuals



User(s) browsing this thread: 1 Guest(s)
Thread Closed 
Bierdopje 4 NMT
10-17-2010, 02:12 AM
Post: #1
Star Bierdopje 4 NMT
Hi guys,

I've build a script that automatically downloads subtitles from bierdopje.com. IMHO the best site for dutch subtitles for tv series.

I have my B-110 set up in such a way that TV series are automatically downloaded and added to OverSight. I have the following chain:
Medianzb.com RSS feed » Feedtime » NZBget » Oversight.

Works like a charm and very happy with it. The only annoying bit left was that I had to download the subtitles from bierdopje myself and place it in the correct folder. So I got bored of doing that so I automated the process. Big Grin

It scans your whole /share/Tv folder for .mkv and .avi files without a .srt file. It then extracts the showname, seasen and episode information from the path and filename. It then checks if there are subtitles available and downloads the best possible subtitle and renames it appropiately.

It's written in PHP, and I used the Bierdopje PHP API wrapper from these dudes: http://bit.ly/cvG4VM
However some features of the newer version of the API wasn't implemented yet so I had to adjust their API.

I've been running this for a couple of weeks now and seems pretty stable. I really would like to have some ppl try it out, any feedback/ideas would really be appreciated! Wink

Installation instructions:
1. Download the zip file from here: bierdopje-v0.1.zip
2. extract the contents to /share/Apps/AppInit/websites/bierdopje_web
3. point your nmt or webbroser to http://popcorn:9999/bierdopje_web/sub.php

That should work.
In case you have copied videos using windows explorer and thus permissions are screwed up, add the following line to /share/start_app.sh:
Code:
ln -s /share/Apps/AppInit/websites/bierdopje_web /opt/sybhttpd/default/bierdopje_web
And point your browser tohttp://popcorn:8883/bierdopje_web/sub.cgi
(you will run the script as root so no permission errors should show up.)

To do:
  • Implement some way to download english subs as an option when no dutch subs are available.
  • Create a CSI package (could really use some help with that!)
  • Do some progress indication (the script takes some time to run before output is shown and flush(); doesn't work)


Cheerio!
Find all posts by this user
[+] 3 users say Thank You to SilverViper for this post
10-17-2010, 12:06 PM
Post: #2
RE: Bierdopje 4 NMT
Great work,

i'm going to give it a try right away!

A good feature you could add on your ToDo-list would be to use to USER-key too,
this way downloaded subs get marked.

My PCH-A110 Stats | Samsung LE32A656 | Logitech Z-2300 | Harmony One
Oversight | Sick Beard DOGnzb | NZBGet | Transmission | Lighttpd | ...
Find all posts by this user
10-17-2010, 02:36 PM
Post: #3
RE: Bierdopje 4 NMT
Thanks for trying it out!

The API is read-only for the time being... I would need to reverse engineer the whole site to do that and that would be kind of silly Tongue
Find all posts by this user
10-17-2010, 04:56 PM (This post was last modified: 10-17-2010 04:59 PM by Slevin.)
Post: #4
RE: Bierdopje 4 NMT
I see in your code you get the subs every time,
maybe you can get them from the personal feed of every user using the userkey
Code:
http://external.bierdopje.com/subtitles/BDUSR1A2B3C4D5E6F7G8H9/nl/[code]

for marking an srt as watched:
just add /userkey/BDUSERKEY  behind the url and it should be fine
example:

[code]http://www.bierdopje.com/downloads/sub/48787/The.Big.Bang.Theory.S01E13.The.Bat.Jar.Conjecture.720p.HDTV.x264.AC3-E7.srt/userkey/BDUSR1A2B3C4D5E6F7G8H9

Note: the BDUSER-ID used in the examples are fake

My PCH-A110 Stats | Samsung LE32A656 | Logitech Z-2300 | Harmony One
Oversight | Sick Beard DOGnzb | NZBGet | Transmission | Lighttpd | ...
Find all posts by this user
10-17-2010, 05:20 PM
Post: #5
RE: Bierdopje 4 NMT
Hmm that might work yes... I'll play with that soon. Not sure if want to have the marked as watched... Since I haven't watched it yet Tongue

And I don't download every sub every time. I do use my api key every time...
Find all posts by this user
10-17-2010, 05:36 PM
Post: #6
RE: Bierdopje 4 NMT
It isn't marked as watched,
just as "Verkregen" on Bierdopje only the first circle will be marked green

My PCH-A110 Stats | Samsung LE32A656 | Logitech Z-2300 | Harmony One
Oversight | Sick Beard DOGnzb | NZBGet | Transmission | Lighttpd | ...
Find all posts by this user
10-17-2010, 06:00 PM
Post: #7
RE: Bierdopje 4 NMT
Hmm that would be really sweet Tongue

I'll try it out and let you know Wink
Find all posts by this user
10-17-2010, 07:18 PM
Post: #8
RE: Bierdopje 4 NMT
Ok I download using the following url:
Code:
http://www.bierdopje.com/downloads/sub/48666/House.S07E04.HDTV.XviD-LOL/apikey/4B11A785B6465ADA
using the api key

You suggest downloading using the following url:
Code:
http://www.bierdopje.com/downloads/sub/48666/House.S07E04.HDTV.XviD-LOL/userkey/BDUSR9B8E2105AEDBxxxxxxx
using the user key.

However, it does not mark it as downloaded either way... Any idea?
Find all posts by this user
10-17-2010, 07:24 PM (This post was last modified: 10-17-2010 07:25 PM by Slevin.)
Post: #9
RE: Bierdopje 4 NMT
When i use the link with my own userkey, it downloads & gets marked as downloaded

Note: you have to reload the page to see the circle change green

My PCH-A110 Stats | Samsung LE32A656 | Logitech Z-2300 | Harmony One
Oversight | Sick Beard DOGnzb | NZBGet | Transmission | Lighttpd | ...
Find all posts by this user
10-17-2010, 07:29 PM
Post: #10
RE: Bierdopje 4 NMT
Ah never mind, it's a setting in the user options:
Markeer een aflevering als "verkregen" zodra ik een ondertitel download. Ja/Nee
Find all posts by this user
10-18-2010, 01:15 AM (This post was last modified: 10-18-2010 01:16 AM by SilverViper.)
Post: #11
RE: Bierdopje 4 NMT
Ok I managed to implement the userkey thing...

However, as it turns out, you need to be logged in to have it marked as downloaded... Not sure if I can manage to login using wget...
Find all posts by this user
10-23-2010, 02:01 PM
Post: #12
RE: Bierdopje 4 NMT
Wow, this looks very interesting indeed.
I think lordy might find use for the script, as he wants oversight to be able to download subs as well. Though I don't know if he uses PHP or is planning to use it for the Oversight subtitle downloader.
He could definitely help you out with creating a CSI package of course.
Maybe something to work out together.
I have a question, though, is it possible to set another location for the downloads? I download directly to my External HDD, so the Share folder isn't an option for me.
Great app, though!


PCH-A100 (FW 01-17-100317-15-POP-402-000) (00-17-091216-15-POP-402 NMT Apps)
Philips 28PW9611/01 PAL SD, connected with Composite

Old skoolCool
Find all posts by this user
10-30-2010, 02:25 AM
Post: #13
RE: Bierdopje 4 NMT
Yeah I knew he was busy working on subtitle downloads, didn't wanted to wait so built my own script. And since there wasn't anything useful for Bierdopje I decided to share it. And I've looked if I could append it to OverSight but that didn't seem so easy Angle

Somewhere near the bottom of the file you see the following:
PHP Code:
# start the scan
scandirs("/share/Tv"); 

Edit this to the path of your external HDD and it should work Wink

I also use /share/tmp/ for downloading the files... That's in function downloadfile... You might need to edit that as well... Oh, and make sure you use a proper texteditor with Unix support (eg. TextPad or Notepad++). Else it would go titsup Wink
Find all posts by this user
11-02-2010, 02:25 PM
Post: #14
RE: Bierdopje 4 NMT
(10-30-2010 02:25 AM)SilverViper Wrote:  Yeah I knew he was busy working on subtitle downloads, didn't wanted to wait so built my own script. And since there wasn't anything useful for Bierdopje I decided to share it. And I've looked if I could append it to OverSight but that didn't seem so easy Angle

Somewhere near the bottom of the file you see the following:
PHP Code:
# start the scan
scandirs("/share/Tv"); 

Edit this to the path of your external HDD and it should work Wink

I also use /share/tmp/ for downloading the files... That's in function downloadfile... You might need to edit that as well... Oh, and make sure you use a proper texteditor with Unix support (eg. TextPad or Notepad++). Else it would go titsup Wink

Well, it's certainly a good pro active behaviour Smile
I use notepad++ so they can point in any direction they want to Wink


PCH-A100 (FW 01-17-100317-15-POP-402-000) (00-17-091216-15-POP-402 NMT Apps)
Philips 28PW9611/01 PAL SD, connected with Composite

Old skoolCool
Find all posts by this user
12-11-2010, 11:54 PM
Post: #15
RE: Bierdopje 4 NMT
Wow this is what I was looking for !
Always found it sucked to be able to get downloads in automatically but still having to download and rename subs manually. Thanks !

Just one question, is there a way to automate the process, so the NMT checks for subs once a day or something?

The 'no dutch subs available -> download english ones instead' option would also be a great addition! Hope you are still working on the project Wink
Find all posts by this user
Thread Closed 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  NMT remote iPhone native app. racermonoid 390 126,183 03-06-2013 08:01 PM
Last Post: mindnever
  Bierdopje auto-sub for A-110 BeeVee 13 2,794 02-06-2013 09:15 PM
Last Post: Gsxie
  Music Browser for NMT - Updated August, 2nd, 2011 gkreidl 14 8,038 01-19-2013 04:07 PM
Last Post: winfried_laane
  MediatankController 1.2 for iPhone - browse and control your NMT from your phone Niels Leenheer 424 274,000 11-27-2012 03:28 PM
Last Post: jedebe
Star [Apps] Bierdopje 4 NMT PHP script SilverViper 4 1,322 11-26-2012 04:57 PM
Last Post: Djiest
  MediatankController 1.0 for Adobe AIR - browse and control your NMT from your PC Niels Leenheer 232 166,005 05-13-2012 10:48 PM
Last Post: robertazimmerman
Music fuppes 0.629 for NMT - dlna, upnp media server [UPDATED: 31-May-2009] Mr Segfault 53 45,234 10-12-2011 01:04 AM
Last Post: spud
  Avidemux on NMT Cholsonic 0 1,223 09-26-2011 12:23 PM
Last Post: Cholsonic
  A ssh client for NMT A-100 Oleg 0 2,113 05-24-2011 05:54 PM
Last Post: Oleg
  default nmt theme and more rows bephi_perez 0 1,889 04-30-2011 07:56 PM
Last Post: bephi_perez

Forum Jump: