Sha256: 8272fa2156030cb8475090710b28dbceaf03d527393fb6880218b4ed6174959b

Contents?: true

Size: 612 Bytes

Versions: 2

Compression:

Stored size: 612 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.is_conflicting?(recording.programme)
          }
        end.to_json
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
simple_pvr-0.0.2 lib/simple_pvr/server/upcoming_recordings_controller.rb
simple_pvr-0.0.1 lib/simple_pvr/server/upcoming_recordings_controller.rb