Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update for release

Add Dir.pwd if no directories specifed.

[git-p4: depot-paths = "//src/UPnP-MediaServer/dev/": change = 4073]
  • Loading branch information...
commit 80814588830e7155c0d631f66f891e6c70c8a054 1 parent 8bbdd21
@drbrain drbrain authored
Showing with 49 additions and 31 deletions.
  1. +1 −2  History.txt
  2. +40 −27 README.txt
  3. +8 −2 lib/UPnP/device/media_server.rb
View
3  History.txt
@@ -1,6 +1,5 @@
-=== 1.0.0 / 2008-07-13
+=== 1.0.0 / 2008-07-23
* 1 major enhancement
-
* Birthday!
View
67 README.txt
@@ -1,48 +1,61 @@
= UPnP-MediaServer
-* FIX (url)
+* http://seattlerb.org/UPnP-MediaServer
+* http://upnp.org
+* Bugs: http://rubyforge.org/tracker/?func=add&group_id=1513&atid=5921
== DESCRIPTION:
-FIX (describe your package)
+A UPnP MediaServer. Currently a work in progress. Only tested on a
+PlayStation 3.
== FEATURES/PROBLEMS:
-* FIX (list of features or problems)
+* Uses incomplete UPnP::Service::ContentDirectory
+* Uses stub UPnP::Service::ConnectionManager
+* Only tested on PlayStation 3
== SYNOPSIS:
- FIX (code sample of usage)
+ upnp_media_server --help
+
+ upnp_media_server --name="My Awesome Media" --directory=/my/awesome/media
== REQUIREMENTS:
-* FIX (list of requirements)
+* A UPnP MediaServer control point
+* Media to serve
== INSTALL:
-* FIX (sudo gem install, anything else)
+ sudo gem install UPnP-MediaServer
== LICENSE:
-(The MIT License)
-
-Copyright (c) 2008 FIX
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-'Software'), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
+Copyright 2008 Eric Hodel. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the names of the authors nor the names of their contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS
+OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
10 lib/UPnP/device/media_server.rb
@@ -3,9 +3,12 @@
require 'UPnP/service/content_directory'
require 'UPnP/service/connection_manager'
+##
+# A UPnP MediaServer. See upnp.org for specifications.
+
class UPnP::Device::MediaServer < UPnP::Device
- VERSION = '1.0'
+ VERSION = '1.0.0'
add_service_id UPnP::Service::ContentDirectory, 'ContentDirectory'
add_service_id UPnP::Service::ConnectionManager, 'ConnectorManager'
@@ -40,11 +43,14 @@ def self.option_parser
end
##
- # Runs a MediaServer.
+ # Runs a MediaServer. Automatically adds the current directory if no
+ # directories were specified.
def self.run(argv = ARGV)
super
+ @options[:directories] << Dir.pwd if @options[:directories].empty?
+
device = create 'MediaServer', @options[:name] do |ms|
ms.manufacturer = 'Seattle Ruby Brigade'
ms.manufacturer_url = 'http://seattlerb.org'
Please sign in to comment.
Something went wrong with that request. Please try again.