0

Изменение внутренних алгоритмов построения плейлиста

Теперь генерируется вначале обобщенный KinoPlay объект, сочетающий в себе
все прелести обычного фильма, сериала и сезонных сериалов.

Из недоделок, сейчас коряво работает возобновение просмотра.
This commit is contained in:
2017-01-06 02:59:38 +03:00
parent 2b41f7282d
commit 2a48fc9a7d
10 changed files with 452 additions and 137 deletions

View File

@@ -4,11 +4,11 @@
*/
package kinosearch.webapp;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import kinosearch.core.KinoPlay;
import kinosearch.core.SpringConfig;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.*;
import org.springframework.web.servlet.ViewResolver;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
@@ -36,6 +36,12 @@ public class WebAppConfiguration extends WebMvcConfigurerAdapter {
return freeMarkerConfigurer;
}
@Bean
@Scope("singleton")
public Gson gson() {
return new GsonBuilder().registerTypeAdapter(KinoPlay.class, new KinoPlaySerializer()).create();
}
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/css/**")