Page 1 of 1

Betaseries.com extension

Posted: 24 Nov 2010 18:46
by gregoire.astruc
Hello,

I am currently developing an extension for BetaSeries. This website allows you to keep track of your series, episodes you've watched etc.

The purpose of this extension is to automagically mark your episode as watched on BetaSeries.

The extension itself is divided in several files :
  • modules/betaseries.lua : BetaSeries API.
    meta/fetcher/betaseries.lua : BetaSeries Fetcher. Adds betaseries metatags to the video. (heavily inspired by tvrage.lua)
    extensions/betaseries.lua : BetaSeries UI. It also interacts with the playlist.
And since I needed a few extra-features :
  • modules/set.lua : Basic set features.
    meta/reader/filename2.lua : Enables VLC to read basic meta from files named with the following scheme : Show Title - 1x04 - Episode Title.avi. (heavily inspired by filename.lua. Perhaps the two files could be merged?)
The extension works by adding an item to VLC playlist which will call the XML betaseries.com api.

The code is available at GitHub.

It's still under development and far from perfect, but since I find it useful, I thought I might share :)

Any suggestions, bug report (yum!), questions are welcome!

Re: Betaseries.com extension

Posted: 24 Nov 2010 21:06
by Jean-Baptiste Kempf
This is a great idea.

Re: Betaseries.com extension

Posted: 26 Nov 2010 02:01
by gregoire.astruc
Thanks!

By the way, I tried to comment the code as much as possible. Since the documentation lacks a few tutorials/examples, I don't mind writing some on the wiki if needed.

Two more things:
  • Could you give examples (at least) regarding the Variables and the callbacks?
  • Why meta/fetcher and meta/reader can't access modules in the lua/modules directory?
Thanks again for your reply :)

Re: Betaseries.com extension

Posted: 26 Nov 2010 11:47
by Jean-Baptiste Kempf
I'll bring ivoire around soon.

Re: Betaseries.com extension

Posted: 26 Nov 2010 19:47
by ivoire
Hello,
cool to see an extension like this one.
For an example about the variables, you can have a look at share/lua/intf/rc.lua line 392.
The principle is to get a the vlc object that hold the variable you want to get/set (like with vlc.object.input() for the input object) and to give it as a first argument and the name of the variable as the second argument: vlc.var.get( object, variable_name ).

For the meta_fetcher and meta_reader I don't know. I will have a look.

Re: Betaseries.com extension

Posted: 27 Nov 2010 14:12
by gregoire.astruc
Thanks for pointing it out :)

about the meta_fetcher it's a bit weird.

I am on Windows 7 x64 and I have tried to install my extensions in two places:
  • The global "Program Files/VideoLAN/lua" directory.
  • My VideoLAN user-config directory.
In the first case, I have to write something like this in meta/fetcher/betaseries.lua:

Code: Select all

require "modules.betaseries"
And it works.

In the other case, It simply won't find the file. I have to copy modules/betaseries.lua in meta/modules and then change the line to

Code: Select all

require "betaseries"

Re: Betaseries.com extension

Posted: 28 Nov 2010 10:03
by ivoire
I took a look at how modules are handled by the lua engine. It seems that lua looks in the current directory, in "$current_dir/modules/$module_name.lua" (or .luac) and in $current_dir/../modules/$module_name.lua so for lua/meta/fetcher/$file.lua lua can't find the module file which is in lua/modules.

Re: Betaseries.com extension

Posted: 07 Dec 2010 11:03
by gregoire.astruc
I took a brief look at this issue and it looks like one can play with the package path.

Anyway, I did two installers for my extension, one for Linux and another for Windows if anyone would like to try it out ;)

Re: Betaseries.com extension

Posted: 10 Dec 2010 20:13
by idkska
This is a great idea and the concept can be modified possibly for what I'm trying to do. sabnzdb+sickbeard+VLC with sickbeard feeding meta data and a playlist to VLC instead of XMBC. It would be great to be able to dynamically change the structure of the VLC playlist based on shows watched.

Good Work.

Re: Betaseries.com extension

Posted: 12 Dec 2010 22:31
by gregoire.astruc
Well, actually I'm planning on doing something close.

BetaSeries (sorry it's only available in french at the moment) offers an api in which you can find episodes the user downloaded and waiting to be watched on the computer.

Using a Service Discovery plugin, I could easily go through the list of episodes to watch returned by the api, scan through user-specified directories and create a playlist of episodes.

I don't know how lua extensions are jailed however, and if I can list any specified directory :)

Re: Betaseries.com extension

Posted: 20 Jan 2011 15:14
by ivoire
The extensions are not jailed...

Re: Betaseries.com extension

Posted: 10 Mar 2013 17:53
by evilperro
Can't get this to work on windows 7 with vlc 2.0.5 32 bit version. When I click on betaseries in the view menu the extension does not prompt me for betaseries user and password.

Is there a way to get it to work?

Re: Betaseries.com extension

Posted: 08 Jan 2014 11:26
by gregoire.astruc
Hello,

sorry for the long absence.

Both BetaSeries and VLC lua API changed a lot, and you will find an updated version on GitHub which should work fine.

Or use any of the updater script.

Let me know (if you're still around and/or interested) if it's all working for you.