rss feed? of custom media type?

Topics: Customizing Orchard, General
Feb 10, 2012 at 1:58 PM

Some background on my goal

I'm attempting to create an RSS feed of .wav (and/or other audio format files) to be consumed primarily  by a windows phone application (android and ios eventually). Probably short length as sound effects assigned to a button(might become ring tones too). 

I am imagining perhaps two feeds. One 'official' .wav of the day (or week...) and another of users contributions. Or perhaps one feed with some mechanism to denote a category  - if that's possible? 

I hope to be able to assign the audio sounds to a button in the phone application. With the sound of the day always on some specific button. 
The files for the feed(s) could be uploaded by and configured by the administrator and/or contributed by validated users as well.

The question(s)

Is there a way to create a custom media type? That would only allow perhaps .wav, .mp3 or .ogg files to be uploaded into it? And then perhaps a list container of this media type that could be configured as an RSS feed? Perhaps the tag could be defaulted - maybe configurable but not modifiable  by user? 

The vandelay tag rss looks promising but I haven't figured out how to configure or use it yet. It shows enabled in modules but how do I use? How to read the rss feed of a specific tag? 

I have experimented a bit with custom content types. For instance I created 'news' items that are displayed in a list from the main menu. 
I'm open to suggestions on how I might accomplish these goals. Or different approaches.

Feb 10, 2012 at 2:51 PM

My Media Garden modules allow for exactly such custom media content types. In fact the MediaGarden.Audio module provides an Audio content type and the facility to upload common audio types including the ones you listed (you could restrict this if needed). You can then combine this with Orchard's mechanism for generating RSS feeds, this is a core module and you don't need Vandelay. You can combine this with the Projector feature in 1.x to emit custom feeds based on any criteria you create and specify.

Feb 10, 2012 at 4:17 PM
randompete wrote:

My Media Garden modules allow for exactly such custom media content types. In fact the MediaGarden.Audio module provides an Audio content type and the facility to upload common audio types including the ones you listed ...


YSOD

I'm running version 1.3.1 compiled and installed via vs2010 from a souce code enlistment downloaded Wedensday or Thursday.

This output is from the second attempt. On the first attempt to install the base 'media garden' I selected both receipes. That ysod'd so I restored a backup I had (luckily) just made and ran again just selecting he science garden recepie which appeared to indicate it was required? This is the error I received.

 

Server Error in '/' Application.

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Error compiling module "MediaGarden" from file "/Modules/MediaGarden/MediaGarden.csproj":
The assembly reference 'Downplay.Mechanics' could not be loaded.

There are generally a few ways to solve this issue:
1. Remove the assembly reference from the project file if it's not needed.
2. Ensure the assembly reference is present in the 'bin' directory of the module.
3. Ensure the assembly reference is present in the 'bin' directory of the application.
4. Specify the strong name of the assembly (name, version, culture, publickey) if the assembly is present in the GAC.

Source Error:

Line 1:  <?xml version="1.0" encoding="utf-8"?>
Line 2:  <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
Line 3:    <PropertyGroup>


Source File: /Modules/MediaGarden/MediaGarden.csproj Line: 1


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272

 

Feb 10, 2012 at 4:39 PM

Ah right, well there's a problem in Orchard 1.3 that recipes won't correctly install modules when executed that way. So you need to install the Mechanics and Origami dependencies manually first. These issues are fixed somewhat in 1.4 (no more YSOD, and the recipes should work correctly). However I should also mention that those gallery versions are hideously out of date and I've basically stopped supporting them; there will be a set of new releases once 1.4 is out, these will fix a vast amount of issues and add many new features. So you're recommended either to wait a month or so until that happens, or if you want to start developing against the new versions immediately (which I'm doing myself) you can check out the "autoroute" branch of Orchard and get the latest changesets of my modules from http://scienceproject.codeplex.com and http://orchardmediagarden.codeplex.com respectively. Sorry it's not easier at present, everything is kind of in a transitional state right now!

Feb 10, 2012 at 5:42 PM

Doh! ;-)

Well I thought I would give Orchard a try for this specific project. I'm just trying to mock up an RSS feed of audio files for use in this phone application I want to work on at Startup weekend in LA in just a couple weeks. I guess I'll take a look at some of the new content types in word press or just go back to writing this in asp.net mvc. 

Unless I could get something going with the Bertrand's Vandelay RSS tag ??

I'll check back with orchard again soon. I'm certainly a fan...

- or (late thought) -

Is Media Garden so cool that I should try to scrounge up an orchard v1.2 and install the Media garden into that? 

cya.... - jeffa

Feb 10, 2012 at 5:49 PM

When I said problems with 1.3, I meant problems in all version prior to 1.4 ;) You can still get it working in 1.3, you just need Mechanics and Origami from the gallery first ... But, the newer versions will be so much more awesome, I have two killer features in particular that just need finishing off ... Also since you're just trying to mock something up and you don't need a production version, you can use Orchard 1.4 already, from the source on Codeplex.

Feb 10, 2012 at 6:31 PM

OK

I installed Origami then mechanics followed by media garden which all installed.

However when I installed the media garden audio I received the following. I did select the check box receipe for dependancies as it said it was required ??

 

 

Server Error in '/' Application.

Recipe execution with id d031889fbf2a4bf5bf3400a50bf4547b was cancelled because the "Module" step failed to execute. The following exception was thrown: Module Orchard.Module.Downplay.Origami,Orchard.Module.Downplay.Mechanics,Orchard.Module.MediaGarden was not found in the specified location.. Refer to the recipe journal for more information.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: Orchard.OrchardCoreException: Recipe execution with id d031889fbf2a4bf5bf3400a50bf4547b was cancelled because the "Module" step failed to execute. The following exception was thrown: Module Orchard.Module.Downplay.Origami,Orchard.Module.Downplay.Mechanics,Orchard.Module.MediaGarden was not found in the specified location.. Refer to the recipe journal for more information.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

[OrchardCoreException: Recipe execution with id d031889fbf2a4bf5bf3400a50bf4547b was cancelled because the "Module" step failed to execute. The following exception was thrown: Module Orchard.Module.Downplay.Origami,Orchard.Module.Downplay.Mechanics,Orchard.Module.MediaGarden was not found in the specified location.. Refer to the recipe journal for more information.]
   Orchard.Recipes.Services.RecipeStepExecutor.ExecuteNextStep(String executionId) +2271
   Orchard.Recipes.Services.RecipeScheduler.ExecuteWork(String executionId) +125

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +0
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +639
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +38
   System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +35
   Orchard.Events.DefaultOrchardEventBus.TryInvokeMethod(IEventHandler eventHandler, Type interfaceType, String methodName, IDictionary`2 arguments, IEnumerable& returnValue) in C:\Users\jeffa\Documents\Visual Studio 2010\Projects\OrchardEnlistment\src\Orchard\Events\DefaultOrchardEventBus.cs:85
   Orchard.Events.DefaultOrchardEventBus.TryInvoke(IEventHandler eventHandler, String interfaceName, String methodName, IDictionary`2 arguments, IEnumerable& returnValue) in C:\Users\jeffa\Documents\Visual Studio 2010\Projects\OrchardEnlistment\src\Orchard\Events\DefaultOrchardEventBus.cs:71
   Orchard.Events.DefaultOrchardEventBus.TryNotifyHandler(IEventHandler eventHandler, String messageName, String interfaceName, String methodName, IDictionary`2 eventData, Boolean failFast, IEnumerable& returnValue) in C:\Users\jeffa\Documents\Visual Studio 2010\Projects\OrchardEnlistment\src\Orchard\Events\DefaultOrchardEventBus.cs:62
   Orchard.Events.<NotifyHandlers>d__0.MoveNext() in C:\Users\jeffa\Documents\Visual Studio 2010\Projects\OrchardEnlistment\src\Orchard\Events\DefaultOrchardEventBus.cs:39
   System.Linq.Buffer`1..ctor(IEnumerable`1 source) +488
   System.Linq.Enumerable.ToArray(IEnumerable`1 source) +104
   Orchard.Events.DefaultOrchardEventBus.Notify(String messageName, IDictionary`2 eventData) in C:\Users\jeffa\Documents\Visual Studio 2010\Projects\OrchardEnlistment\src\Orchard\Events\DefaultOrchardEventBus.cs:25
   Orchard.Environment.State.DefaultProcessingEngine.Execute(Entry entry) in C:\Users\jeffa\Documents\Visual Studio 2010\Projects\OrchardEnlistment\src\Orchard\Environment\State\DefaultProcessingEngine.cs:101
   Orchard.Environment.State.DefaultProcessingEngine.ExecuteNextTask() in C:\Users\jeffa\Documents\Visual Studio 2010\Projects\OrchardEnlistment\src\Orchard\Environment\State\DefaultProcessingEngine.cs:67
   Orchard.Environment.DefaultOrchardHost.EndRequest() in C:\Users\jeffa\Documents\Visual Studio 2010\Projects\OrchardEnlistment\src\Orchard\Environment\DefaultOrchardHost.cs:217
   Orchard.Environment.DefaultOrchardHost.Orchard.Environment.IOrchardHost.EndRequest() in C:\Users\jeffa\Documents\Visual Studio 2010\Projects\OrchardEnlistment\src\Orchard\Environment\DefaultOrchardHost.cs:82
   Orchard.Web.MvcApplication.HostEndRequest(HttpApplication application, IOrchardHost host) in C:\Users\jeffa\Documents\Visual Studio 2010\Projects\OrchardEnlistment\src\Orchard.Web\Global.asax.cs:42
   Orchard.WarmupStarter.Starter`1.OnEndRequest(HttpApplication application) in C:\Users\jeffa\Documents\Visual Studio 2010\Projects\OrchardEnlistment\src\Orchard.Startup\Starter.cs:75
   Orchard.Web.MvcApplication.Application_EndRequest() in C:\Users\jeffa\Documents\Visual Studio 2010\Projects\OrchardEnlistment\src\Orchard.Web\Global.asax.cs:33

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +0
   System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +152
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +393
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +38
   System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +35
   System.Web.Util.ArglessEventHandlerProxy.Callback(Object sender, EventArgs e) +74
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +80
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +270



Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272

<!-- [OrchardCoreException]: Recipe execution with id d031889fbf2a4bf5bf3400a50bf4547b was cancelled because the "Module" step failed to execute. The following exception was thrown: Module Orchard.Module.Downplay.Origami,Orchard.Module.Downplay.Mechanics,Orchard.Module.MediaGarden was not found in the specified location.. Refer to the recipe journal for more information. at Orchard.Recipes.Services.RecipeStepExecutor.ExecuteNextStep(String executionId) at Orchard.Recipes.Services.RecipeScheduler.ExecuteWork(String executionId) [TargetInvocationException]: Exception has been thrown by the target of an invocation. at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) at Orchard.Events.DefaultOrchardEventBus.TryInvokeMethod(IEventHandler eventHandler, Type interfaceType, String methodName, IDictionary`2 arguments, IEnumerable& returnValue) in C:\Users\jeffa\Documents\Visual Studio 2010\Projects\OrchardEnlistment\src\Orchard\Events\DefaultOrchardEventBus.cs:line 85 at Orchard.Events.DefaultOrchardEventBus.TryInvoke(IEventHandler eventHandler, String interfaceName, String methodName, IDictionary`2 arguments, IEnumerable& returnValue) in C:\Users\jeffa\Documents\Visual Studio 2010\Projects\OrchardEnlistment\src\Orchard\Events\DefaultOrchardEventBus.cs:line 71 at Orchard.Events.DefaultOrchardEventBus.TryNotifyHandler(IEventHandler eventHandler, String messageName, String interfaceName, String methodName, IDictionary`2 eventData, Boolean failFast, IEnumerable& returnValue) in C:\Users\jeffa\Documents\Visual Studio 2010\Projects\OrchardEnlistment\src\Orchard\Events\DefaultOrchardEventBus.cs:line 62 at Orchard.Events.DefaultOrchardEventBus.<NotifyHandlers>d__0.MoveNext() in C:\Users\jeffa\Documents\Visual Studio 2010\Projects\OrchardEnlistment\src\Orchard\Events\DefaultOrchardEventBus.cs:line 39 at System.Linq.Buffer`1..ctor(IEnumerable`1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source) at Orchard.Events.DefaultOrchardEventBus.Notify(String messageName, IDictionary`2 eventData) in C:\Users\jeffa\Documents\Visual Studio 2010\Projects\OrchardEnlistment\src\Orchard\Events\DefaultOrchardEventBus.cs:line 25 at Orchard.Environment.State.DefaultProcessingEngine.Execute(Entry entry) in C:\Users\jeffa\Documents\Visual Studio 2010\Projects\OrchardEnlistment\src\Orchard\Environment\State\DefaultProcessingEngine.cs:line 101 at Orchard.Environment.State.DefaultProcessingEngine.ExecuteNextTask() in C:\Users\jeffa\Documents\Visual Studio 2010\Projects\OrchardEnlistment\src\Orchard\Environment\State\DefaultProcessingEngine.cs:line 67 at Orchard.Environment.DefaultOrchardHost.EndRequest() in C:\Users\jeffa\Documents\Visual Studio 2010\Projects\OrchardEnlistment\src\Orchard\Environment\DefaultOrchardHost.cs:line 217 at Orchard.Environment.DefaultOrchardHost.Orchard.Environment.IOrchardHost.EndRequest() in C:\Users\jeffa\Documents\Visual Studio 2010\Projects\OrchardEnlistment\src\Orchard\Environment\DefaultOrchardHost.cs:line 82 at Orchard.Web.MvcApplication.HostEndRequest(HttpApplication application, IOrchardHost host) in C:\Users\jeffa\Documents\Visual Studio 2010\Projects\OrchardEnlistment\src\Orchard.Web\Global.asax.cs:line 42 at Orchard.WarmupStarter.Starter`1.OnEndRequest(HttpApplication application) in C:\Users\jeffa\Documents\Visual Studio 2010\Projects\OrchardEnlistment\src\Orchard.Startup\Starter.cs:line 75 at Orchard.Web.MvcApplication.Application_EndRequest() in C:\Users\jeffa\Documents\Visual Studio 2010\Projects\OrchardEnlistment\src\Orchard.Web\Global.asax.cs:line 33 [TargetInvocationException]: Exception has been thrown by the target of an invocation. at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) at System.Web.Util.ArglessEventHandlerProxy.Callback(Object sender, EventArgs e) at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) -->
Feb 10, 2012 at 7:57 PM

... and then a bit later...

I went to the home page which loaded. Went to dashboard where it told me media garden audio needed to be upgraded. Clicked that which appeared to run giving me a message that it installed OK.

Attempting to use it now....