download_tvsubtitles.net

Dolphin Service Menus

Source i (link to git-repo or to original if based on someone elses unmodified work):

Add the source-code for this project on opencode.net

0
Become a Fan
5.0

Description:
This is a service menu to download subtitles from tvsubtitles.net

just right click on a video file -> actions -> download subtitle, it will show you a list of subtitles select one and it will be downloaded and saved with the same name as the video (with a subtitle extension of course), so your player will detect automatically the subtitle

Install:
Copy download_tvsubtitle.desktop to ~.kde/share/kde4/services/ServiceMenus
Copy download_tvsubtitles.net.py to some dir of your path (i.e. ~/bin)

- Dependencies:
python
wget
kdialog

You may also be interested in:
http://kde-apps.org/content/show.php/download_opensubtitle?content=65444

Ratings & Comments

14 Comments

Bram77

The script is not working because it can not handle the filename. This filename will result in an error... /storage/Programs/download_tvsubtitles.net.py "Smallville - S02E06 - Redux.avi" Show: "smallville -" Season: 2 Episode: 06 sh: zenity: not found And this one does work well... (I have to rename the subtitle file manually to match the video file). /storage/Programs/download_tvsubtitles.net.py "Smallville S02E06.avi" Show: "smallville" Season: 2 Episode: 06 episode-97.html ['English subtitles (DVD)', 'French subtitles ', 'Russian subtitles ', 'Hungarian subtitles (DVD)']

revertex

thanks theccm, with your fixes it works as expected now, i can download just fine, and select any available language other than English.

theccm

ok answer to myself, the broken pipe problem occurs when you have space in filename. However, in my case it downloads always english subtitle 'cause the following code does not work : for name in names: if name == resp: j=i i=i+1 because if you select 3rd line, <resp> will equal "2" and <name> will equal "Italian subtitle" so the test never works and j will always equal "0" btw i don't understand why you do this test ? I removed it and dit the following change : link = url + "download-" + links[j][10:] becomes : link = url + "download-" + links[int(resp)][10:] -- Qt: 4.4.3 KDE: 4.2.1 (KDE 4.2.1) KDialog: 1.0

theccm

ok answer to myself, the broken pipe problem occurs when you have space in filename. However, in my case it downloads always english subtitle 'cause the following code does not work : for name in names: if name == resp: j=i i=i+1 because if you select 3rd line, <resp> will equal "2" and <name> will equal "Italian subtitle" so the test never works and j will always equal "0" btw i don't understand why you do this test ? I removed it and dit the following change : link = url + "download-" + links[j][10:] becomes : link = url + "download-" + links[int(resp)][10:] -- Qt: 4.4.3 KDE: 4.2.1 (KDE 4.2.1) KDialog: 1.0

theccm

here is the log from konsole, I think it's a "space in filename" problem or something like this... does apply with 4 differents videos didn't find one which work -- thanks! ['English subtitles ', 'English subtitles (DVD.ORPHEUS)', 'Spanish subtitles ', 'French subtitles (HDTV.NoTV)', 'Russian subtitles (HR HDTV)', 'Greek subtitles ', 'Hungarian subtitles (HDTV.NoTV)', 'Polish subtitles (HDTV)'] /subtitle-8826.html gzip: S02E04.gz: No such file or directory gzip: stdin: Bad file descriptor --2009-03-09 23:48:35-- http://www.tvsubtitles.net/download-8826.html Résolution de www.tvsubtitles.net... 213.155.5.112 Connexion vers www.tvsubtitles.net|213.155.5.112|:80... gzip: S02E04.gz: No such file or directory gzip: stdin: Bad file descriptor connecté. requête HTTP transmise, en attente de la réponse... 302 Found Emplacement: http://f.tvsubtitles.net/Dexter_2x04_en.zip [suivant] --2009-03-09 23:48:35-- http://f.tvsubtitles.net/Dexter_2x04_en.zip Résolution de f.tvsubtitles.net... 87.118.126.180 Connexion vers f.tvsubtitles.net|87.118.126.180|:80... connecté. requête HTTP transmise, en attente de la réponse... 200 OK Longueur: 21820 (21K) [application/zip] Saving to: `STDOUT' 0% [ ] 0 --.-K/s in 0s Ne peut écrire dans « - » (Relais brisé (pipe)).

theccm

workaround: replace: response = os.system("wget -O - \"" + link + "\" |zcat > " + subName ) with: response = os.system("wget -O - \"" + link + "\" |zcat > \'" + subName + "\'")

Sciamano72

I'm still using KDE3, so I copied the .desktop file to the ~/.kde/share/apps/konqueror/servicemenus folder. It searches for the subtitles file, but if I try to download it, Konqueror gives the following error: An error ocurred downloading or writing the subtitle Also tried the alternative python file posted on the comment above, but that does not work at all for me.

golgoth

Hum, strange because it works really well for me, i'm under KDE4 but it's actually not relevant, it should work under KDE3 too. Could you try my version by opening a console and type the following: /path/to/download_tvsubtitles.net.py /full/path/to/your/video/file.avi If it doesn't work it should give you an error, please copy/paste it here.

Sciamano72

This is what it says: bash: /home/luca/bin/download_tvsubtitles.net2.py: /usr/bin/python^M: bad interpreter: No such file or directory I'm sure the problem is that "^M", but I have no idea about what it is

golgoth

Ok I think, some extra characters were added when you copied/pasted the code from the link I posted. What editor do you use ? Try kate or kwrite and check if you actually see these strange characters in order to remove them.

golgoth

Ok easier way, I've posted it there: http://www.yousendit.com/download/WnBUa3ZKQk5rWThLSkE9PQ

Sciamano72

I actually downloaded it from the first site. Did not copy/paste. I use Kate anyway... I'll try the last link now.

Sciamano72

Now it works perfectly. Thanks!!!

golgoth

Hi, It wasn't working for me (there is a 5 seconds delay on the subtitle html page) so I made some changes to "download_tvsubtitles.net.py". You can find my version here: http://pastebin.com/f205a3f24 Subtitles are located at http://tvsubtitles.net/files/ so the trick is to get the filename from inside the html file. (This filename is actually splitted over 3 variables: s2, s3 and s4) What do you think about it? Cheers, Tom

Pling
0 Affiliates
Details
license
version 0.1
updated
added
downloads 24h 0
mediaviews 24h 0
pageviews 24h 0

More Dolphin Service Menus from Hirs:

download_opensubtitle
Hirs
last update date: 11 years ago

Score 5.7

Download Youtube video
Hirs
last update date: 19 years ago

Score 4.7

Other Dolphin Service Menus:

burnWithGrowisofs
chunkylover
last update date: 20 years ago

Score 5.0

Firefox-bookmarks service menu
storyteller
last update date: 20 years ago

Score 5.0

Text Convert Service Menu
smp-penguin
last update date: 21 years ago

Score 5.0

Pdflatex servicemenu
bobuse
last update date: 20 years ago

Score 5.0

Send through Bluetooth
dmnet
last update date: 21 years ago

Score 5.0

Add to Bloglines
spookster
last update date: 20 years ago

Score 5.0



System Tags