tivohmo 0.2.3 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -1
  3. data/CHANGELOG +30 -0
  4. data/Gemfile +2 -0
  5. data/README.md +4 -6
  6. data/TODO +1 -0
  7. data/contrib/tivohmo.conf +2 -2
  8. data/contrib/tivohmo.plist +1 -1
  9. data/contrib/tivohmo.yml +60 -0
  10. data/lib/tivohmo/adapters/filesystem/file_item.rb +2 -3
  11. data/lib/tivohmo/adapters/plex/category.rb +87 -6
  12. data/lib/tivohmo/adapters/plex/episode.rb +30 -11
  13. data/lib/tivohmo/adapters/plex/group.rb +20 -0
  14. data/lib/tivohmo/adapters/plex/movie.rb +15 -3
  15. data/lib/tivohmo/adapters/plex/qualified_category.rb +14 -3
  16. data/lib/tivohmo/adapters/plex/season.rb +2 -2
  17. data/lib/tivohmo/adapters/plex/section.rb +5 -5
  18. data/lib/tivohmo/adapters/plex/transcoder.rb +5 -1
  19. data/lib/tivohmo/adapters/plex.rb +1 -0
  20. data/lib/tivohmo/adapters/settings/application.rb +37 -0
  21. data/lib/tivohmo/adapters/settings/display_item.rb +35 -0
  22. data/lib/tivohmo/adapters/settings/key_container.rb +35 -0
  23. data/lib/tivohmo/adapters/settings/metadata.rb +26 -0
  24. data/lib/tivohmo/adapters/settings/reset_defaults_item.rb +39 -0
  25. data/lib/tivohmo/adapters/settings/set_value_item.rb +38 -0
  26. data/lib/tivohmo/adapters/settings/transcoder.rb +23 -0
  27. data/lib/tivohmo/adapters/settings.rb +7 -0
  28. data/lib/tivohmo/adapters/streamio/transcoder.rb +39 -1
  29. data/lib/tivohmo/api/container.rb +5 -1
  30. data/lib/tivohmo/api/item.rb +2 -0
  31. data/lib/tivohmo/api/subtitle.rb +13 -0
  32. data/lib/tivohmo/api/transcoder.rb +1 -3
  33. data/lib/tivohmo/api.rb +1 -0
  34. data/lib/tivohmo/beacon.rb +3 -3
  35. data/lib/tivohmo/cli.rb +175 -48
  36. data/lib/tivohmo/config.rb +157 -0
  37. data/lib/tivohmo/server/views/_container.builder +1 -1
  38. data/lib/tivohmo/server.rb +6 -3
  39. data/lib/tivohmo/version.rb +1 -1
  40. data/lib/tivohmo.rb +1 -0
  41. data/spec/adapters/filesystem/file_item_spec.rb +1 -1
  42. data/spec/adapters/plex/application_spec.rb +10 -1
  43. data/spec/adapters/plex/category_spec.rb +93 -20
  44. data/spec/adapters/plex/episode_spec.rb +34 -15
  45. data/spec/adapters/plex/metadata_spec.rb +5 -7
  46. data/spec/adapters/plex/movie_spec.rb +10 -7
  47. data/spec/adapters/plex/qualified_category_spec.rb +17 -17
  48. data/spec/adapters/plex/season_spec.rb +23 -4
  49. data/spec/adapters/plex/section_spec.rb +4 -4
  50. data/spec/adapters/plex/show_spec.rb +19 -4
  51. data/spec/adapters/plex/transcoder_spec.rb +2 -8
  52. data/spec/adapters/settings/application_spec.rb +25 -0
  53. data/spec/adapters/settings/display_item_spec.rb +29 -0
  54. data/spec/adapters/settings/key_container_spec.rb +33 -0
  55. data/spec/adapters/settings/metadata_spec.rb +33 -0
  56. data/spec/adapters/settings/reset_defaults_item_spec.rb +54 -0
  57. data/spec/adapters/settings/set_value_item_spec.rb +54 -0
  58. data/spec/api/container_spec.rb +12 -0
  59. data/spec/api/item_spec.rb +2 -0
  60. data/spec/api/transcoder_spec.rb +0 -1
  61. data/spec/beacon_spec.rb +3 -1
  62. data/spec/cli_spec.rb +57 -19
  63. data/spec/config_spec.rb +224 -0
  64. data/spec/fixtures/vcr/TivoHMO_Adapters_Plex_Application/_children/should_get_children.yml +61 -0
  65. data/spec/fixtures/vcr/TivoHMO_Adapters_Plex_Category/_children/should_allow_disabling_subtitles.yml +424 -0
  66. data/spec/fixtures/vcr/TivoHMO_Adapters_Plex_Category/_children/should_display_non-zero_child_count_once_children_fetched.yml +653 -0
  67. data/spec/fixtures/vcr/TivoHMO_Adapters_Plex_Category/_children/should_have_children.yml +599 -0
  68. data/spec/fixtures/vcr/TivoHMO_Adapters_Plex_Category/_children/should_have_children_with_embedded_subtitles.yml +595 -0
  69. data/spec/fixtures/vcr/TivoHMO_Adapters_Plex_Category/_children/should_have_children_with_subtitles.yml +482 -0
  70. data/spec/fixtures/vcr/TivoHMO_Adapters_Plex_Category/_children/should_memoize.yml +478 -0
  71. data/spec/fixtures/vcr/TivoHMO_Adapters_Plex_Category/_children/should_refresh_children_when_config_changes.yml +1245 -0
  72. data/spec/fixtures/vcr/TivoHMO_Adapters_Plex_Category/_children/should_use_category_value_for_children.yml +395 -0
  73. data/spec/fixtures/vcr/TivoHMO_Adapters_Plex_Category/_initialize/should_instantiate.yml +61 -0
  74. data/spec/fixtures/vcr/TivoHMO_Adapters_Plex_Category/_initialize/should_set_presorted_if_present.yml +61 -0
  75. data/spec/fixtures/vcr/TivoHMO_Adapters_Plex_Category/_initialize/should_use_category_value_for_title_if_present.yml +61 -0
  76. data/spec/fixtures/vcr/TivoHMO_Adapters_Plex_Episode/_initialize/should_instantiate.yml +444 -0
  77. data/spec/fixtures/vcr/TivoHMO_Adapters_Plex_Episode/_metadata/should_allow_disabling_series_id_in_metadata.yml +444 -0
  78. data/spec/fixtures/vcr/TivoHMO_Adapters_Plex_Episode/_metadata/should_populate_metadata.yml +579 -0
  79. data/spec/fixtures/vcr/TivoHMO_Adapters_Plex_Metadata/_initialize/should_instantiate.yml +296 -0
  80. data/spec/fixtures/vcr/TivoHMO_Adapters_Plex_Movie/_initialize/should_instantiate.yml +296 -0
  81. data/spec/fixtures/vcr/TivoHMO_Adapters_Plex_Movie/_metadata/should_populate_metadata.yml +296 -0
  82. data/spec/fixtures/vcr/TivoHMO_Adapters_Plex_QualifiedCategory/_children/should_display_non-zero_child_count_once_children_fetched.yml +220 -0
  83. data/spec/fixtures/vcr/TivoHMO_Adapters_Plex_QualifiedCategory/_children/should_have_children.yml +393 -0
  84. data/spec/fixtures/vcr/TivoHMO_Adapters_Plex_QualifiedCategory/_children/should_memoize.yml +219 -0
  85. data/spec/fixtures/vcr/TivoHMO_Adapters_Plex_QualifiedCategory/_initialize/should_instantiate.yml +61 -0
  86. data/spec/fixtures/vcr/TivoHMO_Adapters_Plex_Season/_children/should_have_children.yml +444 -0
  87. data/spec/fixtures/vcr/TivoHMO_Adapters_Plex_Season/_children/should_memoize.yml +444 -0
  88. data/spec/fixtures/vcr/TivoHMO_Adapters_Plex_Season/_initialize/should_instantiate.yml +250 -0
  89. data/spec/fixtures/vcr/TivoHMO_Adapters_Plex_Section/_children/should_have_category_children.yml +61 -0
  90. data/spec/fixtures/vcr/TivoHMO_Adapters_Plex_Section/_children/should_memoize.yml +61 -0
  91. data/spec/fixtures/vcr/TivoHMO_Adapters_Plex_Section/_initialize/should_instantiate.yml +61 -0
  92. data/spec/fixtures/vcr/TivoHMO_Adapters_Plex_Show/_children/should_have_children.yml +250 -0
  93. data/spec/fixtures/vcr/TivoHMO_Adapters_Plex_Show/_children/should_memoize.yml +250 -0
  94. data/spec/fixtures/vcr/TivoHMO_Adapters_Plex_Show/_initialize/should_instantiate.yml +166 -0
  95. data/spec/fixtures/vcr/TivoHMO_Adapters_Plex_Transcoder/_initialize/should_instantiate.yml +296 -0
  96. data/spec/server_spec.rb +31 -2
  97. data/spec/spec_helper.rb +24 -36
  98. data/tivohmo.gemspec +2 -2
  99. metadata +109 -3
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tivohmo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Conway
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-29 00:00:00.000000000 Z
11
+ date: 2015-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -137,7 +137,7 @@ dependencies:
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
139
  - !ruby/object:Gem::Dependency
140
- name: webmock
140
+ name: vcr
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - ">="
@@ -164,6 +164,20 @@ dependencies:
164
164
  - - ">="
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0'
167
+ - !ruby/object:Gem::Dependency
168
+ name: hashie
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ type: :runtime
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - ">="
179
+ - !ruby/object:Gem::Version
180
+ version: '0'
167
181
  - !ruby/object:Gem::Dependency
168
182
  name: unidecoder
169
183
  requirement: !ruby/object:Gem::Requirement
@@ -348,9 +362,11 @@ files:
348
362
  - LICENSE.txt
349
363
  - README.md
350
364
  - Rakefile
365
+ - TODO
351
366
  - bin/tivohmo
352
367
  - contrib/tivohmo.conf
353
368
  - contrib/tivohmo.plist
369
+ - contrib/tivohmo.yml
354
370
  - lib/tivohmo.rb
355
371
  - lib/tivohmo/adapters/filesystem.rb
356
372
  - lib/tivohmo/adapters/filesystem/application.rb
@@ -360,6 +376,7 @@ files:
360
376
  - lib/tivohmo/adapters/plex/application.rb
361
377
  - lib/tivohmo/adapters/plex/category.rb
362
378
  - lib/tivohmo/adapters/plex/episode.rb
379
+ - lib/tivohmo/adapters/plex/group.rb
363
380
  - lib/tivohmo/adapters/plex/metadata.rb
364
381
  - lib/tivohmo/adapters/plex/movie.rb
365
382
  - lib/tivohmo/adapters/plex/qualified_category.rb
@@ -367,6 +384,14 @@ files:
367
384
  - lib/tivohmo/adapters/plex/section.rb
368
385
  - lib/tivohmo/adapters/plex/show.rb
369
386
  - lib/tivohmo/adapters/plex/transcoder.rb
387
+ - lib/tivohmo/adapters/settings.rb
388
+ - lib/tivohmo/adapters/settings/application.rb
389
+ - lib/tivohmo/adapters/settings/display_item.rb
390
+ - lib/tivohmo/adapters/settings/key_container.rb
391
+ - lib/tivohmo/adapters/settings/metadata.rb
392
+ - lib/tivohmo/adapters/settings/reset_defaults_item.rb
393
+ - lib/tivohmo/adapters/settings/set_value_item.rb
394
+ - lib/tivohmo/adapters/settings/transcoder.rb
370
395
  - lib/tivohmo/adapters/streamio.rb
371
396
  - lib/tivohmo/adapters/streamio/metadata.rb
372
397
  - lib/tivohmo/adapters/streamio/transcoder.rb
@@ -377,9 +402,11 @@ files:
377
402
  - lib/tivohmo/api/metadata.rb
378
403
  - lib/tivohmo/api/node.rb
379
404
  - lib/tivohmo/api/server.rb
405
+ - lib/tivohmo/api/subtitle.rb
380
406
  - lib/tivohmo/api/transcoder.rb
381
407
  - lib/tivohmo/beacon.rb
382
408
  - lib/tivohmo/cli.rb
409
+ - lib/tivohmo/config.rb
383
410
  - lib/tivohmo/logging.rb
384
411
  - lib/tivohmo/server.rb
385
412
  - lib/tivohmo/server/views/_container.builder
@@ -406,6 +433,12 @@ files:
406
433
  - spec/adapters/plex/section_spec.rb
407
434
  - spec/adapters/plex/show_spec.rb
408
435
  - spec/adapters/plex/transcoder_spec.rb
436
+ - spec/adapters/settings/application_spec.rb
437
+ - spec/adapters/settings/display_item_spec.rb
438
+ - spec/adapters/settings/key_container_spec.rb
439
+ - spec/adapters/settings/metadata_spec.rb
440
+ - spec/adapters/settings/reset_defaults_item_spec.rb
441
+ - spec/adapters/settings/set_value_item_spec.rb
409
442
  - spec/adapters/streamio/metadata_spec.rb
410
443
  - spec/adapters/streamio/transcoder_spec.rb
411
444
  - spec/api/application_spec.rb
@@ -417,6 +450,39 @@ files:
417
450
  - spec/api/transcoder_spec.rb
418
451
  - spec/beacon_spec.rb
419
452
  - spec/cli_spec.rb
453
+ - spec/config_spec.rb
454
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Application/_children/should_get_children.yml
455
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Category/_children/should_allow_disabling_subtitles.yml
456
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Category/_children/should_display_non-zero_child_count_once_children_fetched.yml
457
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Category/_children/should_have_children.yml
458
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Category/_children/should_have_children_with_embedded_subtitles.yml
459
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Category/_children/should_have_children_with_subtitles.yml
460
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Category/_children/should_memoize.yml
461
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Category/_children/should_refresh_children_when_config_changes.yml
462
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Category/_children/should_use_category_value_for_children.yml
463
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Category/_initialize/should_instantiate.yml
464
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Category/_initialize/should_set_presorted_if_present.yml
465
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Category/_initialize/should_use_category_value_for_title_if_present.yml
466
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Episode/_initialize/should_instantiate.yml
467
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Episode/_metadata/should_allow_disabling_series_id_in_metadata.yml
468
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Episode/_metadata/should_populate_metadata.yml
469
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Metadata/_initialize/should_instantiate.yml
470
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Movie/_initialize/should_instantiate.yml
471
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Movie/_metadata/should_populate_metadata.yml
472
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_QualifiedCategory/_children/should_display_non-zero_child_count_once_children_fetched.yml
473
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_QualifiedCategory/_children/should_have_children.yml
474
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_QualifiedCategory/_children/should_memoize.yml
475
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_QualifiedCategory/_initialize/should_instantiate.yml
476
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Season/_children/should_have_children.yml
477
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Season/_children/should_memoize.yml
478
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Season/_initialize/should_instantiate.yml
479
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Section/_children/should_have_category_children.yml
480
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Section/_children/should_memoize.yml
481
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Section/_initialize/should_instantiate.yml
482
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Show/_children/should_have_children.yml
483
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Show/_children/should_memoize.yml
484
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Show/_initialize/should_instantiate.yml
485
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Transcoder/_initialize/should_instantiate.yml
420
486
  - spec/server_spec.rb
421
487
  - spec/spec_helper.rb
422
488
  - tivohmo.gemspec
@@ -458,6 +524,12 @@ test_files:
458
524
  - spec/adapters/plex/section_spec.rb
459
525
  - spec/adapters/plex/show_spec.rb
460
526
  - spec/adapters/plex/transcoder_spec.rb
527
+ - spec/adapters/settings/application_spec.rb
528
+ - spec/adapters/settings/display_item_spec.rb
529
+ - spec/adapters/settings/key_container_spec.rb
530
+ - spec/adapters/settings/metadata_spec.rb
531
+ - spec/adapters/settings/reset_defaults_item_spec.rb
532
+ - spec/adapters/settings/set_value_item_spec.rb
461
533
  - spec/adapters/streamio/metadata_spec.rb
462
534
  - spec/adapters/streamio/transcoder_spec.rb
463
535
  - spec/api/application_spec.rb
@@ -469,5 +541,39 @@ test_files:
469
541
  - spec/api/transcoder_spec.rb
470
542
  - spec/beacon_spec.rb
471
543
  - spec/cli_spec.rb
544
+ - spec/config_spec.rb
545
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Application/_children/should_get_children.yml
546
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Category/_children/should_allow_disabling_subtitles.yml
547
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Category/_children/should_display_non-zero_child_count_once_children_fetched.yml
548
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Category/_children/should_have_children.yml
549
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Category/_children/should_have_children_with_embedded_subtitles.yml
550
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Category/_children/should_have_children_with_subtitles.yml
551
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Category/_children/should_memoize.yml
552
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Category/_children/should_refresh_children_when_config_changes.yml
553
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Category/_children/should_use_category_value_for_children.yml
554
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Category/_initialize/should_instantiate.yml
555
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Category/_initialize/should_set_presorted_if_present.yml
556
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Category/_initialize/should_use_category_value_for_title_if_present.yml
557
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Episode/_initialize/should_instantiate.yml
558
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Episode/_metadata/should_allow_disabling_series_id_in_metadata.yml
559
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Episode/_metadata/should_populate_metadata.yml
560
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Metadata/_initialize/should_instantiate.yml
561
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Movie/_initialize/should_instantiate.yml
562
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Movie/_metadata/should_populate_metadata.yml
563
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_QualifiedCategory/_children/should_display_non-zero_child_count_once_children_fetched.yml
564
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_QualifiedCategory/_children/should_have_children.yml
565
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_QualifiedCategory/_children/should_memoize.yml
566
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_QualifiedCategory/_initialize/should_instantiate.yml
567
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Season/_children/should_have_children.yml
568
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Season/_children/should_memoize.yml
569
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Season/_initialize/should_instantiate.yml
570
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Section/_children/should_have_category_children.yml
571
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Section/_children/should_memoize.yml
572
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Section/_initialize/should_instantiate.yml
573
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Show/_children/should_have_children.yml
574
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Show/_children/should_memoize.yml
575
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Show/_initialize/should_instantiate.yml
576
+ - spec/fixtures/vcr/TivoHMO_Adapters_Plex_Transcoder/_initialize/should_instantiate.yml
472
577
  - spec/server_spec.rb
473
578
  - spec/spec_helper.rb
579
+ has_rdoc: