Betaseries.com extension

Discuss your Lua playlist, album art and interface scripts.
gregoire.astruc
New Cone
New Cone
Posts: 6
Joined: 24 Nov 2010 16:35

Betaseries.com extension

Postby gregoire.astruc » 24 Nov 2010 18:46

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!

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Betaseries.com extension

Postby Jean-Baptiste Kempf » 24 Nov 2010 21:06

This is a great idea.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

gregoire.astruc
New Cone
New Cone
Posts: 6
Joined: 24 Nov 2010 16:35

Re: Betaseries.com extension

Postby gregoire.astruc » 26 Nov 2010 02:01

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 :)

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Betaseries.com extension

Postby Jean-Baptiste Kempf » 26 Nov 2010 11:47

I'll bring ivoire around soon.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

ivoire
Cone that earned his stripes
Cone that earned his stripes
Posts: 413
Joined: 20 Aug 2008 11:29
VLC version: trunk
Operating System: linux (debian sid)
Contact:

Re: Betaseries.com extension

Postby ivoire » 26 Nov 2010 19:47

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.

gregoire.astruc
New Cone
New Cone
Posts: 6
Joined: 24 Nov 2010 16:35

Re: Betaseries.com extension

Postby gregoire.astruc » 27 Nov 2010 14:12

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"

ivoire
Cone that earned his stripes
Cone that earned his stripes
Posts: 413
Joined: 20 Aug 2008 11:29
VLC version: trunk
Operating System: linux (debian sid)
Contact:

Re: Betaseries.com extension

Postby ivoire » 28 Nov 2010 10:03

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.

gregoire.astruc
New Cone
New Cone
Posts: 6
Joined: 24 Nov 2010 16:35

Re: Betaseries.com extension

Postby gregoire.astruc » 07 Dec 2010 11:03

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 ;)

idkska
New Cone
New Cone
Posts: 2
Joined: 10 Dec 2010 19:38

Re: Betaseries.com extension

Postby idkska » 10 Dec 2010 20:13

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.

gregoire.astruc
New Cone
New Cone
Posts: 6
Joined: 24 Nov 2010 16:35

Re: Betaseries.com extension

Postby gregoire.astruc » 12 Dec 2010 22:31

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 :)

ivoire
Cone that earned his stripes
Cone that earned his stripes
Posts: 413
Joined: 20 Aug 2008 11:29
VLC version: trunk
Operating System: linux (debian sid)
Contact:

Re: Betaseries.com extension

Postby ivoire » 20 Jan 2011 15:14

The extensions are not jailed...

evilperro
New Cone
New Cone
Posts: 9
Joined: 10 Mar 2013 17:50

Re: Betaseries.com extension

Postby evilperro » 10 Mar 2013 17:53

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?

gregoire.astruc
New Cone
New Cone
Posts: 6
Joined: 24 Nov 2010 16:35

Re: Betaseries.com extension

Postby gregoire.astruc » 08 Jan 2014 11:26

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.


Return to “Scripting VLC in lua”

Who is online

Users browsing this forum: No registered users and 11 guests