[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
12-12-2010, 12:22 AM
Post: #16
RE: Bierdopje 4 NMT
Building a CSI package is not too difficult.
http://nmtinstaller.com/?p=createpackage

To avoid mishaps, tar the package on the NMT.

Download an existing CSI package from any repo and study them, and you'll get the idea! If you get in trouble while packaging, make a separate thread about it.

Audio, video, disco - I hear, I see, I learn.
Wiki. Wiki? Wiki!
Find all posts by this user
12-19-2010, 04:46 PM
Post: #17
RE: Bierdopje 4 NMT
Hello,

I tried to use the script, but im getting the following error/message:

Subtitle engine


Warning: opendir(/share/Tv) [function.opendir]: failed to open dir: No such file or directory in /opt/sybhttpd/localhost.drives/HARD_DISK/Apps/AppInit/websites/bierdopje_web/sub.php on line 16

Any idea whats wrong?
Find all posts by this user
12-19-2010, 04:50 PM
Post: #18
RE: Bierdopje 4 NMT
The NMT is based on Linux and as such it's picky with Capitalization.

Check that the /share/Tv exist on your NMT disk.
/share/Tv is not share/TV or share/tv, it must be exactly /share/Tv

Or change the PHP script to point to something you have and want. As indicated by the error message.

Audio, video, disco - I hear, I see, I learn.
Wiki. Wiki? Wiki!
Find all posts by this user
12-19-2010, 04:52 PM (This post was last modified: 12-19-2010 05:12 PM by Posible.)
Post: #19
RE: Bierdopje 4 NMT
(12-19-2010 04:50 PM)dc11ab Wrote:  The NMT is based on Linux and as such it's picky with Capitalization.

Check that the /share/Tv exist on your NMT disk.
/share/Tv is not share/TV or share/tv, it must be exactly /share/Tv

Or change the PHP script to point to something you have and want. As indicated by the error message.


Hehe thx but i figured it out.. I typed the wrong word. I used TV instead of Tv Wink
Oke.. one thing i still dont understand is this:


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 to http://popcorn:8883/bierdopje_web/sub.cgi
(you will run the script as root so no permission errors should show up.)

When im trying to access my NMT bij using this link: http://popcorn:8883/bierdopje_web/sub.cgi im getting an error that i dont have permission to acces it. (and ofcourse i changed the path of the link to my own NMT Smile )

To implement the code, i used Putty and access my NMT and added the following line:

ln -s /share/Apps/AppInit/websites/bierdopje_web /opt/sybhttpd/default/bierdopje_web

This is correct right?
Find all posts by this user
12-21-2010, 11:16 AM
Post: #20
RE: Bierdopje 4 NMT
Great work, I'll try this out later today.
Is there a simple way to let the script get the English subs?
I ask because it would 1st make the script usable for non Dutch speakers and

2nd I am Dutch but use the english subs most of the time so the TV doesnt have to be so loud when my daughter is sleeping in the next room.
And I find it easyer to read the english subs on english programs while listening to english... I dont have to switch language in my head if I didnt catch a bit of the conversation...

C200 1.5 TB Hdd HDMI
A200 Metal apps on USB stick
TV: Samsung LE40C650

Visit my Personal Website
Visit this user's website Find all posts by this user
12-21-2010, 12:11 PM
Post: #21
RE: Bierdopje 4 NMT
3rd
It would become a nice tool for anyone in any country who prefers English subs Wink

Audio, video, disco - I hear, I see, I learn.
Wiki. Wiki? Wiki!
Find all posts by this user
12-21-2010, 01:34 PM (This post was last modified: 12-21-2010 01:37 PM by Philos.)
Post: #22
RE: Bierdopje 4 NMT
English subs are easy, just open sub.php
on line 71 change $lang = "nl" to $lang = "en"

Works great but some shows are not recognized like:

Csi Miami

Code:
Searching subtitles for: CSI.Miami.S09E09.720p.HDTV.X264-(no groupnames).mkv

Notice: Trying to get property of non-object in /opt/sybhttpd/localhost.drives/SATA_DISK/Apps/AppInit/websites/bierdopje_web/sub.php on line 73
Unknown show: Csi Miami
Code:
Searching subtitles for: CSI.S11E07.HDTV.XviD-(no groupnames).avi

Notice: Trying to get property of non-object in /opt/sybhttpd/localhost.drives/SATA_DISK/Apps/AppInit/websites/bierdopje_web/sub.php on line 73
Unknown show: Csi Crime Scene Investigation

Code:
Searching subtitles for: NCIS.Los.Angeles.S02E01.720p.HDTV.X264-(no groupnames).mkv

Notice: Trying to get property of non-object in /opt/sybhttpd/localhost.drives/SATA_DISK/Apps/AppInit/websites/bierdopje_web/sub.php on line 73
Unknown show: Ncis Los Angeles

Probably due to naming convention??

C200 1.5 TB Hdd HDMI
A200 Metal apps on USB stick
TV: Samsung LE40C650

Visit my Personal Website
Visit this user's website Find all posts by this user
12-22-2010, 12:59 AM
Post: #23
RE: Bierdopje 4 NMT
Wow lot's of responses, nice!

Naming issue: The way the script works is, it uses the Bierdopje search engine to find the show based on the path of the file... So for instance, if you search for Castle on Bierdopje it returns a show called Castle (some kind of documentary) and Castle (2009), the show I suppose it should get the subs for... But OverSight/FeedTime/NZBget really likes to call it Castle and my script searches for Castle and thus downloads the subs for the documentary...
Easiest solution is adding a function to check if a bierdopje.txt is present in the directory of /Tv/Castle with only "Castle (2009)" in it so the script will download the proper subs.

I already have coded that it will download the English sub when the Dutch one is isn't available yet. In my testing I found it annoying it already downloaded the English sub although I wasn't going to watch that show yet, and by the time I wanted to watch that particular show that had the English sub downloaded, the Dutch sub was available now, which wouldn't get replaced because the script sees the file has an srt.
So I commented that code out... I can either create subeng.php/cgi that downloads the English sub, or I can put some more effort in it and ask each time if it needs to download the English sub, or it should automatically check each file if a Dutch version is available which is even more work to get that done nicely... What do you guys say?

@Posible: Do you get a 403 Forbidden page, or errors from the script? Did you restart your popcorn?

I also notice on my Popcorn that when it has a lot of subs to download, the page times out but it does finish in the background... Did anyone notice that too?

Atm, my popcorn is behaving weird, the FTP service won't start and most of the CSI installed software doesn't run, including telnet... People suggest on forums to reinstall the NMT apps, but there's no upgrade available atm so I need to do a fresh install and I don't want to format my whole 1 TB disk again... I will try installing them from USB stick, maybe it will fall for that...

It should be possible to use a scheduler to run the PHP script, but I have to fix that first before I can look at that or work on the script...
Find all posts by this user
12-22-2010, 01:09 AM
Post: #24
RE: Bierdopje 4 NMT
(12-22-2010 12:59 AM)SilverViper Wrote:  In my testing I found it annoying it already downloaded the English sub although I wasn't going to watch that show yet, and by the time I wanted to watch that particular show that had the English sub downloaded, the Dutch sub was available now, which wouldn't get replaced because the script sees the file has an srt.
So I commented that code out... I can either create subeng.php/cgi that downloads the English sub, or I can put some more effort in it and ask each time if it needs to download the English sub, or it should automatically check each file if a Dutch version is available which is even more work to get that done nicely... What do you guys say?

The subtitle files should allow language codes
SomeMovie.avi
SomeMovie.NL.srt
SomeMovie.EN.srt

See the wiki for details of supported language codes.

Drawback: user may have to change NMT language setting to switch, but it would make it a lot easier for this script to work Big Grin

Audio, video, disco - I hear, I see, I learn.
Wiki. Wiki? Wiki!
Find all posts by this user
12-22-2010, 10:32 AM
Post: #25
RE: Bierdopje 4 NMT
(12-22-2010 12:59 AM)SilverViper Wrote:  Wow lot's of responses, nice!

Easiest solution is adding a function to check if a bierdopje.txt is present in the directory of /Tv/Castle with only "Castle (2009)" in it so the script will download the proper subs.

I think that would be a good option, we can see from the output what shows do not work and find the right name ourselves.

Quote:I already have coded that it will download the English sub when the Dutch one is isn't available yet. In my testing I found it annoying it already downloaded the English sub although I wasn't going to watch that show yet, and by the time I wanted to watch that particular show that had the English sub downloaded, the Dutch sub was available now, which wouldn't get replaced because the script sees the file has an srt.
So I commented that code out... I can either create subeng.php/cgi that downloads the English sub, or I can put some more effort in it and ask each time if it needs to download the English sub, or it should automatically check each file if a Dutch version is available which is even more work to get that done nicely... What do you guys say?

I think dc11ab's idea to download them both if available would be a nice option.
SomeMovie.NL.srt
SomeMovie.EN.srt
But would probably need some extra coding so for the time being you could create the subeng.php I think, so people can choose.
I have it up and running by the way, it downloads english subs for me.


Quote:I also notice on my Popcorn that when it has a lot of subs to download, the page times out but it does finish in the background... Did anyone notice that too?

Yes I noticed, but did not notice the script was still running. Maybe dump the output somewhere and periodicaly update the webpage? Like NZBget does.



Quote:It should be possible to use a scheduler to run the PHP script, but I have to fix that first before I can look at that or work on the script...

Send you an e-mail how to fix your PCH problems, scheduler would be nice.

All in all I am happy it is doing something, most of my shows now get their subs automaticly. Thanks

C200 1.5 TB Hdd HDMI
A200 Metal apps on USB stick
TV: Samsung LE40C650

Visit my Personal Website
Visit this user's website Find all posts by this user
12-29-2010, 04:06 PM
Post: #26
RE: Bierdopje 4 NMT
(12-22-2010 12:59 AM)SilverViper Wrote:  I can either create subeng.php/cgi that downloads the English sub, or I can put some more effort in it and ask each time if it needs to download the English sub, or it should automatically check each file if a Dutch version is available which is even more work to get that done nicely... What do you guys say?

IMO all these solutions would help, but the last one doesn't leave any choice. Sometimes I prefer english subs over dutch ones.
If it would ask to download english subs if only they are available, that would be nice, so you would immediately know if there are any subs at all for that particular episode.

But a subeng.php/cgi would be fine also Smile
Find all posts by this user
12-29-2010, 04:54 PM
Post: #27
RE: Bierdopje 4 NMT
Hmm, there might be an opportunity for 200-series; IIRC there's an API (xml-rpc-ish) for changing the subtitle language setting. I don't know if it'll work, but in theory that should be possible to call from a PHP script:
Set language: http://127.0.0.1:8008/setting?arg0=set_s...g1=english
(returns 0 for success, 1 for failure)
List available languages: http://127.0.01:8008/setting?arg0=list_s...e_language
(returns xml list with returnvalue 0)

However I don't think this is available in the 100-series Undecided

Audio, video, disco - I hear, I see, I learn.
Wiki. Wiki? Wiki!
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,087 03-06-2013 08:01 PM
Last Post: mindnever
  Bierdopje auto-sub for A-110 BeeVee 13 2,783 02-06-2013 09:15 PM
Last Post: Gsxie
  Music Browser for NMT - Updated August, 2nd, 2011 gkreidl 14 8,035 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 273,803 11-27-2012 03:28 PM
Last Post: jedebe
Star [Apps] Bierdopje 4 NMT PHP script SilverViper 4 1,320 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 165,966 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,224 10-12-2011 01:04 AM
Last Post: spud
  Avidemux on NMT Cholsonic 0 1,219 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,887 04-30-2011 07:56 PM
Last Post: bephi_perez

Forum Jump: