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 +4 -4
- data/CHANGELOG +5 -0
- data/lib/tivohmo/adapters/plex/episode.rb +24 -18
- data/lib/tivohmo/adapters/plex/movie.rb +12 -5
- data/lib/tivohmo/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1dd209625032c02880d0be351f2455545e10bba
|
4
|
+
data.tar.gz: 37f59ce8d6b891f3205c92a1e2db38b4f4b09fca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6594266dc18d59842e0fa8966507094821322fb8325451b01c6d7f7d607a7aab6503ce567fd976a3b579eb663aeaea6bab9990cd44d22992de4445896bc353c9
|
7
|
+
data.tar.gz: 5b1757fa7d5cbd2d4150a1ce93daf2b4c955ecf365264ebcb9bc6176efcc7ed239762541f1e0c4057eb5e7bd1e6dd8f9bb261c3613bdeff5f33abe391eba289f
|
data/CHANGELOG
CHANGED
@@ -22,24 +22,30 @@ module TivoHMO
|
|
22
22
|
def metadata
|
23
23
|
md = super
|
24
24
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
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
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
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
|
data/lib/tivohmo/version.rb
CHANGED