View Single Post
marxian's Avatar
Posts: 2,448 | Thanked: 9,523 times | Joined on Aug 2010 @ Wigan, UK
#1361
I was thinking about the archive issue today, and it occurred to me that it would be fairly simple to write a plugin for that. If the plugin were to be used solely for videos downloaded via cuteTube, then it could use the paths for the categories defined in the main config file:

cuteTube2.conf

Code:
[Categories]
Foo=/path/for/foo
Bar=/path/for/bar
Queries to tracker (or a simple ls command) could be limited to these paths. The only limitation would be that the paths would need to be used only for cuteTube downloads.

Alternatively, a plugin could have more widespread support for local videos, even allowing the user to define their own directories in the UI by providing a declarative settings file:

local_videos.settings

Code:
<settings title="Local videos">
    <text key="directories" title="Directories" />
</settings>
A comma separated list of directories could then be queried using tracker to get the videos. Plugins can also support search:

local_videos.plugin

Code:
Name=Local videos
SupportedListResources=video
SupportedSearchResources=video
UrlRegExp=(file://|)/.+\\.(mp4|mpeg|avi|flv)  //etc
Exec=/home/user/scripts/local_videos.sh
Now the user can:
  • Browse local videos in user-definable directories.
  • Search local videos.
  • Show a local video in cuteTube using a dbus call.

Plugins can also possible support other resources, such as playlists.
__________________
'Men of high position are allowed, by a special act of grace, to accomodate their reasoning to the answer they need. Logic is only required in those of lesser rank.' - J K Galbraith

My website

GitHub
 

The Following 22 Users Say Thank You to marxian For This Useful Post: