After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 674469 - Use signals to collect hacks
Use signals to collect hacks
Status: RESOLVED FIXED
Product: totem
Classification: Core
Component: Movie player
unspecified
Other Linux
: Normal normal
: ---
Assigned To: General Totem maintainer(s)
General Totem maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-04-20 13:43 UTC by Bastien Nocera
Modified: 2012-04-21 20:45 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Bastien Nocera 2012-04-20 13:43:55 UTC
This:
                /* HACK: Bad bad Apple */
                if (g_str_has_prefix (mrl, "http://movies.apple.com")
                                || g_str_has_prefix (mrl, "http://trailers.apple.com"))
                        bacon_video_widget_set_user_agent (totem->bvw, "Quicktime/7.2.0");
                else
                        bacon_video_widget_set_user_agent (totem->bvw, NULL);

Could be implemented using a signal that collects a retval instead. So the hack could be implemented inside a plugin.
Comment 1 Bastien Nocera 2012-04-21 20:45:47 UTC
For user-agent hacks:

commit 7b56db7b8d7dc405a4720b0f10c610a70ce9f68c
Author: Bastien Nocera <hadess@hadess.net>
Date:   Sat Apr 21 21:06:01 2012 +0100

    plugins: Add apple-trailers plugin
    
    Add plugin to change Totem's user-agent for the Apple Trailers site.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=674469

commit 56b360ecc090dac8403922d1c80e4911f2dc3959
Author: Bastien Nocera <hadess@hadess.net>
Date:   Sat Apr 21 21:04:28 2012 +0100

    main: Use a signal to get the user-agent for specific sites
    
    Instead of hard-coding hacks in the Totem core itself.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=674469

For loading subtitles:
commit ad1cf67b07a1a3ebd6d43aec92996b54d710b80c
Author: Bastien Nocera <hadess@hadess.net>
Date:   Sat Apr 21 21:42:11 2012 +0100

    plugins: Add autoload-subtitles plugin
    
    To autoload subtitles the same way we used to.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=674469

commit 2575313b45c45332938761ce3780ab01a09e8e5a
Author: Bastien Nocera <hadess@hadess.net>
Date:   Sat Apr 21 21:33:20 2012 +0100

    main: Use signal to collect subtitle URI location
    
    Instead of hard-coding this in our core.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=674469