Sha256: 52031bae131647a861da77b4c1a65670a4eabdcd41c7ad547e62b7e739a93084

Contents?: true

Size: 609 Bytes

Versions: 3

Compression:

Stored size: 609 Bytes

Contents

module SimplePvr
  module Server
    class UpcomingRecordingsController < BaseController
      get '/' do
        PvrInitializer.scheduler.upcoming_recordings.map do |recording|
          {
            programme_id: recording.programme.id,
            show_name: recording.show_name,
            start_time: recording.start_time,
            channel: { id: recording.channel.id, name: recording.channel.name },
            subtitle: recording.programme.subtitle,
            is_conflicting: PvrInitializer.scheduler.conflicting?(recording.programme)
          }
        end.to_json
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
simple_pvr-1.0.0 lib/simple_pvr/server/upcoming_recordings_controller.rb
simple_pvr-0.0.4 lib/simple_pvr/server/upcoming_recordings_controller.rb
simple_pvr-0.0.3 lib/simple_pvr/server/upcoming_recordings_controller.rb