This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Dir.foreach(web_dir) do |f| | |
| pp f | |
| pp new_playlist["playlists"][0]["assets"].any? {|a| a[:title] == f } | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| new_playlist["playlists"][0]["assets"].each do |asset| | |
| url_path = url + asset['path'] + 'files/' + asset["title"] | |
| local_file = web_dir + asset["title"] | |
| File.open(web_dir + 'playlist.json', 'w') {|f| f.write(new_playlist_raw) } | |
| if FileTest.exists?(local_file) | |
| pp "#{local_file} ---File Exists Not Downloading---" | |
| else | |
| open( web_dir + asset["title"], 'wb') do |file| | |
| file << open(url_path).read | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if current_playlist_published < new_playlist_published | |
| new_playlist["playlists"][0]["assets"].each do |asset| | |
| url_path = url + asset['path'] + 'files/' + asset["title"] | |
| local_file = web_dir + asset["title"] | |
| file_list = [] | |
| file_list << asset["title"] | |
| File.open(web_dir + 'playlist.json', 'w') {|f| f.write(new_playlist_raw) } | |
| if FileTest.exists?(local_file) | |
| pp "#{local_file} ---File Exists Not Downloading---" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {"playlists"=> | |
| [{"id"=>"2011", | |
| "title"=>"test playlist", | |
| "client_id"=>"1403", | |
| "date_start"=>"0", | |
| "date_end"=>"0", | |
| "time_start"=>"0", | |
| "time_end"=>"0", | |
| "assets"=> | |
| [{"id"=>"2003", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [sudo] password for remote: | |
| [Wed, 19 Dec 2012 08:24:39 -0600] INFO: *** Chef 0.10.8 *** | |
| [Wed, 19 Dec 2012 08:24:40 -0600] INFO: Run List is [recipe[one_player], recipe[one_player::playlist], recipe[nginx::commons_dir], recipe[nginx], recipe[nginx::commons], recipe[nginx::commons_conf]] | |
| [Wed, 19 Dec 2012 08:24:40 -0600] INFO: Run List expands to [one_player, one_player::playlist, nginx::commons_dir, nginx, nginx::commons, nginx::commons_conf] | |
| stacktrace: | |
| Generated at Wed Dec 19 08:24:40 -0600 2012 | |
| Errno::ENOENT: No such file or directory - /var/www/playlist.json | |
| /var/cache/chef/cookbooks/one_player/recipes/playlist.rb:29:in `read' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {"id":"test-install","screen_id":[{"id":"1965"},{"id":"1964"},{"id":"1967"}],"player_path":[{"screen_1":"http://localhost/1965/index.html"},{"screen_2":"http://localhost/1964/index.html"}],"vertical":[{"output_one":"0"},{"output_two":"0"}],"parent_server_url":"http://192.168.5.16","two_player":"1","resolution":[{"output_one":"\"1920x1080\""},{"output_two":"\"1920x1080\""}]} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| node.set['multi_player'] = node_databag['multi_player'] | |
| template "/home/remote/.fluxbox/startup" do | |
| source "startup.erb" | |
| owner "remote" | |
| group "remote" | |
| mode 0755 | |
| variables({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [11825.262227] sd 18:0:0:0: [sdb] Asking for cache data failed | |
| [11825.262230] sd 18:0:0:0: [sdb] Assuming drive cache: write through | |
| [11825.262534] sd 18:0:0:0: [sdb] Attached SCSI removable disk | |
| [11844.632115] usb 4-1: USB disconnect, device number 3 | |
| [11850.584111] usb 4-2: USB disconnect, device number 11 | |
| [11852.064046] usb 4-2: new full-speed USB device number 12 using uhci_hcd | |
| [11852.244269] scsi19 : usb-storage 4-2:1.0 | |
| [11853.248145] scsi 19:0:0:0: Direct-Access Generic STORAGE DEVICE 9139 PQ: 0 ANSI: 0 | |
| [11874.000080] usb 4-2: reset full-speed USB device number 12 using uhci_hcd | |
| [11877.276042] usb 4-2: reset full-speed USB device number 12 using uhci_hcd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| node_databag['screens'].each_with_index do |screen, i| | |
| hash = Hash.new | |
| hash = {:id => screen['screen']['id'], :url => screen['screen']['url']} | |
| node.set['screens'][i] = hash | |
| end | |
| template "/home/remote/.fluxbox/startup" do | |
| source "startup.erb" | |
| owner "remote" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {"id":"test-two-install","multi_player":false,"video_card":"nvidia","chef_server":"http://chef-server.newground.com","outputs":{"output_two":{"orientation":"horizontal","resolution":"\"1920x1080\""},"output_one":{"orientation":"horizontal","resolution":"\"1920x1080\""}},"media_manager":"http://192.168.5.16","screens":[{"screen":{"id":2108,"url":"http://localhost/"}}]} |