Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't download to a Samba share #4928

Closed
Mykro opened this issue Feb 11, 2015 · 1 comment
Closed

Can't download to a Samba share #4928

Mykro opened this issue Feb 11, 2015 · 1 comment

Comments

@Mykro
Copy link

@Mykro Mykro commented Feb 11, 2015

Relevant part of my bash script:

youtube-dl -q -v --all-subs -o "${DEST_DIR}/%(title)s_%(id)s_%(resolution)s.%(ext)s" ${FINDSTR} $*  2>&1 | tee -a "${LOG_FILE}"

Output:

Downloading https://www.youtube.com/watch?v=XXXXX to directory: smb://192.168.99.99/media/Music Videos/
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-q', '-v', '--all-subs', '-o', 'smb://192.168.99.99/media/Music Videos/%(title)s_%(id)s_%(resolution)s.%(ext)s', 'https://www.youtube.com/watch?v=XXXXX']
[debug] Encodings: locale UTF-8, fs UTF-8, out None, pref UTF-8
[debug] youtube-dl version 2014.12.06.1
[debug] Python version 2.7.6 - Linux-3.13.0-44-generic-x86_64-with-Ubuntu-14.04-trusty
[debug] exe versions: avconv 9.16-6, avprobe 9.16-6, rtmpdump 2.4
[debug] Proxy map: {}
WARNING: video doesn't have subtitles
ERROR: unable to create directory [Errno 22] Invalid argument: 'smb:'
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 965, in process_info
    os.makedirs(dn)
  File "/usr/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
  File "/usr/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
  File "/usr/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
  File "/usr/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
  File "/usr/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 22] Invalid argument: 'smb:'

Workaround: if I remove ${DEST_DIR} from the -o parameter and instead use pushd to change to that directory first (as pushd works with samba shares), the youtube-dl command then works fine. It looks like something inside the python code might be barfing on the samba syntax.

@phihag
Copy link
Contributor

@phihag phihag commented Feb 11, 2015

Like all command-line programs I am aware of, youtube-dl just supports the normal filesystem. File paths starting with smb:// will generally only be supported in KDE programs, which are a whole different beast together (imagine if every program had to implement or link to the kioslaves library! That would make even trivial programs like ls really really complicated).

The Linux (though not the KDE) way to use SMB shares is to mount the share into the local filesystem.

Therefore, I must sadly close this issue. While we would not actively reject a pull request that adds kioslaves support (although that might pose a problem, since it would be highly platform-specific), adding kioslaves is far outside the scope of youtube-dl. Sorry!

@phihag phihag closed this Feb 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.