Git Product home page Git Product logo

g2's People

Contributors

brownan avatar jonnty avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

g2's Issues

"Hard" and "soft" time limits

In addition to the current limit on the number of songs on the playlist, I want to define time limits as well:

Hard limit: A user can never occupy more than this many minutes of song time on the playlist

Soft limit: A user may add a song that causes their total time to exceed this limit, but they cannot add any more songs after that.

The reasoning is, if a user adds a 2 hour mix, they shouldn't be able to add any more songs. However, a user should still be able to add several shorter songs (up to a limit). The hard limit could be something like 2 hours, and the soft limit could be more like 30 or 45 minutes.

Ajax "Add" buttons.

So they don't reload the page, making it easier to add more than one song at a time

syncdb error

python manage syncdb fails,

E.g. with sqlite3:

~/radio_www/pydj$ python manage.py syncdb
Creating tables ...
Creating table auth_permission
Creating table auth_group_permissions
Creating table auth_group
Creating table auth_user_user_permissions
Creating table auth_user_groups
Creating table auth_user
Creating table auth_message
Creating table django_content_type
Creating table django_session
Creating table django_site
Creating table django_admin_log
Creating table playlist_artist
Creating table playlist_album
Creating table playlist_rating
Creating table playlist_userprofile_favourites
Creating table playlist_userprofile
Creating table playlist_editnote
Creating table playlist_fieldedit
Creating table playlist_songedit
Creating table playlist_songreport
Creating table playlist_song
Creating table playlist_songdir
Creating table playlist_emoticon
Creating table playlist_comment
Creating table playlist_playlistentry
Creating table playlist_removedentry
Creating table playlist_oldplaylistentry
Creating table playlist_settings
Creating table playlist_series
Creating table playlist_show
Creating table playlist_oldshow
Creating table playlist_showrating
Creating table playlist_showcomment
Creating table playlist_showminute
Creating table forum_category
Creating table forum_forum_groups
Creating table forum_forum
Creating table forum_thread
Creating table forum_post
Creating table forum_subscription
Creating table forum_lastread

You just installed Django's auth system, which means you don't have any superusers defined.
Would you like to create one now? (yes/no): yes
Username (Leave blank to use 'andi'): test
E-mail address: [email protected]
Password:
Password (again):
Superuser created successfully.
Traceback (most recent call last):
File "manage.py", line 11, in
execute_manager(settings)
File "/home/andi/radio_www/lib/python2.7/site-packages/django/core/management/init.py", line 438, in execute_manager
utility.execute()
File "/home/andi/radio_www/lib/python2.7/site-packages/django/core/management/init.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/andi/radio_www/lib/python2.7/site-packages/django/core/management/base.py", line 191, in run_from_argv
self.execute(_args, *_options.dict)
File "/home/andi/radio_www/lib/python2.7/site-packages/django/core/management/base.py", line 220, in execute
output = self.handle(_args, *_options)
File "/home/andi/radio_www/lib/python2.7/site-packages/django/core/management/base.py", line 351, in handle
return self.handle_noargs(**options)
File "/home/andi/radio_www/lib/python2.7/site-packages/django/core/management/commands/syncdb.py", line 109, in handle_noargs
emit_post_sync_signal(created_models, verbosity, interactive, db)
File "/home/andi/radio_www/lib/python2.7/site-packages/django/core/management/sql.py", line 190, in emit_post_sync_signal
interactive=interactive, db=db)
File "/home/andi/radio_www/lib/python2.7/site-packages/django/dispatch/dispatcher.py", line 172, in send
response = receiver(signal=self, sender=sender, **named)
File "/home/andi/radio_www/lib/python2.7/site-packages/django/contrib/auth/management/init.py", line 51, in create_permissions
content_type=ctype
File "/home/andi/radio_www/lib/python2.7/site-packages/django/db/models/manager.py", line 138, in create
return self.get_query_set().create(**kwargs)
File "/home/andi/radio_www/lib/python2.7/site-packages/django/db/models/query.py", line 360, in create
obj.save(force_insert=True, using=self.db)
File "/home/andi/radio_www/lib/python2.7/site-packages/django/db/models/base.py", line 460, in save
self.save_base(using=using, force_insert=force_insert, force_update=force_update)
File "/home/andi/radio_www/lib/python2.7/site-packages/django/db/models/base.py", line 553, in save_base
result = manager._insert(values, return_id=update_pk, using=using)
File "/home/andi/radio_www/lib/python2.7/site-packages/django/db/models/manager.py", line 195, in _insert
return insert_query(self.model, values, **kwargs)
File "/home/andi/radio_www/lib/python2.7/site-packages/django/db/models/query.py", line 1436, in insert_query
return query.get_compiler(using=using).execute_sql(return_id)
File "/home/andi/radio_www/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 791, in execute_sql
cursor = super(SQLInsertCompiler, self).execute_sql(None)
File "/home/andi/radio_www/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 735, in execute_sql
cursor.execute(sql, params)
File "/home/andi/radio_www/lib/python2.7/site-packages/django/db/backends/util.py", line 34, in execute
return self.cursor.execute(sql, params)
File "/home/andi/radio_www/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py", line 234, in execute
return Database.Cursor.execute(self, query, params)
django.db.utils.IntegrityError: columns content_type_id, codename are not unique

Crash when accessing artist with sqlite3

Hi,

Crash is only with sqlite3, mysql is ok.
Select 'Artists' from menu then a specific artist - it crashes with:

params (2,) self e OperationalError('near "1": syntax error',) query u'SELECT ((SELECT count(_) FROM playlist_oldplaylistentry WHERE (playlist_oldplaylistentry.song_id = playlist_song.id) AND (playlist_oldplaylistentry.playtime-0 > NOW()-INTERVAL 1 HOUR))) AS "recently_played", "playlist_song"."id", "playlist_song"."title", "playlist_song"."artist_id", "playlist_song"."album_id", "playlist_song"."composer", "playlist_song"."lyricist", "playlist_song"."remixer", "playlist_song"."genre", "playlist_song"."track", "playlist_song"."length", "playlist_song"."bitrate", "playlist_song"."sha_hash", "playlist_song"."add_date", "playlist_song"."format", "playlist_song"."uploader_id", "playlist_song"."category", "playlist_song"."banned", "playlist_song"."banreason", "playlist_song"."unban_adds", "playlist_song"."location_id", "playlist_song"."avgscore", "playlist_song"."voteno", COUNT("playlist_playlistentry"."id") AS "on_playlist", "playlist_artist"."id", "playlist_artist"."name", "playlist_artist"."sort_name", "playlist_album"."id", "playlist_album"."name" FROM "playlist_song" INNER JOIN "playlist_artist" ON ("playlist_song"."artist_id" = "playlist_artist"."id") LEFT OUTER JOIN "playlist_album" ON ("playlist_song"."album_id" = "playlist_album"."id") LEFT OUTER JOIN "playlist_playlistentry" ON ("playlist_song"."id" = "playlist_playlistentry"."song_id") WHERE "playlist_song"."artist_id" = ? GROUP BY "playlist_song"."id", "playlist_song"."title", "playlist_song"."artist_id", "playlist_song"."album_id", "playlist_song"."composer", "playlist_song"."lyricist", "playlist_song"."remixer", "playlist_song"."genre", "playlist_song"."track", "playlist_song"."length", "playlist_song"."bitrate", "playlist_song"."sha_hash", "playlist_song"."add_date", "playlist_song"."format", "playlist_song"."uploader_id", "playlist_song"."category", "playlist_song"."banned", "playlist_song"."banreason", "playlist_song"."unban_adds", "playlist_song"."location_id", "playlist_song"."avgscore", "playlist_song"."voteno", "playlist_song"."id", "playlist_song"."title", "playlist_song"."artist_id", "playlist_song"."album_id", "playlist_song"."composer", "playlist_song"."lyricist", "playlist_song"."remixer", "playlist_song"."genre", "playlist_song"."track", "playlist_song"."length", "playlist_song"."bitrate", "playlist_song"."sha_hash", "playlist_song"."add_date", "playlist_song"."format", "playlist_song"."uploader_id", "playlist_song"."category", "playlist_song"."banned", "playlist_song"."banreason", "playlist_song"."unban_adds", "playlist_song"."location_id", "playlist_song"."avgscore", "playlist_song"."voteno", "playlist_artist"."id", "playlist_artist"."name", "playlist_artist"."sort_name", "playlist_album"."id", "playlist_album"."name", ((SELECT count(_) FROM playlist_oldplaylistentry WHERE (playlist_oldplaylistentry.song_id = playlist_song.id) AND (playlist_oldplaylistentry.playtime-0 > NOW()-INTERVAL 1 HOUR))) ORDER BY "playlist_album"."name" ASC, "playlist_song"."track" ASC'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.