Commit Graph

72 Commits

Author SHA1 Message Date
Zachary Jones
47dfdee1af Add time to Add Asset form.
The start and end date/time of the Asset is now saved to the database.
2013-01-29 16:03:23 -06:00
Zachary Jones
a72a6d72f1 Realized the URI was not being saved to the database. 2013-01-28 18:56:24 -06:00
Zachary Jones
9e9d4a583f Preliminary Add Asset functionality.
Actually adds to the database now. However, we're using a regular POST form to create the new asset and return a redirect back to the index page. Uploading files with Backbone to an API is apparently tricky and there are complicated best practices I don't fully understand yet.
2013-01-26 19:29:17 -06:00
Zachary Jones
74727d5506 Remove 'resolution' key from Asset object.
Since we're not actually using resolution for anything at this point (it's not saved to the database), it's wasted. Awaiting further clarification.
2013-01-26 19:05:59 -06:00
Zachary Jones
aebddd0dad Start work on creating an API that can be used to create new Assets via Backbone models. 2013-01-25 14:33:57 -06:00
Zachary Jones
81768050ac Merge branch 'master' into screenly-ui
Conflicts:
	server.py
2013-01-24 14:59:17 -06:00
Zachary Jones
cc3a29de66 Updates for code readability and PEP 8. 2013-01-24 14:55:52 -06:00
Zachary Jones
176b984443 Merge branch 'master' into screenly-ui
Conflicts:
	requirements.txt
	server.py
2013-01-23 17:16:46 -06:00
Zachary Jones
e913e2f0f5 get_assets() is deprecated and no longer needed.
fetch_assets() performs the same function with more flexibility and should be used instead.
2013-01-23 16:37:22 -06:00
Alexander Ljungberg
282376a465 More tests. Simplify code. 2013-01-23 16:37:36 +00:00
Alexander Ljungberg
cf64aa32b2 Fix unit test for get_playlist. 2013-01-23 16:21:56 +00:00
Alexander Ljungberg
4bf6267781 Unused imports. 2013-01-23 16:16:47 +00:00
Alexander Ljungberg
06eef90343 Only create asset folder when running as main script.
This commit makes it so that merely importing server.py doesn't cause the assets folder to be created, something which might be undesired in for example unit tests.
2013-01-23 10:27:07 +00:00
Zachary Jones
bbaaeee55b Use the new json_dump method with support for datetime 2013-01-22 22:51:15 -06:00
Zachary Jones
4181c88732 Merge branch 'master' into screenly-ui 2013-01-22 20:46:41 -06:00
Zachary Jones
24222006d0 Make get_playlist() use our fetch_assets() method.
Increasing dogfooding and first steps towards a more DRY, extensible way of handling database models.
2013-01-22 20:32:17 -06:00
Viktor Petersson
02d325c546 Closes #41. Removes file from disk if it was an uploaded asset. 2013-01-22 19:38:14 +01:00
Viktor Petersson
dcdedd67e0 Closes #25. Adds support for configuring the listening address in screenly.conf. Default address is 0.0.0.0:8080. 2013-01-22 19:25:05 +01:00
Zachary Jones
aedd5e9bbe Remove unneeded variable. 2013-01-21 15:23:44 -06:00
Zachary Jones
d0ab9451be Add simple API for obtaining a list of Assets. 2013-01-21 15:10:52 -06:00
Zachary Jones
ab36c74558 Use the new get_assets_grouped() method to get a list of the active and inactive assets for use in rendering the index template. 2013-01-21 12:23:39 -06:00
Zachary Jones
1d0c753204 Improve documentation and code style 2013-01-21 12:22:48 -06:00
Zachary Jones
90da2524ec Merge branch 'master' into screenly-ui 2013-01-21 12:03:16 -06:00
Zachary Jones
2775322502 Start restructuring the methods which communicate with the database to be a little more flexible and DRY. 2013-01-20 16:46:00 -06:00
Zachary Jones
6babf84d9e Merge branch 'master' into screenly-ui 2013-01-19 21:16:02 -06:00
Zachary Jones
6a1683a63c Save a little memory allocation and time by only constructing playlistitem if it is actually needed. 2013-01-19 15:28:57 -06:00
Zachary Jones
e974e6ab5f Render the Active Assets table.
MVP at this point, but it does populate from the database.
2013-01-19 15:22:45 -06:00
Zachary Jones
3cd5013c34 Initial checkpoint on new design. 2013-01-19 14:06:36 -06:00
Viktor Petersson
38dcea1d34 Bugfix. Resolves issue with invalid syntax for mkdir. 2013-01-19 18:15:08 +01:00
Viktor Petersson
a32aba4d64 Adds support for local assets. Enables upload on the 'add asset'-page.
The page looks like craps atm, but a UI overhaul is coming shortly.
2013-01-18 22:56:23 +01:00
Viktor Petersson
cfb6e291be Added exception handling for the status page to allow it to be displayed on OS X (while developing). 2013-01-17 22:21:00 +01:00
Viktor Petersson
a4af94cd76 Added improved URI verification. 2013-01-17 15:02:25 +01:00
Alexander Ljungberg
12cdd90611 Reuse database connection code.
This will also make it easier to add unit tests as a dummy Connection object can be inserted.
2013-01-17 13:23:38 +00:00
Alexander Ljungberg
4cf207a086 Modify 362769d slightly to still expose core methods.
Having these methods visible even when server.py is not the main script will make it possible to unit test them.
2013-01-17 12:07:46 +00:00
Viktor Petersson
4dd2f3e455 Manually merged in pull request #37. Credits to NiKiZe for the fix. 2013-01-17 12:06:07 +01:00
Viktor Petersson
362769d5ee Improved importability of server module. 2013-01-17 11:50:38 +01:00
Viktor Petersson
194110f3ff Use the final URL in case the URL redirected. 2013-01-17 00:21:47 +01:00
Viktor Petersson
7b8fcae293 Added support for redirections. 2013-01-17 00:11:36 +01:00
Alexander Ljungberg
befab3da44 Eliminate redundant time_lookup. 2013-01-16 22:19:27 +00:00
Alexander Ljungberg
f084dfc0c0 Reuse settings loading code. 2013-01-16 22:04:44 +00:00
Alexander Ljungberg
619b40aace PEP8. 2013-01-16 22:02:20 +00:00
Alexander Ljungberg
411cc58f06 Organise imports. 2013-01-16 22:00:11 +00:00
Christian Nilsson
18200f84d3 Fix missing indentation in get_assets from 2e307810 2012-11-15 22:22:47 +01:00
Viktor Petersson
4edb04c58c Fixed broken indentation as a result of the tab-removal. 2012-11-08 19:58:33 -08:00
Viktor Petersson
2e30781018 Expanded tabs. 2012-11-08 19:54:54 -08:00
Viktor Petersson
c0457275e1 Forgot to split lines. 2012-11-08 18:28:19 -08:00
Viktor Petersson
6fcfd208fe Modified resolution the way we retrieve tvservice output and limited the output in the log to the last 20 lines. 2012-11-08 18:26:11 -08:00
Viktor Petersson
acef9059d8 Added (untested) support for displaying the resolution on the system_info page. 2012-11-08 17:17:34 -08:00
Viktor Petersson
5a932c7bb8 Merge pull request #27 from axel-b/master
removed dead code (dbisnewer check via server)
2012-11-08 16:29:21 -08:00
Axel Belinfante
c1d8e93624 removed dead code (dbisnewer check via server) 2012-11-06 23:24:07 +01:00