Skip to content
This repository has been archived by the owner on May 22, 2019. It is now read-only.

Commit

Permalink
Добавлены названия жанров
Browse files Browse the repository at this point in the history
  • Loading branch information
SerVB committed Aug 14, 2017
1 parent 257e955 commit 7998770
Show file tree
Hide file tree
Showing 16 changed files with 432 additions and 215 deletions.
6 changes: 3 additions & 3 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<!-- the Compile on Save feature is turned off for the project. -->
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
<!-- in the project's Project Properties dialog box.-->
<project name="RecordDownloader" default="default" basedir=".">
<description>Builds, tests, and runs the project RecordDownloader.</description>
<project name="RecordTools" default="default" basedir=".">
<description>Builds, tests, and runs the project RecordTools.</description>
<import file="nbproject/build-impl.xml"/>
<!--
Expand Down Expand Up @@ -58,7 +58,7 @@
An example of overriding the target for project execution could look like this:
<target name="run" depends="RecordDownloader-impl.jar">
<target name="run" depends="RecordTools-impl.jar">
<exec dir="bin" executable="launcher.exe">
<arg file="${dist.jar}"/>
</exec>
Expand Down
10 changes: 5 additions & 5 deletions nbproject/build-impl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ is divided into following sections:
- cleanup
-->
<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="RecordDownloader-impl">
<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="RecordTools-impl">
<fail message="Please build using Ant 1.8.0 or higher.">
<condition>
<not>
Expand Down Expand Up @@ -471,7 +471,7 @@ is divided into following sections:
</fileset>
</union>
<taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
<testng classfilesetref="test.set" failureProperty="tests.failed" jvm="${platform.java}" listeners="org.testng.reporters.VerboseReporter" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="RecordDownloader" testname="TestNG tests" workingDir="${work.dir}">
<testng classfilesetref="test.set" failureProperty="tests.failed" jvm="${platform.java}" listeners="org.testng.reporters.VerboseReporter" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="RecordTools" testname="TestNG tests" workingDir="${work.dir}">
<xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
<propertyset>
<propertyref prefix="test-sys-prop."/>
Expand Down Expand Up @@ -622,7 +622,7 @@ is divided into following sections:
<condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
<isset property="test.method"/>
</condition>
<condition else="-suitename RecordDownloader -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
<condition else="-suitename RecordTools -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
<matches pattern=".*\.xml" string="@{testClass}"/>
</condition>
<delete dir="${build.test.results.dir}" quiet="true"/>
Expand Down Expand Up @@ -919,7 +919,7 @@ is divided into following sections:
<delete file="${built-jar.properties}" quiet="true"/>
</target>
<target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
<echo level="warn" message="Cycle detected: RecordDownloader was already built"/>
<echo level="warn" message="Cycle detected: RecordTools was already built"/>
</target>
<target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
<mkdir dir="${build.dir}"/>
Expand Down Expand Up @@ -1407,7 +1407,7 @@ is divided into following sections:
<delete file="${built-clean.properties}" quiet="true"/>
</target>
<target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
<echo level="warn" message="Cycle detected: RecordDownloader was already built"/>
<echo level="warn" message="Cycle detected: RecordTools was already built"/>
</target>
<target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
<mkdir dir="${build.dir}"/>
Expand Down
8 changes: 4 additions & 4 deletions nbproject/genfiles.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
build.xml.data.CRC32=d5b0dd5d
build.xml.script.CRC32=cadc92f8
build.xml.data.CRC32=b53ceeb9
build.xml.script.CRC32=17ae4869
build.xml.stylesheet.CRC32=[email protected]
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=d5b0dd5d
nbproject/build-impl.xml.script.CRC32=e96394a0
nbproject/build-impl.xml.data.CRC32=b53ceeb9
nbproject/build-impl.xml.script.CRC32=2751c490
nbproject/build-impl.xml.stylesheet.CRC32=[email protected]
8 changes: 5 additions & 3 deletions nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ annotation.processing.enabled.in.editor=false
annotation.processing.processors.list=
annotation.processing.run.all.processors=true
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
application.title=RecordDownloader
application.title=RecordTools
application.vendor=SerVB
auxiliary.org-netbeans-spi-editor-hints-projects.perProjectHintSettingsFile=nbproject/cfg_hints.xml
build.classes.dir=${build.dir}/classes
build.classes.excludes=**/*.java,**/*.form
# This directory is removed when the project is cleaned:
Expand All @@ -25,7 +26,7 @@ debug.test.classpath=\
dist.archive.excludes=
# This directory is removed when the project is cleaned:
dist.dir=dist
dist.jar=${dist.dir}/RecordDownloader.jar
dist.jar=${dist.dir}/RecordTools.jar
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
Expand Down Expand Up @@ -56,11 +57,12 @@ javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
main.class=recorddownloader.RecordDownloader
main.class=servb.record.uijava.downloader.RecordDownloader
manifest.file=manifest.mf
meta.inf.dir=${src.dir}/META-INF
mkdist.disabled=false
platform.active=JDK1.6
project.license=mit
run.classpath=\
${javac.classpath}:\
${build.classes.dir}
Expand Down
5 changes: 4 additions & 1 deletion nbproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<type>org.netbeans.modules.java.j2seproject</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/j2se-project/3">
<name>RecordDownloader</name>
<name>RecordTools</name>
<explicit-platform explicit-source-supported="true"/>
<source-roots>
<root id="src.dir"/>
Expand All @@ -12,5 +12,8 @@
<root id="test.src.dir"/>
</test-roots>
</data>
<spellchecker-wordlist xmlns="http://www.netbeans.org/ns/spellchecker-wordlist/1">
<word>Обновлятель</word>
</spellchecker-wordlist>
</configuration>
</project>
Binary file added screenshots/v17.08.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
83 changes: 0 additions & 83 deletions src/recorddownloader/Genre.java

This file was deleted.

66 changes: 0 additions & 66 deletions src/recorddownloader/Track.java

This file was deleted.

92 changes: 92 additions & 0 deletions src/servb/record/core/Genre.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
/*
* MIT License
*
* Copyright (c) 2017
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package servb.record.core;

import java.util.HashMap;

/**
* Перечисление "Жанр".
*
* @author SerVB
*/
public enum Genre {

UNKNOWN(null, "Unknown Genre"),
BREAKS("brks", "Record Breaks"),
CHILLOUT("chil", "Record Chill-Out"),
EDM("club", "Record EDM"),
DANCECORE("dc", "Record Dancecore"),
DEEP("deep", "Record Deep"),
DUBSTEP("dub", "Record Dubstep"),
FUTURE_HOUSE("fut", "Future House"),
GOA("goa", "GOA/PSY"),
GOLD("gold", "Gold"),
ГОП("gop", "Гоп FM"),
МЕДЛЯК("mdl", "Медляк FM"),
MINIMAL("mini", "Minimal/Tech"),
MEGAMIX("mix", "Record Magamix"),
НАФТАЛИН("naft", "Нафталин FM"),
PIRATE_STATION("ps", "Pirate Station"),
OLD_SCHOOL("pump", "Old School"),
RAVE("rave", "Rave FM"),
ROCK("rock", "Record Rock"),
RADIO_RECORD("rr", "Radio Record"),
RUSSIAN_MIX("rus", "Russian Mix"),
СУПЕРДИСКОТЕКА_90("sd90", "Супердискотека 90-х"),
TECHNO("techno", "TECHNO"), // ?
HARDSTYLE("teo", "Record Hardstyle"),
TRANCEMISSION("tm", "Trancemission Radio"),
TRAP("trap", "Record Trap"),
TROPICAL("trop", "Tropical"),
VIP("vip", "Vip House"),
BLACK("yo", "Black");

private final String shortName;
private final String humanName;

private Genre(final String shortName, final String humanName) {
this.shortName = shortName;
this.humanName = humanName;
}

public String getShortName() {
return shortName;
}

public String getHumanName() {
return humanName;
}

public static Genre getByShortName(final String shortName) {
if (mapByShortName.isEmpty()) {
for (final Genre genre : Genre.values()) {
mapByShortName.put(genre.shortName, genre);
}
}
return mapByShortName.containsKey(shortName) ? mapByShortName.get(shortName) : UNKNOWN;
}

public static final HashMap<String, Genre> mapByShortName = new HashMap<String, Genre>();

}
Loading

0 comments on commit 7998770

Please sign in to comment.