[Rubyosa-discuss] Listing and adding tracks in iTunes

Jared Fine jared at jfine.org
Tue Mar 18 16:09:45 EDT 2008


I always found adding tracks with RubyOSA a bit tedious, in fact it  
took me several days to figure out how to add the current track to a  
playlist, and now I can't seem to remember how to do it again.


On Mar 18, 2008, at 3:44 PM, Alexander Veenendaal wrote:

>
> No luck with that either:
>
>>> track.location.get
> NoMethodError: undefined method `location' for #<OSA::ITunes::Track:
> 0x129456d0>
>         from (irb):122
>         from :0
>
>
> On 18 Mar 2008, at 19:24, Larry Staton Jr. wrote:
>
>> Alexander -
>>
>> I don't have access to iTunes right now, but have you tried
>> track.location.get?
>>
>> On Tue, Mar 18, 2008 at 2:49 PM, Alexander Veenendaal
>> <alxv at mac.com> wrote:
>>>
>>> Hello,
>>>
>>> I'm attempting to add a track to a playlist as per the recommended
>>> way I found in the list archives:
>>>
>>> app = OSA.app('itunes')
>>> ps = app.sources[0].playlists.find {|p| p.name == 'Party Shuffle'}
>>> track = app.sources[0].library_playlists[0].tracks[555]
>>> app.add(track.get.location,ps)
>>>
>>> however, 'track.get.location' causes the following error:
>>>
>>> RuntimeError: Cannot coerce desc to type furl : fnfErr (-43)
>>>        from /usr/local/lib/ruby/gems/1.8/gems/rubyosa-0.4.0/lib/
>>> rbosa.rb:
>>> 999:in `__data__'
>>>        ...
>>>
>>> any ideas ?
>>>
>>>
>>>
>>> _______________________________________________
>>> Rubyosa-discuss mailing list
>>> Rubyosa-discuss at rubyforge.org
>>> http://rubyforge.org/mailman/listinfo/rubyosa-discuss
>>>
>>
>>
>>
>> -- 
>> Larry Staton Jr.
>> E-mail/GoogleTalk: statonjr at gmail.com
>> Blog: <http://scriptingforlawyers.com>
>> LinkedIn: <http://www.linkedin.com/in/larrystaton>
>
> _______________________________________________
> Rubyosa-discuss mailing list
> Rubyosa-discuss at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rubyosa-discuss



More information about the Rubyosa-discuss mailing list