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

-skip-mime for pull #563

Open
pdneumann opened this issue Jan 20, 2016 · 5 comments
Open

-skip-mime for pull #563

pdneumann opened this issue Jan 20, 2016 · 5 comments
Labels

Comments

@pdneumann
Copy link

First, let me thank you for this program. It does a very nice job and is the only reason I am able to do the current project I'm working on. Thank you for all of your hard work.

I am working on a digital picture frame. I would like to pull jpeg's from my google drive but skip the mp4 movie files. The documentation states that pulling by matches is supported. The program itself states that the -skip-mime="" flag is supported. I can't seem to get either to work. I know that in issue #498, a user asked for -match-mime support in list. I am able to make that work, sort of (it lists the directories instead of the files). You suggested a PR for the -match-mime for pull command. If i had the knowledge to do it myself, I would. Things I have tried:

-skip-mime="mp4" #mp4 files are still listed for pull
--match jpg #mp4 files are still listed for pull
-match-mime jpg #flag not recognized
I tried to pipe drive list -skip-mime into drive pull. This froze the console.

This may just be error on my part. I tried everything I could and read the wiki multiple times before asking. I am using drive version 0.3.4 with Raspbian 8.0 on the console.

Thanks in advance,
Pat

@canpolat
Copy link

@pdneumann, the mime-type for mp4 is video/mp4, not mp4. I don't have a folder with mp4 files, so I couldn't test that mime-type, but I could successfully use it with: drive list -skip-mime="application/pdf". It skipped all the PDF files in the directory.

Edit: I see that the help message is misleading the user to use extensions for the -skip-mime flag. I suppose that can be fixed.

@pdneumann
Copy link
Author

Thank you for your response. I tried so many different forms of syntax with the commands I listed that I couldn't remember them all. So in a directory with mp4 files, drive list -skip-mime="video/mp4" DIRECTORY works as expected, listing all but the mp4 files. However, if I use drive pull -skip-mime="video/mp4" DIRECTORY the mp4 files are listed to be pulled. It does work as if -skip-mime is implemented for the pull command though.

@odeke-em
Copy link
Owner

Hey there @pdneumann thanks for reporting this issue and welcome to drive.

My apologies for the late response, I am totally swamped with work and school.
This is an actual bug in pull because a plain pull doesn't have skip-mime but pull matches might.

@odeke-em odeke-em added the bug label Jan 21, 2016
@pdneumann
Copy link
Author

@odeke-em please don't apologize. This app is great, I was asking a question because I thought I was doing this incorrectly. If my syntax is correct:

drive pull --matches -skip-mime="video/mp4" DIRECTORY

Results in response "Everything is up-to-date." even if I know that it is not.

drive list --matches -skip-mime="video/mp4" DIRECTORY

Results in "no matches found!"

I wasn't originally using --matches because I wasn't confident about how to use that flag even though I did see it in the wiki and did briefly try to figure it out. The above may be in the wrong syntax and if so I apologize. Thanks again for all the hard work!

@odeke-em
Copy link
Owner

@pdneumann thank you for the kind words. In deed as you have further noticed this bug is present for pull, I probably might have accidentally ripped it out or hadn't fully implemented it in pull. However, it works alright for list of which it is listed for list in the README. This definitely needs some fixing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants