musictree 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/checksums/musictree-0.2.1.gem.sha512 +1 -0
- data/lib/musictree/album.rb +1 -1
- data/lib/musictree/track.rb +1 -1
- data/lib/musictree/tree.rb +1 -3
- data/lib/musictree/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c4ae2d14cb182c1f34a62b95ec57a76a38f4552248b8a44a8c30137de124d7f
|
4
|
+
data.tar.gz: 26dfaca9216f36d4b5bad2d8caa030f8b2a016432f5d53cf33121d43b13fb499
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7086c0e64e9b511bb2c607cd36e2baa41bd4af65cf71ab2eda933a09cabf98e00d978e261c1d8af75d226d236d066b96c744846b020ffa8a3999d778bd70513
|
7
|
+
data.tar.gz: 7f6402fb7aa26e5521d3d77fb49d6777e0842592c83f260b968e15c030aa6ecc33792a0736e6f33d2e9e341a4f32920e1bfdc3379acb6e4dc8a587df644f12e7
|
data/CHANGELOG.md
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
f1701fbd7ac3641f637b5685ce118d09dec9beed2af6ef739c8793ac6a366d103c83aef737cea8e30302547eb38942785d054525ef5b70910cf17daf07af6898
|
data/lib/musictree/album.rb
CHANGED
data/lib/musictree/track.rb
CHANGED
@@ -6,7 +6,7 @@ require "wahwah"
|
|
6
6
|
module Musictree
|
7
7
|
# A track holds the meta information for one music file
|
8
8
|
class Track
|
9
|
-
attr_reader :title, :artist, :track, :album
|
9
|
+
attr_reader :title, :artist, :track, :album, :path
|
10
10
|
# Scan a music file for metadata
|
11
11
|
# (The method name is consistent to the other classes but a bit shit)
|
12
12
|
# @param path [String] path to the source music file
|
data/lib/musictree/tree.rb
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "pathname"
|
4
3
|
# @author Jan "half/byte" Krutisch
|
5
4
|
module Musictree
|
6
5
|
# Tree is the base entry class for Musictree.
|
7
6
|
# Use Tree.scan(path) to scan in a full tree for a given file path
|
8
7
|
# Tree is enumerable and contains either other trees (subdirectories) or albums.
|
9
8
|
class Tree
|
10
|
-
attr_reader :title
|
9
|
+
attr_reader :title, :path
|
11
10
|
include Enumerable
|
12
11
|
|
13
12
|
# Scan in a file tree
|
@@ -46,7 +45,6 @@ module Musictree
|
|
46
45
|
@title = File.basename(@path)
|
47
46
|
Dir[File.join(@path, "/*")].each do |file_or_dir|
|
48
47
|
if File.directory?(file_or_dir)
|
49
|
-
# rel = Pathname.new(file_or_dir).relative_path_from(@path)
|
50
48
|
@children << Album.scan(file_or_dir)
|
51
49
|
else
|
52
50
|
raise Error.new("Only Directories expected here")
|
data/lib/musictree/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: musictree
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Krutisch
|
@@ -50,6 +50,7 @@ files:
|
|
50
50
|
- README.md
|
51
51
|
- Rakefile
|
52
52
|
- checksums/musictree-0.2.0.gem.sha512
|
53
|
+
- checksums/musictree-0.2.1.gem.sha512
|
53
54
|
- lib/musictree.rb
|
54
55
|
- lib/musictree/album.rb
|
55
56
|
- lib/musictree/ff_prober.rb
|