I did some reading and it looks like I would need admin status on SF.net 
to be able to attach to other peoples trackers.


Ryan Roth wrote:
> This is for 1.x.  It is so generic of a plugin it will work with any 
> version.  I would of added it to the tracker, but SF.net won't let me 
> attach files to trackers I didn't open.  If any one knows how to change 
> this let Dischi know and he can fix it for me.
>
> Thanks
>
> Evan Hisey wrote:
>   
>> Ryan-
>>  Is this for 1.x or 1.6? Can you add to the feature tracker as an attachment?
>>
>> Evan
>>
>> On 12/21/06, Ryan Roth <[EMAIL PROTECTED]> wrote:
>>   
>>     
>>> New revision with minor change
>>>
>>>
>>> import os
>>> import plugin
>>> import config
>>>
>>> from gui.PopupBox import PopupBox
>>> from item import Item
>>> import config, menu, rc, plugin, osd, util
>>>
>>> class PluginInterface(plugin.MainMenuPlugin):
>>>     """
>>>     Video File Mover With Queue
>>>
>>>     Activate:
>>>     plugin.activate('video.movequeue')
>>>     """
>>>     def __init__(self):
>>>         if not hasattr(config, 'VIDEO_QUEUE_DIR'):
>>>             self.reason = 'VIDEO_QUEUE_DIR not defined'
>>>             return
>>>         plugin.MainMenuPlugin.__init__(self)
>>>
>>>     def items(self, parent):
>>>         return [ VideoQueueMainMenu(parent) ]
>>>
>>>
>>> class QueueItem(Item):
>>>     """
>>>     Item for the menu for one room
>>>     """
>>>     def __init__(self, parent):
>>>         Item.__init__(self, parent)
>>>
>>>     def actions(self):
>>>         """
>>>         return a list of actions for this item
>>>         """
>>>         return [ ( self.runcmd , _('Run Command') ) ]
>>>
>>>     def runcmd(self, arg=None, menuw=None):
>>>         """
>>>         Run Move Command
>>>         """
>>>         queue_items = open('/tmp/video_move_queue','r')
>>>         popup = PopupBox(text=_('Moving queued files..'))
>>>         popup.show()
>>>         for line in queue_items:
>>>             os.system('mv "%s" "%s"' % (line[:-1], config.VIDEO_QUEUE_DIR))
>>>         queue_items.close()
>>>         os.system('echo > /tmp/video_move_queue')
>>>         popup.destroy()
>>>         menuw.delete_menu(arg, menuw)
>>>         menuw.refresh()
>>>
>>> class VideoQueueMainMenu(Item):
>>>     """
>>>     this is the item for the main menu.
>>>     """
>>>     def __init__(self, parent):
>>>         Item.__init__(self, parent)
>>>         self.name = _('Video Mover Queue')
>>>
>>>     def actions(self):
>>>         """
>>>         return a list of actions for this item
>>>         """
>>>         items = [ ( self.create_queue_menu , _('Video Mover Queue' )) ]
>>>         return items
>>>
>>>     def create_queue_menu(self, arg=None, menuw=None):
>>>         queue_item = []
>>>         queue_menu_items = []
>>>         queue_item = QueueItem(self)
>>>         queue_item.name = "Move Queue Now"
>>>         queue_menu_items += [ queue_item ]
>>>         queue_items = open('/tmp/video_move_queue','r')
>>>         for line in queue_items:
>>>             queue_item = QueueItem(self)
>>>             queue_item.name = line
>>>             queue_menu_items += [ queue_item ]
>>>             print line
>>>         queue_items.close()
>>>         if (len(queue_menu_items) == 0):
>>>             queue_menu_items += [menu.MenuItem(_('No queued items found'), 
>>> menuw.goto_prev_page, 0)]
>>>         queue_menu = menu.Menu(_('Video Mover Queue'), queue_menu_items)
>>>         menuw.pushmenu(queue_menu)
>>>         menuw.refresh()
>>>
>>>
>>>
>>> import os
>>> import plugin
>>> import config
>>>
>>> class PluginInterface(plugin.ItemPlugin):
>>>
>>>     def __init__(self):
>>>         plugin.ItemPlugin.__init__(self)
>>>
>>>     #Actions:
>>>     def actions(self,item):
>>>         self.item = item
>>>         return [ (self.queue_to_move, 'Add to queue to be moved')]
>>>
>>>     def queue_to_move(self,arg=None, menuw=None):
>>>         item = self.item
>>>         f = file('/tmp/video_move_queue', 'a')
>>>         f.write(item.filename)
>>>         f.write('\n')
>>>         f.close()
>>>         menuw.delete_menu(arg, menuw)
>>>         menuw.refresh()
>>>
>>>
>>> -------------------------------------------------------------------------
>>> Take Surveys. Earn Cash. Influence the Future of IT
>>> Join SourceForge.net's Techsay panel and you'll get the chance to share your
>>> opinions on IT & business topics through brief surveys - and earn cash
>>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>>>
>>> _______________________________________________
>>> Freevo-devel mailing list
>>> Freevo-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/freevo-devel
>>>
>>>
>>>
>>>     
>>>       
>> -------------------------------------------------------------------------
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to share your
>> opinions on IT & business topics through brief surveys - and earn cash
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> _______________________________________________
>> Freevo-devel mailing list
>> Freevo-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/freevo-devel
>>
>>   
>>     
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Freevo-devel mailing list
> Freevo-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freevo-devel
>
>   

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-devel mailing list
Freevo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to