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

⌈⌋ ⎇ branch:  streamtuner2


Check-in [665f4b36ad]

Overview
Comment:Use absolute path (conf.share) for plugin lookup with pkgutil.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 665f4b36ad656e1392103d6a0f0ab301148cda93
User & Date: mario on 2015-03-30 17:42:27
Other Links: manifest | tags
Context
2015-03-30
18:38
Remove custom .catmap handling (automatically saved by GenericChannel.reload_categories which invokes update_categories). check-in: ec262d679d user: mario tags: trunk
17:42
Use absolute path (conf.share) for plugin lookup with pkgutil. check-in: 665f4b36ad user: mario tags: trunk
17:41
Support netrc account lookup (for MyOggRadio). check-in: 95f6f0f64f user: mario tags: trunk
Changes

Modified channels/__init__.py from [01af7f840e] to [04ae180339].

58
59
60
61
62
63
64
65
66

67
68
69
70
71
72
73

# Search through ./channels/ and get module basenames.
# Also order them by conf.channel_order
#
def module_list():

    # Should list plugins within zips as well as local paths
    ls = pkgutil.iter_modules(["channels"])
    ls = [name for loader,name,ispkg in ls]

    
    # resort with tab order
    order = [module.strip() for module in conf.channel_order.lower().replace(".","_").replace("-","_").split(",")]
    ls = [module for module in (order) if (module in ls)] + [module for module in (ls) if (module not in order)]

    return ls








|

>







58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74

# Search through ./channels/ and get module basenames.
# Also order them by conf.channel_order
#
def module_list():

    # Should list plugins within zips as well as local paths
    ls = pkgutil.iter_modules([conf.share+"/channels", "channels"])
    ls = [name for loader,name,ispkg in ls]
    print ls
    
    # resort with tab order
    order = [module.strip() for module in conf.channel_order.lower().replace(".","_").replace("-","_").split(",")]
    ls = [module for module in (order) if (module in ls)] + [module for module in (ls) if (module not in order)]

    return ls