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

Pull plz #4

Merged
merged 4 commits into from Jan 15, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -2,3 +2,4 @@
*.sqlite
music_server/local_settings.py
music_server/media/*
!music_server/media/.gitignore
5 changes: 5 additions & 0 deletions music_server/local_settings.py.tmpl
Expand Up @@ -40,3 +40,8 @@ SECRET_KEY = '-chk7s=vwhvnwx-fq39j!v6ed6qs)&%z+iz0m-i3n9-75nxyin'
# Absolute path to the directory that holds media.
# Example: "/home/media/media.lawrence.com/"
MEDIA_ROOT = 'media'

# Path to youtube-dl's location. By default, this assumes that it is accessible
# via the user's PATH.
# Example: "/usr/bin/youtube-dl"
YOUTUBE_DL = 'youtube-dl'
8 changes: 4 additions & 4 deletions music_server/management/commands/youtube.py
Expand Up @@ -21,9 +21,9 @@

class Command(BaseCommand):
option_list = BaseCommand.option_list + (
make_option('--verbosity', action='store', dest='verbosity', default='1',
type='choice', choices=['0', '1', '2'],
help='Verbosity level; 0=minimal output, 1=normal output, 2=all output'),
#make_option('--verbosity', action='store', dest='verbosity', default='1',
# type='choice', choices=['0', '1', '2'],
# help='Verbosity level; 0=minimal output, 1=normal output, 2=all output'),
#make_option('--daemonise', action='store_true', dest='daemonise', default=False,
# help='Daemonise'),
)
Expand Down Expand Up @@ -56,7 +56,7 @@ def handle(self, *app_labels, **options):

tempdir = tempfile.mkdtemp('music-server-youtube')
try:
cmd = ['/home/music-server/youtube-dl','--max-quality=22']
cmd = [settings.YOUTUBE_DL,'--max-quality=22']
if verbosity < 2:
cmd.append('--quiet')
cmd.extend(['--title', item.uri])
Expand Down
Empty file added music_server/media/.gitignore
Empty file.
Empty file modified music_server/scrobble.php 100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions music_server/urls.py
Expand Up @@ -28,6 +28,7 @@
{'template': 'registration/password_changed.html'}, name='password_change_success'),

url(r'^a/admin/(.*)', admin.site.root),
url(r'^uploaded/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
)

if settings.DEBUG:
Expand Down