Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Forum
Help
Search
Login
Register
May 23, 2013, 01:50:44 am
News
:
Neuros Technology Forums
Neuros OSD
Neuros OSD - Tips, Tricks, and Hacks
(Moderators:
ChadV
,
greyback
)
Applescript to add shows to iTunes
Pages: [
1
]
« previous
next »
Author
Topic: Applescript to add shows to iTunes (Read 6991 times)
bagster
Sr. Member
Posts: 270
Applescript to add shows to iTunes
«
on:
September 21, 2007, 12:16:03 pm »
I wrote a small applescript to add shows to iTunes, and change the metadatas in the file so it will be cleaner in iTunes (I tag everything as a TV Show).
Just insert this in the script editor, save it to /Library/Scripts/Folder Actions Scripts, and add a folder action on a specific folder (I use Movies/OSD shows).
You need to download AtomicParsley and copy the binary somewhere in your path.
====================
-- Script to add shows from OSD to iTunes, v0.1
-- Yves Pelletier (pelletiy AT gmail DOT com), september 21 2007
--
-- Put AtomicParsley somewhere in your PATH, or hardcode the path in this script
-- Add a folder action with this script on the place you will move your shows
-- You can edit/add shows in the TRAP EXCEPTION section.
--
-- ************************* BIG WARNING ************************
-- With this version, don't use the same folder for the folder action and
-- the place where you record show. AtomicparSley is called with a --overWrite,
-- so if you try it on a show that is in recording state, it will be corrupted
-- ************************* BIG WARNING ************************
--
-- TODO
-- 1) Find a clean way to wait for "in-progress" shows
-- 2) Auto-convert to H264 (ffmpeg) (to save space)
-- 3) Check the metadatas and don't modify them if they are not empty
-- 4) Listen these shows!
property atomize : 0
property showType : 10 -- --stik (10 = TV show, 0 = movie)
on adding folder items to thisFolder after receiving theseFiles
tell application "Finder"
repeat with thisFile in theseFiles
(* Ignore files containint -temp-, these are atomicparsley temp files *)
set showfileName to name of (info for thisFile)
if showfileName contains "temp" or showfileName contains "tmp" then
display dialog "Ignoring temp file"
else
set showID to "" -- To allow show.mp4 without ID field
set unixPATH to POSIX path of thisFile
set showType to "TV Show"
(* Get the show name *)
set fileName to (name of thisFile as string)
(* get the name of the recording. First we remove .mp4 *)
set ASTID to AppleScript's text item delimiters
set AppleScript's text item delimiters to ".mp4"
set newName to (text item 1 of fileName) as text
set AppleScript's text item delimiters to "-"
if newName contains "-" then
set showName to (text item 1 of newName) as text
set showID to (text item 2 of newName) as text
set AppleScript's text item delimiters to ASTID
else
set showName to (text item 1 of newName) as text
set AppleScript's text item delimiters to ASTID
end if
(* Now trap exceptions *)
if showName is "candice" then
set showName to "Candice Olson"
else if showName is "bye" then
set showName to "Bye bye maison"
else if showName is "vie" then
set showName to "Decore ta vie"
end if
display dialog "Adding Show: " & showName
(* Get the show date *)
set showDate to modification date of (info for thisFile)
(* Atomize it *)
set atomSH to "AtomicParsley \"" & unixPATH & "\" --stik \"" & showType & "\" --TVShowName \"" & showName & "\" --comment \"" & showDate & "\" --overWrite "
-- display dialog atomSH
try
do shell script atomSH
end try
(* Add it to iTunes *)
tell application "iTunes"
copy (add thisFile) to newTrack
end tell
end if
end repeat
end tell
end adding folder items to
«
Last Edit: September 21, 2007, 12:37:06 pm by bagster
»
Logged
FJ
Neuros Team
Administrator
Hero Member
Posts: 745
Re: Applescript to add shows to iTunes
«
Reply #1 on:
October 21, 2007, 12:16:26 pm »
Bagster-
Did you send this to our team, this is a great app. I would personally take out the step to reencode using h.264 for playback compatibility issues (only the PSP and the iPod can play back h.264).
Logged
FJ
bagster
Sr. Member
Posts: 270
Re: Applescript to add shows to iTunes
«
Reply #2 on:
October 22, 2007, 08:28:59 am »
Yes, I sent it on the dev. forum and it was linked
http://open.neurostechnology.com
.
If anyone have suggestions for improvment, let me know.
Logged
Pages: [
1
]
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Neuros OSD
-----------------------------
=> Neuros OSD - I need help!
=> Neuros OSD - Feedback and Discussion
=> Neuros OSD - Tips, Tricks, and Hacks
-----------------------------
Neuros Tablet
-----------------------------
=> Neuros Tablet- Tips and Tricks
=> Neuros Tablet- Feedback and Discussion
=> Neuros Tablet- I need help!
-----------------------------
Neuros LINK
-----------------------------
=> Neuros LINK - I need help!
===> Other Linux Installed
===> Windows Installed
=> Neuros LINK - Feedback and Discussion
=> Neuros.TV Service
-----------------------------
Neuros MPEG-4 Recorder
-----------------------------
=> Neuros MPEG4 Recorder - I need help!
=> Neuros MPEG4 Recorder - Feedback & Discussion
-----------------------------
Neuros Digital Audio Computer
-----------------------------
=> Neuros Digital Audio Computer - Feedback & Discussion
===> Tips & Tricks
===> General
=> Neuros Digital Audio Computer - I need help!
===> Device
=====> Features
=====> Device Hardware
=====> Device Firmware & Interface
=======> Neurosetta
=======> Functions
=======> HiSi
=======> MyFi
=======> Xi
===> Software
=====> Neuros Sync Manager
=====> Positron
=====> NDBM
-----------------------------
Neuros 442 Personal Media Player
-----------------------------
=> Neuros 442 - I need help!
=> Neuros 442 - Feedback and Discussion
===> 442 Hackers Discussion
-----------------------------
Neuros World
-----------------------------
=> Joe's Corner
=> General Discussion
-----------------------------
Resellers and Affiliates
-----------------------------
=> Reseller Forum
=> Afilliate Forum
Loading...