Skip to content

Adding support for single files (not only directories) #17

@Muffo

Description

@Muffo

However but I think the app should detect when a single file is passed as argument and change the behavior accordingly.

At the moment if I try to download the subtitles of a single file I get this error:

python lm.py MyFile.mkv --download eng
Traceback (most recent call last):
  File "../lm-master/lm.py", line 1514, in <module>
    LM.download_subtitle(files, options.download)
  File "../lm-master/lm.py", line 1073, in download_subtitle
    ref, query = self.download_subtitles_query( files, language )
  File "../lm-master/lm.py", line 1116, in download_subtitles_query
    old_subs = [ old for old in filelist(filedir,False) \
  File "../lm-master/lm.py", line 97, in filelist
    for f in os.listdir(dir):
OSError: [Errno 2] No such file or directory: ''

Having the support for a complete directory can be very convenient.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions