Series Plugin

Discussion about user contributed plugins

Moderator: Moderator

User avatar
castorinop
veteran
Posts: 331
Joined: Wed Jun 07, 2006 6:34 pm
Location: Argentina
Contact:

Series Plugin

Postby castorinop » Tue Sep 01, 2009 2:09 pm

Hi all!

I'm working into a plugin for series, simple, fast. you can view the screencast in http://www.youtube.com/watch?v=BIFtXsYJTSc

Features:
for 1.1.x
list of series
list of episodes, you can select all episodes or firlter by seaon.
use cover path.
random play, (if you can't decide what see)
inotify
startup indexation

TODO:
1.2.x
clean code!!!
get from inet: (thetvdb.com) info, banners, covers
banners && fanarts
remember gui view: remember season and episode position.
filter "episodes unplayed" (unplayed episodes from all series)

do you like ? comments ?

Regards!

User avatar
magicamun
master
Posts: 688
Joined: Thu Feb 28, 2008 7:42 am
Location: Germany

Re: Series Plugin

Postby magicamun » Tue Sep 01, 2009 3:01 pm

nice - what did you do with the mainmenu ?

did you use code from 1.2.0 (menu.cpp)?

User avatar
acmelabs
Overlord
Posts: 2365
Joined: Mon Feb 20, 2006 9:18 pm
Location: Germany
Contact:

Re: Series Plugin

Postby acmelabs » Tue Sep 01, 2009 3:41 pm

Cool!

User avatar
castorinop
veteran
Posts: 331
Joined: Wed Jun 07, 2006 6:34 pm
Location: Argentina
Contact:

Re: Series Plugin

Postby castorinop » Tue Sep 01, 2009 3:52 pm

magicamun wrote:nice - what did you do with the mainmenu ?

did you use code from 1.2.0 (menu.cpp)?


don't, ugly code into movie_plugin.cpp

Code: Select all

=== modified file 'plugins/feature/movie/movie_plugin.cpp'
--- old/plugins/feature/movie/movie_plugin.cpp   2009-01-14 12:42:08 +0000
+++ new/plugins/feature/movie/movie_plugin.cpp   2009-08-27 03:23:05 +0000
@@ -6,6 +6,7 @@
 
 #ifdef use_graphical_movie
 #include "graphical_movie.hpp"
+#include "series.hpp"
 #endif
 
 #include "themes.hpp"
@@ -23,6 +24,29 @@
   pdialog.print();
 }
 
+void series()
+{
+  Series *mov = get_class<Series>(dgettext("mms-movie", "Serie"));
+
+  /*if (!mov->loaded_correctly) {
+    mov->read_dirs();
+    mov->loaded_correctly = true;
+  }*/
+
+  /* if (mov->reload_needed) {
+    DialogWaitPrint pdialog(dgettext("mms-movie", "Reloading directories"), 1000);
+    mov->read_dirs();
+  } */
+
+  /*if (mov->files_size() == 0) {
+    no_movies_error();
+    mov->reload_needed = true;
+  } else {
+    mov->reload_needed = false; */
+    mov->mainloop();
+  //}
+}
+
 void movie_fromhd()
 {
   Movie *mov = get_class<Movie>(dgettext("mms-movie", "Video"));
@@ -62,6 +86,7 @@
 class MoviePlugin : public FeaturePlugin
 {
 public:
+
   bool plugin_post_init(){
     S_InputMaster::get_instance()->parse_keys("movie", "5");
     return true;
@@ -74,9 +99,9 @@
     movie_conf->parse_configuration_file(conf->p_homedir());
 
 #ifdef use_graphical_movie
-    if (movie_conf->p_graphical_movie_mode())
+    if (movie_conf->p_graphical_movie_mode()) {
       module = new GraphicalMovie();
-    else
+    } else
 #endif
       module = new SimpleMovie();
 
@@ -99,6 +124,9 @@
 
     features.push_back(startmenu_item(text, "movie_hd", themes->startmenu_movie_dir, 0, &movie_fromhd));
 
+    text = dgettext("mms-movie", "Play Series");
+    features.push_back(startmenu_item(text, "series", themes->startmenu_movie_dir, 0, &series));
+
     if (conf->p_media()) {
       text = dgettext("mms-movie", "Play a dvd/vcd/svcd");
       features.push_back(startmenu_item(text, "movie_disc", themes->startmenu_movie_cd, 1, &movie_cd));


User avatar
Uatschitchun
Overlord
Posts: 3189
Joined: Tue Dec 06, 2005 6:55 pm
Location: Germany
Contact:

Re: Series Plugin

Postby Uatschitchun » Wed Sep 02, 2009 9:35 am

Real cool ;)

Have you got write access to our launchpad bzr repos?
Lg
Roman

User avatar
castorinop
veteran
Posts: 331
Joined: Wed Jun 07, 2006 6:34 pm
Location: Argentina
Contact:

Re: Series Plugin

Postby castorinop » Mon Sep 07, 2009 10:03 pm

Uatschitchun wrote:Real cool ;)

Have you got write access to our launchpad bzr repos?


i don't have write access. :(

User avatar
Uatschitchun
Overlord
Posts: 3189
Joined: Tue Dec 06, 2005 6:55 pm
Location: Germany
Contact:

Re: Series Plugin

Postby Uatschitchun » Tue Sep 08, 2009 2:47 pm

I bet Anders will grant it to you!
Lg

Roman

User avatar
castorinop
veteran
Posts: 331
Joined: Wed Jun 07, 2006 6:34 pm
Location: Argentina
Contact:

Re: Series Plugin

Postby castorinop » Thu Oct 08, 2009 12:25 pm

HI,

if you wish testing the series feature can be get 1.1.x-series-plugin branch into launchpad.

Code: Select all

bzr branch lp:~castorinop/mms/1.1.x-series_plugin


please, send me bugs, features and suggestions

Regards...

User avatar
Uatschitchun
Overlord
Posts: 3189
Joined: Tue Dec 06, 2005 6:55 pm
Location: Germany
Contact:

Re: Series Plugin

Postby Uatschitchun » Fri Oct 09, 2009 5:23 pm

So it's not an own plugin, but a variation of movie-plugin?

I get:
can't extract season and episode

Do the files have to have special names?


And I get a segfault ;(

I guess best idea would be to have a look into mms-ng! There we have real plugins and it would be easier to add things like this and rss, etc. ...
Even only the plugin itself need to have it's branch then and no complete MMS branch would be needed!
Lg

Roman

User avatar
castorinop
veteran
Posts: 331
Joined: Wed Jun 07, 2006 6:34 pm
Location: Argentina
Contact:

Re: Series Plugin

Postby castorinop » Thu Oct 22, 2009 3:31 pm

Uatschitchun wrote:So it's not an own plugin, but a variation of movie-plugin?


use methods for play video, the arquitecture of handle file info is completly new.

Uatschitchun wrote:I get:
can't extract season and episode

Do the files have to have special names?


yes, should be work if filename content S01E01 or 01x01. maybe should be can define a regex rule for parse filenames

Uatschitchun wrote:And I get a segfault ;(

please report! :)

Uatschitchun wrote:I guess best idea would be to have a look into mms-ng! There we have real plugins and it would be easier to add things like this and rss, etc. ...
Even only the plugin itself need to have it's branch then and no complete MMS branch would be needed!


i'm a upladed a branch for 1.2.x and a blueprint for freedback
https://blueprints.launchpad.net/mms/+s ... ies-plugin

User avatar
Uatschitchun
Overlord
Posts: 3189
Joined: Tue Dec 06, 2005 6:55 pm
Location: Germany
Contact:

Re: Series Plugin

Postby Uatschitchun » Sat Oct 31, 2009 9:16 am

Lg

Roman


Return to “user plugins”

Who is online

Users browsing this forum: No registered users and 1 guest