organo 0.3.1 → 0.3.2
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8691436aa9cdcb12c5de1da33b147103bcfa5d2459a3ad6b0ad868b4b49b2b44
|
4
|
+
data.tar.gz: 3f1b7419aaee87053d5b74f0227e6b9c5e4c36d783b672dafebbd6f3d1c07091
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e3e5e6c5e8898ab4552bd2b9cf108aef4de0075f13e5e1731cf4bda3917534cc19c88ecfc545ac41396d7f33e01311408d600b33e2331bbbfcd28a2f4decdad
|
7
|
+
data.tar.gz: 14046ec16b3a0986312e78567e226089346d1bba28a0d05b0c10996d7916e7c5a9787f9312ce567dcbf0f588f43485b17a57df2d0b526eb4ddacde29b9810bb7
|
@@ -16,9 +16,9 @@ module Organo
|
|
16
16
|
json_obj = Query.get_anime_by_id(mal_id)
|
17
17
|
show = SearchShow.new(json_obj['mal_id'], json_obj['title'], json_obj['images']['jpg']['image_url'])
|
18
18
|
show_type = json_obj['type']
|
19
|
-
file_name = (show_type == 'TV' ? "#{json_obj['year']}
|
19
|
+
file_name = (show_type == 'TV' ? "#{json_obj['year']}_#{json_obj['season']}" : show_type.downcase)
|
20
20
|
file_path = "#{Config::DEFAULT_DIR}/#{file_name}.json"
|
21
|
-
show_list = File.exist?(file_path) ? Reader.read_file(file_path) :
|
21
|
+
show_list = File.exist?(file_path) ? Reader.read_file(file_path) : []
|
22
22
|
if show_list.find_index { |s| s.id.to_s == mal_id.to_s }.nil?
|
23
23
|
Writer.to_file(show_list.push(show).sort_by(&:title), file_path)
|
24
24
|
puts "Added anime \"#{show.title}\" (#{mal_id})"
|
@@ -9,7 +9,7 @@ module Organo
|
|
9
9
|
module Add
|
10
10
|
|
11
11
|
class SequelEntry < Dry::CLI::Command
|
12
|
-
desc 'Add anime entry to
|
12
|
+
desc 'Add anime sequel entry to anime in file'
|
13
13
|
argument :anime_mal_id, type: :integer, required: true, desc: 'Anime MyAnimeList ID'
|
14
14
|
argument :sequel_mal_id, type: :integer, required: true, desc: 'Sequel MyAnimeList ID'
|
15
15
|
argument :season_num, type: :integer, required: false, default: 0, desc: 'Season number'
|
data/lib/organo/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: organo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Louis-Philippe Fortin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-03-
|
11
|
+
date: 2023-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-cli
|