Skip to content

Commit

Permalink
Merge pull request OpenShot#2355 from ferdnyc/cmdline-projects
Browse files Browse the repository at this point in the history
Pass remaining command line args to Qt
  • Loading branch information
DylanC authored Nov 16, 2018
2 parents 12ec5f0 + e095de9 commit f9cbde8
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"""

import sys
from argparse import ArgumentParser
from argparse import ArgumentParser, REMAINDER

try:
from classes import info
Expand All @@ -67,6 +67,7 @@ def main():
action='store_true', help='List all language '
'codes supported by OpenShot')
parser.add_argument('-V', '--version', action='store_true')
parser.add_argument('remain', nargs=REMAINDER)

args = parser.parse_args()

Expand Down Expand Up @@ -94,8 +95,11 @@ def main():
log.info(" OpenShot (version %s)" % info.SETUP['version'])
log.info("------------------------------------------------")

# Create Qt application
app = OpenShotApp(sys.argv)
# Create Qt application, pass any unprocessed arguments
argv = [sys.argv[0]]
for arg in args.remain:
argv.append(arg)
app = OpenShotApp(argv)

# Run and return result
sys.exit(app.run())
Expand Down

0 comments on commit f9cbde8

Please sign in to comment.