tivohmo 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6513addd49cd73d0c775c59dc61f1b50c1efb335
4
- data.tar.gz: f1e455479caff464c3bfd800ca7debd5aa2ed57c
3
+ metadata.gz: c1dd209625032c02880d0be351f2455545e10bba
4
+ data.tar.gz: 37f59ce8d6b891f3205c92a1e2db38b4f4b09fca
5
5
  SHA512:
6
- metadata.gz: 1c53ffcccd988944ebb7e95ce86a722052ec42198ca1b01d41e26ce71f5e0230652b7585244414b8ab8f9575a1fd5d0dc3e25f8fde1466ec12cb6af27f3f8627
7
- data.tar.gz: c00d7b88d4551f34fcace28ebd0bd9b714dc8f21926ce3581e918965a77a87d67f5a61f4e1d8bde6e045117bba0044500be3736b58490d56a7f98353f23c3cb1
6
+ metadata.gz: 6594266dc18d59842e0fa8966507094821322fb8325451b01c6d7f7d607a7aab6503ce567fd976a3b579eb663aeaea6bab9990cd44d22992de4445896bc353c9
7
+ data.tar.gz: 5b1757fa7d5cbd2d4150a1ce93daf2b4c955ecf365264ebcb9bc6176efcc7ed239762541f1e0c4057eb5e7bd1e6dd8f9bb261c3613bdeff5f33abe391eba289f
data/CHANGELOG CHANGED
@@ -1,3 +1,8 @@
1
+ 0.2.1 (11/23/2014)
2
+ ------------------
3
+
4
+ failsafe reading of plex metadata <e48ecbb> [Matt Conway]
5
+
1
6
  0.2.0 (11/23/2014)
2
7
  ------------------
3
8
 
@@ -22,24 +22,30 @@ module TivoHMO
22
22
  def metadata
23
23
  md = super
24
24
 
25
- md.original_air_date = Time.parse(delegate.originally_available_at) rescue nil
26
-
27
- rating_name = delegate.content_rating.upcase
28
- rating_value = TivoHMO::API::Metadata::TV_RATINGS[rating_name]
29
- if rating_value
30
- md.tv_rating = {name: rating_name, value: rating_value}
31
- end
32
-
33
- md.is_episode = true
34
- md.episode_number = "%i%02i" % [delegate.parent_index, delegate.index]
35
- md.series_title = delegate.grandparent_title
36
- md.episode_title = "%i - %s" % [md.episode_number, title]
37
- md.title = "%s - %s" % [delegate.grandparent_title, title]
38
-
39
- # group tv shows under same name if we can extract a seriesId
40
- guid = delegate.guid
41
- if guid =~ /thetvdb:\/\/(\d+)/
42
- md.series_id = "SH#{$1}"
25
+ begin
26
+
27
+ md.original_air_date = Time.parse(delegate.originally_available_at) rescue nil
28
+
29
+ rating_name = delegate.content_rating.upcase
30
+ rating_value = TivoHMO::API::Metadata::TV_RATINGS[rating_name]
31
+ if rating_value
32
+ md.tv_rating = {name: rating_name, value: rating_value}
33
+ end
34
+
35
+ md.is_episode = true
36
+ md.episode_number = "%i%02i" % [delegate.parent_index, delegate.index]
37
+ md.series_title = delegate.grandparent_title
38
+ md.episode_title = "%i - %s" % [md.episode_number, title]
39
+ md.title = "%s - %s" % [delegate.grandparent_title, title]
40
+
41
+ # group tv shows under same name if we can extract a seriesId
42
+ guid = delegate.guid
43
+ if guid =~ /thetvdb:\/\/(\d+)/
44
+ md.series_id = "SH#{$1}"
45
+ end
46
+
47
+ rescue => e
48
+ logger.log_exception e, "Failed to read plex metadata for #{self}"
43
49
  end
44
50
 
45
51
  md
@@ -21,12 +21,19 @@ module TivoHMO
21
21
 
22
22
  def metadata
23
23
  md = super
24
- md.movie_year = Time.parse(delegate.originally_available_at).year rescue nil
25
24
 
26
- rating_name = delegate.content_rating.upcase
27
- rating_value = TivoHMO::API::Metadata::MPAA_RATINGS[rating_name]
28
- if rating_value
29
- md.mpaa_rating = {name: rating_name, value: rating_value}
25
+ begin
26
+
27
+ md.movie_year = Time.parse(delegate.originally_available_at).year rescue nil
28
+
29
+ rating_name = delegate.content_rating.upcase
30
+ rating_value = TivoHMO::API::Metadata::MPAA_RATINGS[rating_name]
31
+ if rating_value
32
+ md.mpaa_rating = {name: rating_name, value: rating_value}
33
+ end
34
+
35
+ rescue => e
36
+ logger.log_exception e, "Failed to read plex metadata for #{self}"
30
37
  end
31
38
 
32
39
  md
@@ -1,3 +1,3 @@
1
1
  module TivoHMO
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tivohmo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Conway