Metamasks, sort order and coverart

Help each other out

Metamasks, sort order and coverart

Postby greyjackal on Mon Nov 08, 2004 8:05 am

Here's one that I can't find an answer for (searched these forums and googled extensively).

I have a load of television series ripped off DVD onto my HD that I've imported fine into a new database with the following directory structure and the metamask I've used :

E:\TV\Star Trek Enterprise\Season 1\Star_Trek_Enterprise_-_S01E01_-_Broken_Bow_Pt_1.vob
E:\TV\Star Trek Enterprise\Season 1\Star_Trek_Enterprise_-_S01E02_-_Broken_Bow_Pt_2.vob
E:\TV\CSI\Season 1\CSI_-_S01E01_-_Pilot.avi

etc

\\(?<series>.*)\\(?<season>.*)\\(?<seriesname>.*)_-_S(?<seasonnum>.*)E(?<name>.*(?<episodenum>.*)_-_(?<epname>.*)\..*)

I've had to include the episode number in the actual name of the episode because despite setting the sort order in the database to episodenum or seasonnum:episodenum or series:seasonnum:episodenum, it still insists on ordering the episodes alphabetically. So any clues on that would be helpful :)

The other issue I have at the moment is automatically assigning coverart. Since I have multiple episodes in each season's directory, obviously the default behaviour of using the first jpg it finds isn't appropriate. Of course, I can manually assign a cover to each episode in the database editor, but that's a tad uneconomical given the amount of files I'm dealing with.

I originally named the coverart jpgs S01E01.jpg, S01E02.jpg etc to correspond to the season and episode numbers and I have extracted that info in the metamask above to a field named coverart. Is there any simple way of converting that into the actual coverart field (obviously prepending the path and appending .jpg)?

Oh, I've also just remembered - can I do substitutions during the import stage via metamasks? Primarily to replace the underscores with spaces in the episode titles.

Cheers for any help anyone can give :)
greyjackal
 
Posts: 11
Joined: Mon Nov 08, 2004 7:43 am

Postby greyjackal on Thu Nov 11, 2004 3:08 am

Not even a hint?

;)
greyjackal
 
Posts: 11
Joined: Mon Nov 08, 2004 7:43 am

Postby Arthur on Fri Nov 12, 2004 10:02 pm

About the covers, how would you like xlobby to know which cover belongs to which episode? Xlobby just looks for an image in a folder and assigns it. If you would lik eto automate this, you will have to put each episode in a seperate folder.
Arthur
 
Posts: 207
Joined: Thu Dec 25, 2003 8:52 am
Location: The Hague, The Netherlands

Postby gamejester on Tue Nov 16, 2004 12:52 pm

As far as the cover art issue goes, there is no way to do what you ask directly in xlobby, but you could do it with a script.

If you create an event in xlobyy to refresh the series database, you could call a VBscript as part of the process.

After your first Xlobby category refresh you have a new field coverart with the info in you require with the correct image name. You can then call a custom vbscript that reads the underlying xml file and takes the info from your custom coverart filed and writes it to the xlobby coverart field appending the path. You would then need to call xlobby category refresh again to bring these changes into xlobby, but it would retain your changes to the coverart paths.

Don't forget to use a timer or set xlobby to run the events in single thread mode when you branch out to a scripted workaround.
gamejester
 
Posts: 131
Joined: Mon Jun 21, 2004 9:20 am

Postby gamejester on Tue Nov 16, 2004 12:59 pm

MetaMasks:

What you ask for makes sense, as all metamasks are are regular expressions, but this has not been implemented.

What I do is make an external call, as part of my refresh process, to an external program called Ant Renamer which accepts command line parameters and a mask file to remove and replace certain strings from a file name to get it into the format I require.
gamejester
 
Posts: 131
Joined: Mon Jun 21, 2004 9:20 am

Postby greyjackal on Sat Dec 11, 2004 8:42 pm

Been away from this for a while.

In answer to your question, Arthur, the cover file names match the episode designations as I described, ie S02E04.jpg. So when I populate the db with the avis part of the filename is pulled out into a field named "coverart" with that notation in it.

gamejester - cheers, I'd thought of doing all this externally but wanted to check if there were any simpler ways built in to XL.
greyjackal
 
Posts: 11
Joined: Mon Nov 08, 2004 7:43 am