… | |
… | |
770 | %{ $meta->{"" } || {} }, |
770 | %{ $meta->{"" } || {} }, |
771 | %{ $meta->{$file} || {} }, |
771 | %{ $meta->{$file} || {} }, |
772 | }; |
772 | }; |
773 | |
773 | |
774 | if (exists $meta->{license} && $meta->{license} =~ s/^#//) { # exists == avoid autovivification |
774 | if (exists $meta->{license} && $meta->{license} =~ s/^#//) { # exists == avoid autovivification |
|
|
775 | # all these are acceptable for deliantra - if not specified, agpl 3+ is the default. |
775 | $meta->{license} = ({ |
776 | $meta->{license} = ({ |
776 | "pd" => "Public Domain", |
777 | "pd" => "Public Domain", |
777 | "gpl" => "GNU General Public License, version 3.0 or any later", |
778 | "gpl" => "GNU General Public License, version 3.0 or any later", |
|
|
779 | "2bsd" => "2-clause BSD/MIT style license", |
|
|
780 | "3bsd" => "3-clause BSD style license", |
778 | "cc/by/2.0" => "Licensed under Creative Commons Attribution 2.0 http://creativecommons.org/licenses/by/2.0/", |
781 | "cc/by/2.0" => "Licensed under Creative Commons Attribution 2.0 http://creativecommons.org/licenses/by/2.0/", |
779 | "cc/by/2.1" => "Licensed under Creative Commons Attribution 2.1 http://creativecommons.org/licenses/by/2.1/", |
782 | "cc/by/2.1" => "Licensed under Creative Commons Attribution 2.1 http://creativecommons.org/licenses/by/2.1/", |
780 | "cc/by/2.5" => "Licensed under Creative Commons Attribution 2.5 http://creativecommons.org/licenses/by/2.5/", |
783 | "cc/by/2.5" => "Licensed under Creative Commons Attribution 2.5 http://creativecommons.org/licenses/by/2.5/", |
781 | "cc/by/3.0" => "Licensed under Creative Commons Attribution 3.0 http://creativecommons.org/licenses/by/3.0/", |
784 | "cc/by/3.0" => "Licensed under Creative Commons Attribution 3.0 http://creativecommons.org/licenses/by/3.0/", |
782 | })->{$meta->{license}} |
785 | })->{$meta->{license}} |
… | |
… | |
785 | |
788 | |
786 | if (!exists $meta->{author} && $meta->{source} =~ m%^http://www.jamendo.com/en/artist/(.*)$%) { |
789 | if (!exists $meta->{author} && $meta->{source} =~ m%^http://www.jamendo.com/en/artist/(.*)$%) { |
787 | ($meta->{author} = $1) =~ s/_/ /g; |
790 | ($meta->{author} = $1) =~ s/_/ /g; |
788 | } |
791 | } |
789 | |
792 | |
790 | $file =~ s/\.res$//; |
793 | $file =~ s/\.(res|ogg|wav|jpg|png)$// unless $meta->{keep_suffix}; |
791 | $file =~ s/\.(ogg|wav|jpg|png)$//; |
|
|
792 | |
794 | |
793 | if ($file =~ s/\.plt$//) { |
795 | if ($file =~ s/\.plt$//) { |
794 | $data = process_plt "$dir/$file", $data; |
796 | $data = process_plt "$dir/$file", $data; |
795 | } elsif (my $filter = delete $meta->{cfutil_filter}) { |
797 | } elsif (my $filter = delete $meta->{cfutil_filter}) { |
796 | if ($filter eq "yaml2json") { |
798 | if ($filter eq "yaml2json") { |