mamboitaliano21 / subdownloader

Automatically exported from code.google.com/p/subdownloader
0 stars 0 forks source link

Integrating Subdownloader with SubtitleEditor #37

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
From kitone:

This is just a idea.

2 options :

* a very simple plugin
Call the subdownloader gui directly from the subtitleeditor

Very simple to make it. All option of subdownloader can be changed or
configured directly from subdownloader. When the subtitle file is
downloaded try to open with subtitleeditor. (need a message from
subdownloader)

* Really integrate plugin
Used subdownloader -cli. A simple scenario :

In subtitleeditor a menu like "Get subtitles from video"

subdownloader -cli --subtitles-from-video=videofile

subdownloader display all subtitles avaible (name + language)
- fr : subtitle_fr.srt
- us : subtitle_dvdrip.srt
- de ...

Get all name of subtitles and update the subdownloader menu (in
subtitleeditor) with them.

When the user select the item (subtitle), used subdownloader
(subdownloader --download-sub=subtitle_fr.srt) and open the subtitle
file in subtitleeditor.

This is just a idea. In my last test subdownloader doesn't work really
with -cli.

Also I don't know if it's possible or maybe you have a better idea or
suggestion.

Original issue reported on code.google.com by capiscuas@gmail.com on 31 May 2008 at 5:52

GoogleCodeExporter commented 9 years ago
Is this integration what I understand?

Subdownloader(SD) GUI -> All the subtitles founded will have a Context Menu 
option to
be open directly in Subtitle Editor(SE)

SE -> SD cli , Subtitle Editor will have a menu like "Get subtitles from video" 
that
will call the Subdownloader command line version and it will show the subtitles 
found
for that video.

---------
Can we have  another menu item in SE to allow users to upload that subtitle with
Subdownloader?

Original comment by capiscuas@gmail.com on 31 May 2008 at 6:03

GoogleCodeExporter commented 9 years ago
"This is just a idea. In my last test subdownloader doesn't work really
with -cli."

kitone, could you elaborate?

Original comment by set...@gmail.com on 2 Jun 2008 at 11:15

GoogleCodeExporter commented 9 years ago
capiscuas: Yes of course. Upload and download will be supported by 
subtitleeditor.

sethts: When I used the gui, the subtitles are found. But not with the --cli 
mode.
The result :

$ ./run.py --cli --nerd --download --video=/home/kitone/test/My\ Sassy\ 
Girl.avi 
Failed to import mmpython module. This means you will be unable to upload your 
videos
with all details.
INFO::subdownloader.run # Subdownloader started
INFO::subdownloader.cli.main # Scanning /home/kitone/test/My Sassy Girl.avi ...
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>]100%
Time: 00:00:00
INFO::subdownloader.cli.main # Videos found: 1 Subtitles found: 0
INFO::subdownloader.cli.main # Looks like some of your videos might need 
subtitles :)
INFO::subdownloader.cli.main # Starting subtitle search, please wait...
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>]100%
Time: 00:00:00
INFO::subdownloader.run # Subdownloader closed for mantainance.

Original comment by kit...@gna.org on 2 Jun 2008 at 4:15

GoogleCodeExporter commented 9 years ago
:o that's really odd.

Could you run it with -d (debug) flag, and post the output?
Cheers

Original comment by set...@gmail.com on 2 Jun 2008 at 4:21

GoogleCodeExporter commented 9 years ago
$ ./run.py --cli --nerd --download --video=/home/kitone/test/My\ Sassy\ 
Girl.avi -d
Failed to import mmpython module. This means you will be unable to upload your 
videos
with all details.
INFO::subdownloader.run # Subdownloader started
DEBUG::subdownloader.cli.main # Checking video file parameter...
DEBUG::subdownloader.cli.main # ...passed
DEBUG::subdownloader.cli.main # Checking language parameter...
DEBUG::subdownloader.cli.main # ...passed
INFO::subdownloader.cli.main # Scanning /home/kitone/test/My Sassy Girl.avi ...
DEBUG::subdownloader.FileManagement.FileScan # Scanning Folder 
/home/kitone/test/My
Sassy Girl.avi                                                                  

                                                                          ]  0% ETA:
 --:--:--
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>]100% Time: 00:00:00
INFO::subdownloader.cli.main # Videos found: 1 Subtitles found: 0
INFO::subdownloader.cli.main # Looks like some of your videos might need 
subtitles :)
INFO::subdownloader.cli.main # Starting subtitle search, please wait...
DEBUG::subdownloader.cli.main # Processing My Sassy Girl.avi...
DEBUG::subdownloader.FileManagement.Subtitle # ----------------
DEBUG::subdownloader.FileManagement.Subtitle # AutoDetectSubtitle started with:
'/home/kitone/test/My Sassy Girl.avi', None
DEBUG::subdownloader.FileManagement.Subtitle # 1st method starting...
DEBUG::subdownloader.FileManagement.Subtitle # 2nd method starting...
DEBUG::subdownloader.FileManagement.Subtitle # 3rd was skipped
DEBUG::subdownloader.FileManagement.Subtitle # 4th method starting...
DEBUG::subdownloader.cli.main # 
My Sassy Girl.avi -> NO MATCH

DEBUG::subdownloader.cli.main # Starting XMLRPC session...
DEBUG::subdownloader.OSDBServer.OSDBServer # Creating OSDBServer with options=
{'username': '', 'logging': 10, 'verbose': True, 'videofile': 
'/home/kitone/test/My
Sassy Girl.avi', 'mode': 'cli', 'server': None, 'language': 'all', 'test': 
False,
'proxy': None, 'overwrite_local': False, 'output': 'nerd', 'operation': 
'download',
'password': '', 'interactive': False}
DEBUG::subdownloader.OSDBServer.OSDBServer # Creating XMLRPC server 
connection...
DEBUG::subdownloader.OSDBServer.OSDBServer # Trying direct connection...
DEBUG::subdownloader.OSDBServer.OSDBServer # ...connected
INFO::subdownloader.run # Subdownloader closed for mantainance.

Original comment by kit...@gna.org on 2 Jun 2008 at 7:47

GoogleCodeExporter commented 9 years ago
It seems that it doesn't even search for the subtitle, closing immediately after
trying to connect to the server.

Can you try with different videos if the behavior persists? 

Original comment by set...@gmail.com on 3 Jun 2008 at 11:18

GoogleCodeExporter commented 9 years ago
Of course, all files failed with the cli. 
But all files are good with the gui.

Original comment by kit...@gna.org on 3 Jun 2008 at 12:28

GoogleCodeExporter commented 9 years ago
One last thing, so I can investigate:

Run the gui like this: python run.py -d

Original comment by set...@gmail.com on 3 Jun 2008 at 12:44

GoogleCodeExporter commented 9 years ago
Failed to import mmpython module. This means you will be unable to upload your 
videos
with all details.
Subdownloader started
Building main dialog
Showing main dialog
Reading Options Settings
Current directory: /home/kitone/test
Creating OSDBServer with options= {'username': '', 'logging': 10, 'verbose': 
True,
'videofile': '/home/kitone/download/subdownloader', 'mode': 'gui', 'server': 
None,
'language': 'all', 'test': False, 'proxy': None, 'overwrite_local': False, 
'output':
'human', 'operation': 'download', 'password': '', 'interactive': False}
Creating XMLRPC server connection...
Trying direct connection...
...connected
----------------
Logging in (username:'', password:'')...
Login ended in 0.004 with status: 200 OK
Session ID: ogj4dtu46h6qgcl4rmc8p8b7i1
----------------
Scanning Folder /home/kitone/test
Clearing VideoTree
----------------
SearchSubtitles RPC method starting...
Building search array with video objects info
 - adding: {'moviebytesize': '733302784', 'sublanguageid': '', 'moviehash':
'e23d29b59899b90c'}
Communicating with server...
Collecting downloaded data
Movie hashes: 1
- e23d29b59899b90c
  [eng] - My Sassy Girl [JudaZ]-Fixed.srt
  [spa] - My Sassy Girl - 1CD.srt
  [eng] - My Sassy Girl.srt
  [eng] - My Sassy Girl [ECHiZEN].en.srt
  [chi] - My Sassy Girl.CHS.srt
  [eng] - My Sassy Girl [ECHiZEN].srt
  [eng] - My Sassy Girl [ECHiZEN].chs.srt
  [eng] - My Sassy Girl.srt
  [eng] - My Sassy Girl [ECHiZEN].idx
  [eng] - My Sassy Girl [ECHiZEN].idx
  [pob] - My Sassy Girl 2001-BR.srt
  [cze] - My Sassy Girl.srt
getBestImdbInfo = 293715
Clearing VideoTree
Subdownloader closed for mantainance.

Original comment by kit...@gna.org on 3 Jun 2008 at 6:52

GoogleCodeExporter commented 9 years ago
Ok, it's fixed.
The OSDB module was changed and cli code wasn't updated.

Thanks!

Original comment by set...@gmail.com on 4 Jun 2008 at 11:59