Internet radio browser GUI for music/video streams from various directory services.

⌈⌋ ⎇ branch:  streamtuner2


Check-in [1e268b6422]

Overview
Comment:Removed dnd code snippets.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 1e268b64227016ace0cc59ae0e8dcf60e99f4b5c
User & Date: mario on 2015-04-18 17:16:03
Other Links: manifest | tags
Context
2015-04-18
17:19
Updated Jamendo plugin audioformat and listformat descriptors. Attempted to use v3.0 API for playlist tracks. Still no playlist API endpoint. So using a separate track requests now. Implemented a new action/playlist_convert URL extractor, which shall henceforth be known as "jamj" (JamJibberish). Fixed XML url extraction in regex mode, trivial backslash deescaping for JSON formats; and fixed multiply URL bug by copying row{} dict during conversion. check-in: 7149d92fe1 user: mario tags: trunk
17:16
Removed dnd code snippets. check-in: 1e268b6422 user: mario tags: trunk
17:15
Experimental drag and drop code snippets. (Not going to work well with other apps, only VLC tested, everything else depends on text/uri-list temp file:// URLs. Internal row dragging not implemented / no bookmarks subcats yet.) check-in: 185e42f185 user: mario tags: trunk
Changes

Modified channels/bookmarks.py from [d9e55cafbe] to [265184bad9].

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
    finder_song = { "genre": "Youtube ", "format": "video/youtube", "playing": "current_", "title": "The Finder song", "url": "http://youtube.com/v/omyZy4H8y9M", "homepage": "http://youtu.be/omyZy4H8y9M" }
    streams = {"favourite":[finder_song], "search":[], "scripts":[], "timer":[], "history":[], }


    # cache list, to determine if a PLS url is bookmarked
    urls = []

    drag_types = [
      ("UTF8_STRING", 0, 5),
      ("STRING", 0, 5),
      ("text/plain", 0, 10),
      ("text/uri-list", 0, 11),
      ("application/x-scpls", 0, 21),
      ("*/*", 0, 22),
    ]

    def gui(self, parent):
        GenericChannel.gui(self, parent)
        parent.notebook_channels.set_menu_label_text(parent.v_bookmarks, "bookmarks")

        #DND
        w = self.gtk_list
        #self.gtk_list.drag_source_set_icon_stock("gtk-folder")
        w.enable_model_drag_source(gtk.gdk.BUTTON1_MASK, self.drag_types, gtk.gdk.ACTION_DEFAULT|gtk.gdk.ACTION_COPY|gtk.gdk.ACTION_MOVE)
        w.enable_model_drag_dest(self.drag_types, gtk.gdk.ACTION_DEFAULT|gtk.gdk.ACTION_COPY)
        w.connect('drag_drop', self.drop_cb)

    # function to print out the mime type of the drop item
    def drop_cb(self, wid, context, x, y, time, *e):
        print '\n'.join([str(t) for t in context.targets])
        # What should I put here to get the URL of the link?
        context.finish(True, False, time)
        return True
                
    # this channel does not actually retrieve/parse data from anywhere
    def update_categories(self):
        pass
        
    # but category sub-plugins might provide a hook
    category_plugins = {}
    def update_streams(self, cat):







<
<
<
<
<
<
<
<
<




<
<
<
<
<
<
<
<
<
<
<
<
<
<







42
43
44
45
46
47
48









49
50
51
52














53
54
55
56
57
58
59
    finder_song = { "genre": "Youtube ", "format": "video/youtube", "playing": "current_", "title": "The Finder song", "url": "http://youtube.com/v/omyZy4H8y9M", "homepage": "http://youtu.be/omyZy4H8y9M" }
    streams = {"favourite":[finder_song], "search":[], "scripts":[], "timer":[], "history":[], }


    # cache list, to determine if a PLS url is bookmarked
    urls = []










    def gui(self, parent):
        GenericChannel.gui(self, parent)
        parent.notebook_channels.set_menu_label_text(parent.v_bookmarks, "bookmarks")















    # this channel does not actually retrieve/parse data from anywhere
    def update_categories(self):
        pass
        
    # but category sub-plugins might provide a hook
    category_plugins = {}
    def update_streams(self, cat):